diff --git a/backend/internal/data/ent/schema/item.go b/backend/internal/data/ent/schema/item.go index f7799f4..3945ebb 100644 --- a/backend/internal/data/ent/schema/item.go +++ b/backend/internal/data/ent/schema/item.go @@ -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