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

30 lines
565 B
Go

package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
)
// RoundStats holds the schema definition for the EcoStats entity.
type RoundStats struct {
ent.Schema
}
// Fields of the EcoStats.
func (RoundStats) Fields() []ent.Field {
return []ent.Field{
field.Uint("round"),
field.Uint("bank"),
field.Uint("equipment"),
field.Uint("spent"),
}
}
// Edges of the RoundStats.
func (RoundStats) Edges() []ent.Edge {
return []ent.Edge{
edge.From("match_player", MatchPlayer.Type).Ref("round_stats").Unique(),
}
}