better sharecode api handling, renamed endpoint to /player/id/track

This commit is contained in:
2021-10-17 12:27:35 +02:00
parent 9973951d4b
commit d39cdf8ed6
3 changed files with 114 additions and 15 deletions

29
ent/schema/roundstats.go Normal file
View File

@@ -0,0 +1,29 @@
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("stat", Stats.Type).Ref("round_stats").Unique(),
}
}