mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-26 12:30:27 +00:00
refactor schema folder
This commit is contained in:
parent
77fb37ebf4
commit
9fa4da819f
22 changed files with 723 additions and 735 deletions
|
@ -18,6 +18,7 @@ func (Item) Mixin() []ent.Mixin {
|
|||
return []ent.Mixin{
|
||||
mixins.BaseMixin{},
|
||||
mixins.DetailsMixin{},
|
||||
GroupMixin{ref: "items"},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,10 +103,6 @@ func (Item) Edges() []ent.Edge {
|
|||
edge.To("children", Item.Type).
|
||||
From("parent").
|
||||
Unique(),
|
||||
edge.From("group", Group.Type).
|
||||
Ref("items").
|
||||
Required().
|
||||
Unique(),
|
||||
edge.From("label", Label.Type).
|
||||
Ref("items"),
|
||||
edge.From("location", Location.Type).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue