package schema import ( "entgo.io/ent" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" ) // BusinessCategory holds the schema definition for the BusinessCategory entity. type BusinessCategory struct { ent.Schema } // Fields of the BusinessCategory. func (BusinessCategory) Fields() []ent.Field { return []ent.Field{ field.String("slug").Unique(), field.String("name").Default("unknown"), field.Text("description").Default("unknown"), } } // Edges of the BusinessCategory. func (BusinessCategory) Edges() []ent.Edge { return []ent.Edge{ edge.To("businesses", Business.Type), } }