added roundstats with eco info, switched to avatar hash
This commit is contained in:
18
ent/stats.go
18
ent/stats.go
@@ -108,9 +108,11 @@ type StatsEdges struct {
|
||||
Players *Player `json:"players,omitempty"`
|
||||
// WeaponStats holds the value of the weapon_stats edge.
|
||||
WeaponStats []*WeaponStats `json:"weapon_stats,omitempty"`
|
||||
// RoundStats holds the value of the round_stats edge.
|
||||
RoundStats []*RoundStats `json:"round_stats,omitempty"`
|
||||
// loadedTypes holds the information for reporting if a
|
||||
// type was loaded (or requested) in eager-loading or not.
|
||||
loadedTypes [3]bool
|
||||
loadedTypes [4]bool
|
||||
}
|
||||
|
||||
// MatchesOrErr returns the Matches value or an error if the edge
|
||||
@@ -150,6 +152,15 @@ func (e StatsEdges) WeaponStatsOrErr() ([]*WeaponStats, error) {
|
||||
return nil, &NotLoadedError{edge: "weapon_stats"}
|
||||
}
|
||||
|
||||
// RoundStatsOrErr returns the RoundStats value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e StatsEdges) RoundStatsOrErr() ([]*RoundStats, error) {
|
||||
if e.loadedTypes[3] {
|
||||
return e.RoundStats, nil
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "round_stats"}
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Stats) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
@@ -436,6 +447,11 @@ func (s *Stats) QueryWeaponStats() *WeaponStatsQuery {
|
||||
return (&StatsClient{config: s.config}).QueryWeaponStats(s)
|
||||
}
|
||||
|
||||
// QueryRoundStats queries the "round_stats" edge of the Stats entity.
|
||||
func (s *Stats) QueryRoundStats() *RoundStatsQuery {
|
||||
return (&StatsClient{config: s.config}).QueryRoundStats(s)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this Stats.
|
||||
// Note that you need to call Stats.Unwrap() before calling this method if this Stats
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
|
||||
Reference in New Issue
Block a user