mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-22 18:40:27 +00:00
end-to-end testing setup
This commit is contained in:
parent
b4eb7d8ddc
commit
ad4c8c9ab4
41 changed files with 544 additions and 313 deletions
|
@ -2,6 +2,7 @@ package schema
|
|||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema/edge"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/hay-kot/content/backend/ent/schema/mixins"
|
||||
|
@ -33,9 +34,17 @@ func (Group) Fields() []ent.Field {
|
|||
// Edges of the Home.
|
||||
func (Group) Edges() []ent.Edge {
|
||||
return []ent.Edge{
|
||||
edge.To("users", User.Type),
|
||||
edge.To("locations", Location.Type),
|
||||
edge.To("items", Item.Type),
|
||||
edge.To("labels", Label.Type),
|
||||
edge.To("users", User.Type).Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
}),
|
||||
edge.To("locations", Location.Type).Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
}),
|
||||
edge.To("items", Item.Type).Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
}),
|
||||
edge.To("labels", Label.Type).Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue