package schema import ( "entgo.io/ent" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" ) // Spray holds the schema definition for the Spray entity. type Spray struct { ent.Schema } // Fields of the Spray. func (Spray) Fields() []ent.Field { return []ent.Field{ field.Int("weapon"), field.Bytes("spray"), } } // Edges of the Spray. func (Spray) Edges() []ent.Edge { return []ent.Edge{ edge.From("match_players", MatchPlayer.Type).Ref("spray").Unique(), } }