add schema

This commit is contained in:
Hayden 2022-11-12 16:19:27 -09:00
parent 976f68252d
commit 50f0f7dd15
No known key found for this signature in database
GPG key ID: 17CF79474E257545

View file

@ -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