Files
csgowtfd/ent/schema/spray.go
2021-10-31 08:40:02 +01:00

28 lines
481 B
Go

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(),
}
}