mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-28 19:45:41 +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