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
|
@ -16,6 +16,7 @@ func (Location) Mixin() []ent.Mixin {
|
|||
return []ent.Mixin{
|
||||
mixins.BaseMixin{},
|
||||
mixins.DetailsMixin{},
|
||||
GroupMixin{ref: "locations"},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,10 +31,6 @@ func (Location) Edges() []ent.Edge {
|
|||
edge.To("children", Location.Type).
|
||||
From("parent").
|
||||
Unique(),
|
||||
edge.From("group", Group.Type).
|
||||
Ref("locations").
|
||||
Unique().
|
||||
Required(),
|
||||
edge.To("items", Item.Type).
|
||||
Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue