mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-01 04:55:40 +00:00
add schema
This commit is contained in:
parent
976f68252d
commit
50f0f7dd15
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,7 @@ func (Item) Indexes() []ent.Index {
|
|||
index.Fields("model_number"),
|
||||
index.Fields("serial_number"),
|
||||
index.Fields("archived"),
|
||||
index.Fields("group_id", "asset_id"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,6 +49,8 @@ func (Item) Fields() []ent.Field {
|
|||
Default(false),
|
||||
field.Bool("archived").
|
||||
Default(false),
|
||||
field.Int("asset_id").
|
||||
Default(0),
|
||||
|
||||
// ------------------------------------
|
||||
// item identification
|
||||
|
|
Loading…
Reference in a new issue