Reviewed-on: https://git.harting.dev/CSGOWTF/csgowtfd/pulls/1 Co-authored-by: Giovanni Harting <539@idlegandalf.com> Co-committed-by: Giovanni Harting <539@idlegandalf.com>
30 lines
565 B
Go
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(),
|
|
}
|
|
}
|