added spray patterns
This commit is contained in:
27
ent/schema/spray.go
Normal file
27
ent/schema/spray.go
Normal 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(),
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user