added spray patterns

This commit is contained in:
2021-10-31 08:40:02 +01:00
parent 268793f0e5
commit 978232dd0a
66 changed files with 16805 additions and 11903 deletions

27
ent/schema/spray.go Normal file
View File

@@ -0,0 +1,27 @@
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(),
}
}