mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-22 18:40:27 +00:00
fix: csv-importer (#10)
* update item fields to support import_ref * add additional rows to CSV importer * add CSV import documentation * update readme * update readme * fix failed test
This commit is contained in:
parent
90813abf76
commit
ca36e3b080
21 changed files with 447 additions and 135 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"
|
||||
|
@ -35,6 +36,9 @@ func (Label) Edges() []ent.Edge {
|
|||
Ref("labels").
|
||||
Required().
|
||||
Unique(),
|
||||
edge.To("items", Item.Type),
|
||||
edge.To("items", Item.Type).
|
||||
Annotations(entsql.Annotation{
|
||||
OnDelete: entsql.Cascade,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue