Files
csgowtfd/ent/schema/weaponstats.go
2021-10-16 01:49:52 +02:00

30 lines
565 B
Go

package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
)
// WeaponStats holds the schema definition for the WeaponStats entity.
type WeaponStats struct {
ent.Schema
}
// Fields of the WeaponStats.
func (WeaponStats) Fields() []ent.Field {
return []ent.Field{
field.Uint64("victim"),
field.Uint("dmg"),
field.Int("eq_type"),
field.Int("hit_group"),
}
}
// Edges of the WeaponStats.
func (WeaponStats) Edges() []ent.Edge {
return []ent.Edge{
edge.From("stat", Stats.Type).Ref("weapon_stats").Unique(),
}
}