removed rateLimit from http router requests
improved logging
This commit is contained in:
@@ -3,7 +3,6 @@ package csgo
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"csgowtfd/ent"
|
"csgowtfd/ent"
|
||||||
"csgowtfd/ent/match"
|
|
||||||
"csgowtfd/utils"
|
"csgowtfd/utils"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -322,7 +321,7 @@ func (d *DemoMatchLoader) gcWorker(apiKey string, rl ratelimit.Limiter) {
|
|||||||
select {
|
select {
|
||||||
case demo := <-d.parseDemo:
|
case demo := <-d.parseDemo:
|
||||||
if !d.GCReady {
|
if !d.GCReady {
|
||||||
log.Infof("[DL] Postponing match %d (%s): GC not read", demo.MatchId, demo.ShareCode)
|
log.Infof("[DL] Postponing match %d (%s): GC not ready", demo.MatchId, demo.ShareCode)
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
d.parseDemo <- demo
|
d.parseDemo <- demo
|
||||||
continue
|
continue
|
||||||
@@ -335,14 +334,14 @@ func (d *DemoMatchLoader) gcWorker(apiKey string, rl ratelimit.Limiter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.lock.RLock()
|
d.lock.RLock()
|
||||||
iMatch, err := d.db.Match.Query().Where(match.ID(matchId)).Only(context.Background())
|
iMatch, err := d.db.Match.Get(context.Background(), matchId)
|
||||||
d.lock.RUnlock()
|
d.lock.RUnlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
switch e := err.(type) {
|
switch e := err.(type) {
|
||||||
case *ent.NotFoundError:
|
case *ent.NotFoundError:
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
log.Errorf("[DL] Failure trying to find match %d in db: %v", matchId, e)
|
log.Errorf("[DL] Failure trying to lookup match %d in db: %v", matchId, e)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if iMatch.DemoParsed == false && iMatch.Date.After(time.Now().UTC().AddDate(0, 0, -30)) {
|
if iMatch.DemoParsed == false && iMatch.Date.After(time.Now().UTC().AddDate(0, 0, -30)) {
|
||||||
|
@@ -109,7 +109,7 @@ func (p *DemoParser) parseWorker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.lock.RLock()
|
p.lock.RLock()
|
||||||
tMatch, err := p.db.Match.Query().Where(match.ID(demo.MatchId)).Only(context.Background())
|
tMatch, err := p.db.Match.Get(context.Background(), demo.MatchId)
|
||||||
p.lock.RUnlock()
|
p.lock.RUnlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("[DP] Unable to get match %d: %v", demo.MatchId, err)
|
log.Errorf("[DP] Unable to get match %d: %v", demo.MatchId, err)
|
||||||
@@ -129,7 +129,7 @@ func (p *DemoParser) parseWorker() {
|
|||||||
if tMatch.Date.Before(time.Now().UTC().AddDate(0, 0, -30)) {
|
if tMatch.Date.Before(time.Now().UTC().AddDate(0, 0, -30)) {
|
||||||
log.Infof("[DP] demo expired for match %d", tMatch.ID)
|
log.Infof("[DP] demo expired for match %d", tMatch.ID)
|
||||||
} else {
|
} else {
|
||||||
log.Infof("[DP] Demo 404 not found for %d. Trying again later.", demo.MatchId)
|
log.Infof("[DP] demo 404 not found for match %d. Trying again later.", demo.MatchId)
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
default:
|
default:
|
||||||
@@ -202,13 +202,14 @@ func (p *DemoParser) parseWorker() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// onFreezeTimeEnd
|
// onRoundEnd
|
||||||
demoParser.RegisterEventHandler(func(e events.RoundEnd) {
|
demoParser.RegisterEventHandler(func(e events.RoundEnd) {
|
||||||
gs := demoParser.GameState()
|
gs := demoParser.GameState()
|
||||||
if !gs.IsMatchStarted() {
|
if !gs.IsMatchStarted() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// track eco
|
||||||
for _, p := range gs.Participants().Playing() {
|
for _, p := range gs.Participants().Playing() {
|
||||||
ecoMap[p.SteamID64] = append(ecoMap[p.SteamID64], &struct {
|
ecoMap[p.SteamID64] = append(ecoMap[p.SteamID64], &struct {
|
||||||
Round int
|
Round int
|
||||||
@@ -217,28 +218,24 @@ func (p *DemoParser) parseWorker() {
|
|||||||
Spent int
|
Spent int
|
||||||
}{Round: gs.TotalRoundsPlayed(), EqV: p.EquipmentValueCurrent(), Bank: p.Money(), Spent: p.MoneySpentThisRound()})
|
}{Round: gs.TotalRoundsPlayed(), EqV: p.EquipmentValueCurrent(), Bank: p.Money(), Spent: p.MoneySpentThisRound()})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
// onRoundEnd
|
// track multikills
|
||||||
demoParser.RegisterEventHandler(func(e events.RoundEnd) {
|
for _, igp := range gs.Participants().Playing() {
|
||||||
if demoParser.GameState().IsMatchStarted() {
|
if igp != nil && igp.SteamID64 != 0 {
|
||||||
for _, IGP := range demoParser.GameState().Participants().Playing() {
|
killDiff := igp.Kills() - killMap[igp.SteamID64]
|
||||||
if IGP != nil && IGP.SteamID64 != 0 {
|
tPlayer := p.getMatchPlayerBySteamID(tStats, igp.SteamID64)
|
||||||
killDiff := IGP.Kills() - killMap[IGP.SteamID64]
|
|
||||||
tPlayer := p.getMatchPlayerBySteamID(tStats, IGP.SteamID64)
|
|
||||||
|
|
||||||
switch killDiff {
|
switch killDiff {
|
||||||
case 2:
|
case 2:
|
||||||
tPlayer.Mk2++
|
tPlayer.Mk2++
|
||||||
case 3:
|
case 3:
|
||||||
tPlayer.Mk3++
|
tPlayer.Mk3++
|
||||||
case 4:
|
case 4:
|
||||||
tPlayer.Mk4++
|
tPlayer.Mk4++
|
||||||
case 5:
|
case 5:
|
||||||
tPlayer.Mk5++
|
tPlayer.Mk5++
|
||||||
}
|
|
||||||
killMap[IGP.SteamID64] = IGP.Kills()
|
|
||||||
}
|
}
|
||||||
|
killMap[igp.SteamID64] = igp.Kills()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -302,11 +299,6 @@ func (p *DemoParser) parseWorker() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// onMatchEnd?
|
|
||||||
demoParser.RegisterEventHandler(func(e events.AnnouncementWinPanelMatch) {
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
// onRankUpdate
|
// onRankUpdate
|
||||||
demoParser.RegisterEventHandler(func(e events.RankUpdate) {
|
demoParser.RegisterEventHandler(func(e events.RankUpdate) {
|
||||||
if e.Player != nil && e.SteamID64() != 0 {
|
if e.Player != nil && e.SteamID64() != 0 {
|
||||||
@@ -363,7 +355,7 @@ func (p *DemoParser) parseWorker() {
|
|||||||
Save(context.Background())
|
Save(context.Background())
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("[DP] Unable to update player %d in database: %v", tMatchPlayer.Edges.Players.ID, err)
|
log.Errorf("[DP] Unable to update stats %d in database: %v", tMatchPlayer.PlayerStats, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,12 +373,12 @@ func (p *DemoParser) parseWorker() {
|
|||||||
err := p.db.RoundStats.Create().SetStat(nMatchPLayer).SetRound(uint(eco.Round)).SetBank(uint(eco.Bank)).SetEquipment(uint(eco.EqV)).SetSpent(uint(eco.Spent)).Exec(context.Background())
|
err := p.db.RoundStats.Create().SetStat(nMatchPLayer).SetRound(uint(eco.Round)).SetBank(uint(eco.Bank)).SetEquipment(uint(eco.EqV)).SetSpent(uint(eco.Spent)).Exec(context.Background())
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("[DP] Unable to create WeaponStat: %v", err)
|
log.Errorf("[DP] Unable to create RoundStat: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("[DP] Parsed %d (took %s/%s)", demo.MatchId, downloadTime, time.Now().Sub(startTime))
|
log.Infof("[DP] parsed match %d (took %s/%s)", demo.MatchId, downloadTime, time.Now().Sub(startTime))
|
||||||
|
|
||||||
err = demoParser.Close()
|
err = demoParser.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -95,14 +95,6 @@ var (
|
|||||||
{Name: "ud_flash", Type: field.TypeUint, Nullable: true},
|
{Name: "ud_flash", Type: field.TypeUint, Nullable: true},
|
||||||
{Name: "ud_decoy", Type: field.TypeUint, Nullable: true},
|
{Name: "ud_decoy", Type: field.TypeUint, Nullable: true},
|
||||||
{Name: "ud_smoke", Type: field.TypeUint, Nullable: true},
|
{Name: "ud_smoke", Type: field.TypeUint, Nullable: true},
|
||||||
{Name: "hit_group_head", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_chest", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_stomach", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_left_arm", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_right_arm", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_left_leg", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_right_leg", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "hit_group_gear", Type: field.TypeUint, Nullable: true},
|
|
||||||
{Name: "crosshair", Type: field.TypeString, Nullable: true},
|
{Name: "crosshair", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "color", Type: field.TypeEnum, Nullable: true, Enums: []string{"green", "yellow", "purple", "blue", "orange", "grey"}},
|
{Name: "color", Type: field.TypeEnum, Nullable: true, Enums: []string{"green", "yellow", "purple", "blue", "orange", "grey"}},
|
||||||
{Name: "kast", Type: field.TypeInt, Nullable: true},
|
{Name: "kast", Type: field.TypeInt, Nullable: true},
|
||||||
@@ -123,13 +115,13 @@ var (
|
|||||||
ForeignKeys: []*schema.ForeignKey{
|
ForeignKeys: []*schema.ForeignKey{
|
||||||
{
|
{
|
||||||
Symbol: "stats_matches_stats",
|
Symbol: "stats_matches_stats",
|
||||||
Columns: []*schema.Column{StatsColumns[38]},
|
Columns: []*schema.Column{StatsColumns[30]},
|
||||||
RefColumns: []*schema.Column{MatchesColumns[0]},
|
RefColumns: []*schema.Column{MatchesColumns[0]},
|
||||||
OnDelete: schema.SetNull,
|
OnDelete: schema.SetNull,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Symbol: "stats_players_stats",
|
Symbol: "stats_players_stats",
|
||||||
Columns: []*schema.Column{StatsColumns[39]},
|
Columns: []*schema.Column{StatsColumns[31]},
|
||||||
RefColumns: []*schema.Column{PlayersColumns[0]},
|
RefColumns: []*schema.Column{PlayersColumns[0]},
|
||||||
OnDelete: schema.SetNull,
|
OnDelete: schema.SetNull,
|
||||||
},
|
},
|
||||||
|
858
ent/mutation.go
858
ent/mutation.go
@@ -3131,22 +3131,6 @@ type StatsMutation struct {
|
|||||||
addud_decoy *uint
|
addud_decoy *uint
|
||||||
ud_smoke *uint
|
ud_smoke *uint
|
||||||
addud_smoke *uint
|
addud_smoke *uint
|
||||||
hit_group_head *uint
|
|
||||||
addhit_group_head *uint
|
|
||||||
hit_group_chest *uint
|
|
||||||
addhit_group_chest *uint
|
|
||||||
hit_group_stomach *uint
|
|
||||||
addhit_group_stomach *uint
|
|
||||||
hit_group_left_arm *uint
|
|
||||||
addhit_group_left_arm *uint
|
|
||||||
hit_group_right_arm *uint
|
|
||||||
addhit_group_right_arm *uint
|
|
||||||
hit_group_left_leg *uint
|
|
||||||
addhit_group_left_leg *uint
|
|
||||||
hit_group_right_leg *uint
|
|
||||||
addhit_group_right_leg *uint
|
|
||||||
hit_group_gear *uint
|
|
||||||
addhit_group_gear *uint
|
|
||||||
crosshair *string
|
crosshair *string
|
||||||
color *stats.Color
|
color *stats.Color
|
||||||
kast *int
|
kast *int
|
||||||
@@ -4560,566 +4544,6 @@ func (m *StatsMutation) ResetUdSmoke() {
|
|||||||
delete(m.clearedFields, stats.FieldUdSmoke)
|
delete(m.clearedFields, stats.FieldUdSmoke)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHitGroupHead sets the "hit_group_head" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupHead(u uint) {
|
|
||||||
m.hit_group_head = &u
|
|
||||||
m.addhit_group_head = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHead returns the value of the "hit_group_head" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupHead() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_head
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupHead returns the old "hit_group_head" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupHead(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupHead is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupHead requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupHead: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupHead, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupHead adds u to the "hit_group_head" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupHead(u uint) {
|
|
||||||
if m.addhit_group_head != nil {
|
|
||||||
*m.addhit_group_head += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_head = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupHead returns the value that was added to the "hit_group_head" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupHead() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_head
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupHead clears the value of the "hit_group_head" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupHead() {
|
|
||||||
m.hit_group_head = nil
|
|
||||||
m.addhit_group_head = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupHead] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadCleared returns if the "hit_group_head" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupHeadCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupHead]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupHead resets all changes to the "hit_group_head" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupHead() {
|
|
||||||
m.hit_group_head = nil
|
|
||||||
m.addhit_group_head = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupHead)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupChest sets the "hit_group_chest" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupChest(u uint) {
|
|
||||||
m.hit_group_chest = &u
|
|
||||||
m.addhit_group_chest = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChest returns the value of the "hit_group_chest" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupChest() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_chest
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupChest returns the old "hit_group_chest" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupChest(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupChest is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupChest requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupChest: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupChest, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupChest adds u to the "hit_group_chest" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupChest(u uint) {
|
|
||||||
if m.addhit_group_chest != nil {
|
|
||||||
*m.addhit_group_chest += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_chest = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupChest returns the value that was added to the "hit_group_chest" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupChest() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_chest
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupChest clears the value of the "hit_group_chest" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupChest() {
|
|
||||||
m.hit_group_chest = nil
|
|
||||||
m.addhit_group_chest = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupChest] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestCleared returns if the "hit_group_chest" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupChestCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupChest]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupChest resets all changes to the "hit_group_chest" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupChest() {
|
|
||||||
m.hit_group_chest = nil
|
|
||||||
m.addhit_group_chest = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupChest)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupStomach sets the "hit_group_stomach" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupStomach(u uint) {
|
|
||||||
m.hit_group_stomach = &u
|
|
||||||
m.addhit_group_stomach = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomach returns the value of the "hit_group_stomach" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupStomach() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_stomach
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupStomach returns the old "hit_group_stomach" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupStomach(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupStomach is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupStomach requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupStomach: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupStomach, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupStomach adds u to the "hit_group_stomach" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupStomach(u uint) {
|
|
||||||
if m.addhit_group_stomach != nil {
|
|
||||||
*m.addhit_group_stomach += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_stomach = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupStomach returns the value that was added to the "hit_group_stomach" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupStomach() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_stomach
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupStomach clears the value of the "hit_group_stomach" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupStomach() {
|
|
||||||
m.hit_group_stomach = nil
|
|
||||||
m.addhit_group_stomach = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupStomach] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachCleared returns if the "hit_group_stomach" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupStomachCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupStomach]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupStomach resets all changes to the "hit_group_stomach" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupStomach() {
|
|
||||||
m.hit_group_stomach = nil
|
|
||||||
m.addhit_group_stomach = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupStomach)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftArm sets the "hit_group_left_arm" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupLeftArm(u uint) {
|
|
||||||
m.hit_group_left_arm = &u
|
|
||||||
m.addhit_group_left_arm = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArm returns the value of the "hit_group_left_arm" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupLeftArm() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_left_arm
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupLeftArm returns the old "hit_group_left_arm" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupLeftArm(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupLeftArm is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupLeftArm requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupLeftArm: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupLeftArm, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftArm adds u to the "hit_group_left_arm" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupLeftArm(u uint) {
|
|
||||||
if m.addhit_group_left_arm != nil {
|
|
||||||
*m.addhit_group_left_arm += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_left_arm = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupLeftArm returns the value that was added to the "hit_group_left_arm" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupLeftArm() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_left_arm
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftArm clears the value of the "hit_group_left_arm" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupLeftArm() {
|
|
||||||
m.hit_group_left_arm = nil
|
|
||||||
m.addhit_group_left_arm = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupLeftArm] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmCleared returns if the "hit_group_left_arm" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupLeftArmCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupLeftArm]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupLeftArm resets all changes to the "hit_group_left_arm" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupLeftArm() {
|
|
||||||
m.hit_group_left_arm = nil
|
|
||||||
m.addhit_group_left_arm = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupLeftArm)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightArm sets the "hit_group_right_arm" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupRightArm(u uint) {
|
|
||||||
m.hit_group_right_arm = &u
|
|
||||||
m.addhit_group_right_arm = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArm returns the value of the "hit_group_right_arm" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupRightArm() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_right_arm
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupRightArm returns the old "hit_group_right_arm" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupRightArm(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupRightArm is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupRightArm requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupRightArm: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupRightArm, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightArm adds u to the "hit_group_right_arm" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupRightArm(u uint) {
|
|
||||||
if m.addhit_group_right_arm != nil {
|
|
||||||
*m.addhit_group_right_arm += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_right_arm = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupRightArm returns the value that was added to the "hit_group_right_arm" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupRightArm() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_right_arm
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightArm clears the value of the "hit_group_right_arm" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupRightArm() {
|
|
||||||
m.hit_group_right_arm = nil
|
|
||||||
m.addhit_group_right_arm = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupRightArm] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmCleared returns if the "hit_group_right_arm" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupRightArmCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupRightArm]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupRightArm resets all changes to the "hit_group_right_arm" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupRightArm() {
|
|
||||||
m.hit_group_right_arm = nil
|
|
||||||
m.addhit_group_right_arm = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupRightArm)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftLeg sets the "hit_group_left_leg" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupLeftLeg(u uint) {
|
|
||||||
m.hit_group_left_leg = &u
|
|
||||||
m.addhit_group_left_leg = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLeg returns the value of the "hit_group_left_leg" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupLeftLeg() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_left_leg
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupLeftLeg returns the old "hit_group_left_leg" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupLeftLeg(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupLeftLeg is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupLeftLeg requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupLeftLeg: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupLeftLeg, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftLeg adds u to the "hit_group_left_leg" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupLeftLeg(u uint) {
|
|
||||||
if m.addhit_group_left_leg != nil {
|
|
||||||
*m.addhit_group_left_leg += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_left_leg = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupLeftLeg returns the value that was added to the "hit_group_left_leg" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupLeftLeg() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_left_leg
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftLeg clears the value of the "hit_group_left_leg" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupLeftLeg() {
|
|
||||||
m.hit_group_left_leg = nil
|
|
||||||
m.addhit_group_left_leg = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupLeftLeg] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegCleared returns if the "hit_group_left_leg" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupLeftLegCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupLeftLeg]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupLeftLeg resets all changes to the "hit_group_left_leg" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupLeftLeg() {
|
|
||||||
m.hit_group_left_leg = nil
|
|
||||||
m.addhit_group_left_leg = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupLeftLeg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightLeg sets the "hit_group_right_leg" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupRightLeg(u uint) {
|
|
||||||
m.hit_group_right_leg = &u
|
|
||||||
m.addhit_group_right_leg = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLeg returns the value of the "hit_group_right_leg" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupRightLeg() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_right_leg
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupRightLeg returns the old "hit_group_right_leg" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupRightLeg(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupRightLeg is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupRightLeg requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupRightLeg: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupRightLeg, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightLeg adds u to the "hit_group_right_leg" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupRightLeg(u uint) {
|
|
||||||
if m.addhit_group_right_leg != nil {
|
|
||||||
*m.addhit_group_right_leg += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_right_leg = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupRightLeg returns the value that was added to the "hit_group_right_leg" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupRightLeg() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_right_leg
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightLeg clears the value of the "hit_group_right_leg" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupRightLeg() {
|
|
||||||
m.hit_group_right_leg = nil
|
|
||||||
m.addhit_group_right_leg = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupRightLeg] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegCleared returns if the "hit_group_right_leg" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupRightLegCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupRightLeg]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupRightLeg resets all changes to the "hit_group_right_leg" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupRightLeg() {
|
|
||||||
m.hit_group_right_leg = nil
|
|
||||||
m.addhit_group_right_leg = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupRightLeg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupGear sets the "hit_group_gear" field.
|
|
||||||
func (m *StatsMutation) SetHitGroupGear(u uint) {
|
|
||||||
m.hit_group_gear = &u
|
|
||||||
m.addhit_group_gear = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGear returns the value of the "hit_group_gear" field in the mutation.
|
|
||||||
func (m *StatsMutation) HitGroupGear() (r uint, exists bool) {
|
|
||||||
v := m.hit_group_gear
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OldHitGroupGear returns the old "hit_group_gear" field's value of the Stats entity.
|
|
||||||
// If the Stats object wasn't provided to the builder, the object is fetched from the database.
|
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
||||||
func (m *StatsMutation) OldHitGroupGear(ctx context.Context) (v uint, err error) {
|
|
||||||
if !m.op.Is(OpUpdateOne) {
|
|
||||||
return v, fmt.Errorf("OldHitGroupGear is only allowed on UpdateOne operations")
|
|
||||||
}
|
|
||||||
if m.id == nil || m.oldValue == nil {
|
|
||||||
return v, fmt.Errorf("OldHitGroupGear requires an ID field in the mutation")
|
|
||||||
}
|
|
||||||
oldValue, err := m.oldValue(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return v, fmt.Errorf("querying old value for OldHitGroupGear: %w", err)
|
|
||||||
}
|
|
||||||
return oldValue.HitGroupGear, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupGear adds u to the "hit_group_gear" field.
|
|
||||||
func (m *StatsMutation) AddHitGroupGear(u uint) {
|
|
||||||
if m.addhit_group_gear != nil {
|
|
||||||
*m.addhit_group_gear += u
|
|
||||||
} else {
|
|
||||||
m.addhit_group_gear = &u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedHitGroupGear returns the value that was added to the "hit_group_gear" field in this mutation.
|
|
||||||
func (m *StatsMutation) AddedHitGroupGear() (r uint, exists bool) {
|
|
||||||
v := m.addhit_group_gear
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupGear clears the value of the "hit_group_gear" field.
|
|
||||||
func (m *StatsMutation) ClearHitGroupGear() {
|
|
||||||
m.hit_group_gear = nil
|
|
||||||
m.addhit_group_gear = nil
|
|
||||||
m.clearedFields[stats.FieldHitGroupGear] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearCleared returns if the "hit_group_gear" field was cleared in this mutation.
|
|
||||||
func (m *StatsMutation) HitGroupGearCleared() bool {
|
|
||||||
_, ok := m.clearedFields[stats.FieldHitGroupGear]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResetHitGroupGear resets all changes to the "hit_group_gear" field.
|
|
||||||
func (m *StatsMutation) ResetHitGroupGear() {
|
|
||||||
m.hit_group_gear = nil
|
|
||||||
m.addhit_group_gear = nil
|
|
||||||
delete(m.clearedFields, stats.FieldHitGroupGear)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCrosshair sets the "crosshair" field.
|
// SetCrosshair sets the "crosshair" field.
|
||||||
func (m *StatsMutation) SetCrosshair(s string) {
|
func (m *StatsMutation) SetCrosshair(s string) {
|
||||||
m.crosshair = &s
|
m.crosshair = &s
|
||||||
@@ -6011,7 +5435,7 @@ func (m *StatsMutation) Type() string {
|
|||||||
// order to get all numeric fields that were incremented/decremented, call
|
// order to get all numeric fields that were incremented/decremented, call
|
||||||
// AddedFields().
|
// AddedFields().
|
||||||
func (m *StatsMutation) Fields() []string {
|
func (m *StatsMutation) Fields() []string {
|
||||||
fields := make([]string, 0, 39)
|
fields := make([]string, 0, 31)
|
||||||
if m.team_id != nil {
|
if m.team_id != nil {
|
||||||
fields = append(fields, stats.FieldTeamID)
|
fields = append(fields, stats.FieldTeamID)
|
||||||
}
|
}
|
||||||
@@ -6072,30 +5496,6 @@ func (m *StatsMutation) Fields() []string {
|
|||||||
if m.ud_smoke != nil {
|
if m.ud_smoke != nil {
|
||||||
fields = append(fields, stats.FieldUdSmoke)
|
fields = append(fields, stats.FieldUdSmoke)
|
||||||
}
|
}
|
||||||
if m.hit_group_head != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupHead)
|
|
||||||
}
|
|
||||||
if m.hit_group_chest != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupChest)
|
|
||||||
}
|
|
||||||
if m.hit_group_stomach != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupStomach)
|
|
||||||
}
|
|
||||||
if m.hit_group_left_arm != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftArm)
|
|
||||||
}
|
|
||||||
if m.hit_group_right_arm != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightArm)
|
|
||||||
}
|
|
||||||
if m.hit_group_left_leg != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftLeg)
|
|
||||||
}
|
|
||||||
if m.hit_group_right_leg != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightLeg)
|
|
||||||
}
|
|
||||||
if m.hit_group_gear != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupGear)
|
|
||||||
}
|
|
||||||
if m.crosshair != nil {
|
if m.crosshair != nil {
|
||||||
fields = append(fields, stats.FieldCrosshair)
|
fields = append(fields, stats.FieldCrosshair)
|
||||||
}
|
}
|
||||||
@@ -6177,22 +5577,6 @@ func (m *StatsMutation) Field(name string) (ent.Value, bool) {
|
|||||||
return m.UdDecoy()
|
return m.UdDecoy()
|
||||||
case stats.FieldUdSmoke:
|
case stats.FieldUdSmoke:
|
||||||
return m.UdSmoke()
|
return m.UdSmoke()
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
return m.HitGroupHead()
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
return m.HitGroupChest()
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
return m.HitGroupStomach()
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
return m.HitGroupLeftArm()
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
return m.HitGroupRightArm()
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
return m.HitGroupLeftLeg()
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
return m.HitGroupRightLeg()
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
return m.HitGroupGear()
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
return m.Crosshair()
|
return m.Crosshair()
|
||||||
case stats.FieldColor:
|
case stats.FieldColor:
|
||||||
@@ -6264,22 +5648,6 @@ func (m *StatsMutation) OldField(ctx context.Context, name string) (ent.Value, e
|
|||||||
return m.OldUdDecoy(ctx)
|
return m.OldUdDecoy(ctx)
|
||||||
case stats.FieldUdSmoke:
|
case stats.FieldUdSmoke:
|
||||||
return m.OldUdSmoke(ctx)
|
return m.OldUdSmoke(ctx)
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
return m.OldHitGroupHead(ctx)
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
return m.OldHitGroupChest(ctx)
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
return m.OldHitGroupStomach(ctx)
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
return m.OldHitGroupLeftArm(ctx)
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
return m.OldHitGroupRightArm(ctx)
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
return m.OldHitGroupLeftLeg(ctx)
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
return m.OldHitGroupRightLeg(ctx)
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
return m.OldHitGroupGear(ctx)
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
return m.OldCrosshair(ctx)
|
return m.OldCrosshair(ctx)
|
||||||
case stats.FieldColor:
|
case stats.FieldColor:
|
||||||
@@ -6451,62 +5819,6 @@ func (m *StatsMutation) SetField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.SetUdSmoke(v)
|
m.SetUdSmoke(v)
|
||||||
return nil
|
return nil
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupHead(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupChest(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupStomach(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupLeftArm(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupRightArm(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupLeftLeg(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupRightLeg(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.SetHitGroupGear(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
v, ok := value.(string)
|
v, ok := value.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -6652,30 +5964,6 @@ func (m *StatsMutation) AddedFields() []string {
|
|||||||
if m.addud_smoke != nil {
|
if m.addud_smoke != nil {
|
||||||
fields = append(fields, stats.FieldUdSmoke)
|
fields = append(fields, stats.FieldUdSmoke)
|
||||||
}
|
}
|
||||||
if m.addhit_group_head != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupHead)
|
|
||||||
}
|
|
||||||
if m.addhit_group_chest != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupChest)
|
|
||||||
}
|
|
||||||
if m.addhit_group_stomach != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupStomach)
|
|
||||||
}
|
|
||||||
if m.addhit_group_left_arm != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftArm)
|
|
||||||
}
|
|
||||||
if m.addhit_group_right_arm != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightArm)
|
|
||||||
}
|
|
||||||
if m.addhit_group_left_leg != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftLeg)
|
|
||||||
}
|
|
||||||
if m.addhit_group_right_leg != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightLeg)
|
|
||||||
}
|
|
||||||
if m.addhit_group_gear != nil {
|
|
||||||
fields = append(fields, stats.FieldHitGroupGear)
|
|
||||||
}
|
|
||||||
if m.addkast != nil {
|
if m.addkast != nil {
|
||||||
fields = append(fields, stats.FieldKast)
|
fields = append(fields, stats.FieldKast)
|
||||||
}
|
}
|
||||||
@@ -6745,22 +6033,6 @@ func (m *StatsMutation) AddedField(name string) (ent.Value, bool) {
|
|||||||
return m.AddedUdDecoy()
|
return m.AddedUdDecoy()
|
||||||
case stats.FieldUdSmoke:
|
case stats.FieldUdSmoke:
|
||||||
return m.AddedUdSmoke()
|
return m.AddedUdSmoke()
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
return m.AddedHitGroupHead()
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
return m.AddedHitGroupChest()
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
return m.AddedHitGroupStomach()
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
return m.AddedHitGroupLeftArm()
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
return m.AddedHitGroupRightArm()
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
return m.AddedHitGroupLeftLeg()
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
return m.AddedHitGroupRightLeg()
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
return m.AddedHitGroupGear()
|
|
||||||
case stats.FieldKast:
|
case stats.FieldKast:
|
||||||
return m.AddedKast()
|
return m.AddedKast()
|
||||||
case stats.FieldFlashDurationSelf:
|
case stats.FieldFlashDurationSelf:
|
||||||
@@ -6924,62 +6196,6 @@ func (m *StatsMutation) AddField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.AddUdSmoke(v)
|
m.AddUdSmoke(v)
|
||||||
return nil
|
return nil
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupHead(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupChest(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupStomach(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupLeftArm(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupRightArm(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupLeftLeg(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupRightLeg(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
v, ok := value.(uint)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddHitGroupGear(v)
|
|
||||||
return nil
|
|
||||||
case stats.FieldKast:
|
case stats.FieldKast:
|
||||||
v, ok := value.(int)
|
v, ok := value.(int)
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -7076,30 +6292,6 @@ func (m *StatsMutation) ClearedFields() []string {
|
|||||||
if m.FieldCleared(stats.FieldUdSmoke) {
|
if m.FieldCleared(stats.FieldUdSmoke) {
|
||||||
fields = append(fields, stats.FieldUdSmoke)
|
fields = append(fields, stats.FieldUdSmoke)
|
||||||
}
|
}
|
||||||
if m.FieldCleared(stats.FieldHitGroupHead) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupHead)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupChest) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupChest)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupStomach) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupStomach)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupLeftArm) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftArm)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupRightArm) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightArm)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupLeftLeg) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupLeftLeg)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupRightLeg) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupRightLeg)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldHitGroupGear) {
|
|
||||||
fields = append(fields, stats.FieldHitGroupGear)
|
|
||||||
}
|
|
||||||
if m.FieldCleared(stats.FieldCrosshair) {
|
if m.FieldCleared(stats.FieldCrosshair) {
|
||||||
fields = append(fields, stats.FieldCrosshair)
|
fields = append(fields, stats.FieldCrosshair)
|
||||||
}
|
}
|
||||||
@@ -7186,30 +6378,6 @@ func (m *StatsMutation) ClearField(name string) error {
|
|||||||
case stats.FieldUdSmoke:
|
case stats.FieldUdSmoke:
|
||||||
m.ClearUdSmoke()
|
m.ClearUdSmoke()
|
||||||
return nil
|
return nil
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
m.ClearHitGroupHead()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
m.ClearHitGroupChest()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
m.ClearHitGroupStomach()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
m.ClearHitGroupLeftArm()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
m.ClearHitGroupRightArm()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
m.ClearHitGroupLeftLeg()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
m.ClearHitGroupRightLeg()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
m.ClearHitGroupGear()
|
|
||||||
return nil
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
m.ClearCrosshair()
|
m.ClearCrosshair()
|
||||||
return nil
|
return nil
|
||||||
@@ -7311,30 +6479,6 @@ func (m *StatsMutation) ResetField(name string) error {
|
|||||||
case stats.FieldUdSmoke:
|
case stats.FieldUdSmoke:
|
||||||
m.ResetUdSmoke()
|
m.ResetUdSmoke()
|
||||||
return nil
|
return nil
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
m.ResetHitGroupHead()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
m.ResetHitGroupChest()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
m.ResetHitGroupStomach()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
m.ResetHitGroupLeftArm()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
m.ResetHitGroupRightArm()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
m.ResetHitGroupLeftLeg()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
m.ResetHitGroupRightLeg()
|
|
||||||
return nil
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
m.ResetHitGroupGear()
|
|
||||||
return nil
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
m.ResetCrosshair()
|
m.ResetCrosshair()
|
||||||
return nil
|
return nil
|
||||||
|
@@ -34,14 +34,6 @@ func (Stats) Fields() []ent.Field {
|
|||||||
field.Uint("ud_flash").Optional(),
|
field.Uint("ud_flash").Optional(),
|
||||||
field.Uint("ud_decoy").Optional(),
|
field.Uint("ud_decoy").Optional(),
|
||||||
field.Uint("ud_smoke").Optional(),
|
field.Uint("ud_smoke").Optional(),
|
||||||
field.Uint("hit_group_head").Optional(),
|
|
||||||
field.Uint("hit_group_chest").Optional(),
|
|
||||||
field.Uint("hit_group_stomach").Optional(),
|
|
||||||
field.Uint("hit_group_left_arm").Optional(),
|
|
||||||
field.Uint("hit_group_right_arm").Optional(),
|
|
||||||
field.Uint("hit_group_left_leg").Optional(),
|
|
||||||
field.Uint("hit_group_right_leg").Optional(),
|
|
||||||
field.Uint("hit_group_gear").Optional(),
|
|
||||||
field.String("crosshair").Optional(),
|
field.String("crosshair").Optional(),
|
||||||
field.Enum("color").Optional().Values("green", "yellow", "purple", "blue", "orange", "grey"),
|
field.Enum("color").Optional().Values("green", "yellow", "purple", "blue", "orange", "grey"),
|
||||||
field.Int("kast").Optional(),
|
field.Int("kast").Optional(),
|
||||||
|
82
ent/stats.go
82
ent/stats.go
@@ -57,22 +57,6 @@ type Stats struct {
|
|||||||
UdDecoy uint `json:"ud_decoy,omitempty"`
|
UdDecoy uint `json:"ud_decoy,omitempty"`
|
||||||
// UdSmoke holds the value of the "ud_smoke" field.
|
// UdSmoke holds the value of the "ud_smoke" field.
|
||||||
UdSmoke uint `json:"ud_smoke,omitempty"`
|
UdSmoke uint `json:"ud_smoke,omitempty"`
|
||||||
// HitGroupHead holds the value of the "hit_group_head" field.
|
|
||||||
HitGroupHead uint `json:"hit_group_head,omitempty"`
|
|
||||||
// HitGroupChest holds the value of the "hit_group_chest" field.
|
|
||||||
HitGroupChest uint `json:"hit_group_chest,omitempty"`
|
|
||||||
// HitGroupStomach holds the value of the "hit_group_stomach" field.
|
|
||||||
HitGroupStomach uint `json:"hit_group_stomach,omitempty"`
|
|
||||||
// HitGroupLeftArm holds the value of the "hit_group_left_arm" field.
|
|
||||||
HitGroupLeftArm uint `json:"hit_group_left_arm,omitempty"`
|
|
||||||
// HitGroupRightArm holds the value of the "hit_group_right_arm" field.
|
|
||||||
HitGroupRightArm uint `json:"hit_group_right_arm,omitempty"`
|
|
||||||
// HitGroupLeftLeg holds the value of the "hit_group_left_leg" field.
|
|
||||||
HitGroupLeftLeg uint `json:"hit_group_left_leg,omitempty"`
|
|
||||||
// HitGroupRightLeg holds the value of the "hit_group_right_leg" field.
|
|
||||||
HitGroupRightLeg uint `json:"hit_group_right_leg,omitempty"`
|
|
||||||
// HitGroupGear holds the value of the "hit_group_gear" field.
|
|
||||||
HitGroupGear uint `json:"hit_group_gear,omitempty"`
|
|
||||||
// Crosshair holds the value of the "crosshair" field.
|
// Crosshair holds the value of the "crosshair" field.
|
||||||
Crosshair string `json:"crosshair,omitempty"`
|
Crosshair string `json:"crosshair,omitempty"`
|
||||||
// Color holds the value of the "color" field.
|
// Color holds the value of the "color" field.
|
||||||
@@ -168,7 +152,7 @@ func (*Stats) scanValues(columns []string) ([]interface{}, error) {
|
|||||||
switch columns[i] {
|
switch columns[i] {
|
||||||
case stats.FieldFlashDurationSelf, stats.FieldFlashDurationTeam, stats.FieldFlashDurationEnemy:
|
case stats.FieldFlashDurationSelf, stats.FieldFlashDurationTeam, stats.FieldFlashDurationEnemy:
|
||||||
values[i] = new(sql.NullFloat64)
|
values[i] = new(sql.NullFloat64)
|
||||||
case stats.FieldID, stats.FieldTeamID, stats.FieldKills, stats.FieldDeaths, stats.FieldAssists, stats.FieldHeadshot, stats.FieldMvp, stats.FieldScore, stats.FieldRankNew, stats.FieldRankOld, stats.FieldMk2, stats.FieldMk3, stats.FieldMk4, stats.FieldMk5, stats.FieldDmgEnemy, stats.FieldDmgTeam, stats.FieldUdHe, stats.FieldUdFlames, stats.FieldUdFlash, stats.FieldUdDecoy, stats.FieldUdSmoke, stats.FieldHitGroupHead, stats.FieldHitGroupChest, stats.FieldHitGroupStomach, stats.FieldHitGroupLeftArm, stats.FieldHitGroupRightArm, stats.FieldHitGroupLeftLeg, stats.FieldHitGroupRightLeg, stats.FieldHitGroupGear, stats.FieldKast, stats.FieldFlashTotalSelf, stats.FieldFlashTotalTeam, stats.FieldFlashTotalEnemy, stats.FieldMatchStats, stats.FieldPlayerStats:
|
case stats.FieldID, stats.FieldTeamID, stats.FieldKills, stats.FieldDeaths, stats.FieldAssists, stats.FieldHeadshot, stats.FieldMvp, stats.FieldScore, stats.FieldRankNew, stats.FieldRankOld, stats.FieldMk2, stats.FieldMk3, stats.FieldMk4, stats.FieldMk5, stats.FieldDmgEnemy, stats.FieldDmgTeam, stats.FieldUdHe, stats.FieldUdFlames, stats.FieldUdFlash, stats.FieldUdDecoy, stats.FieldUdSmoke, stats.FieldKast, stats.FieldFlashTotalSelf, stats.FieldFlashTotalTeam, stats.FieldFlashTotalEnemy, stats.FieldMatchStats, stats.FieldPlayerStats:
|
||||||
values[i] = new(sql.NullInt64)
|
values[i] = new(sql.NullInt64)
|
||||||
case stats.FieldCrosshair, stats.FieldColor:
|
case stats.FieldCrosshair, stats.FieldColor:
|
||||||
values[i] = new(sql.NullString)
|
values[i] = new(sql.NullString)
|
||||||
@@ -313,54 +297,6 @@ func (s *Stats) assignValues(columns []string, values []interface{}) error {
|
|||||||
} else if value.Valid {
|
} else if value.Valid {
|
||||||
s.UdSmoke = uint(value.Int64)
|
s.UdSmoke = uint(value.Int64)
|
||||||
}
|
}
|
||||||
case stats.FieldHitGroupHead:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_head", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupHead = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupChest:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_chest", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupChest = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupStomach:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_stomach", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupStomach = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupLeftArm:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_left_arm", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupLeftArm = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupRightArm:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_right_arm", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupRightArm = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupLeftLeg:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_left_leg", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupLeftLeg = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupRightLeg:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_right_leg", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupRightLeg = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldHitGroupGear:
|
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field hit_group_gear", values[i])
|
|
||||||
} else if value.Valid {
|
|
||||||
s.HitGroupGear = uint(value.Int64)
|
|
||||||
}
|
|
||||||
case stats.FieldCrosshair:
|
case stats.FieldCrosshair:
|
||||||
if value, ok := values[i].(*sql.NullString); !ok {
|
if value, ok := values[i].(*sql.NullString); !ok {
|
||||||
return fmt.Errorf("unexpected type %T for field crosshair", values[i])
|
return fmt.Errorf("unexpected type %T for field crosshair", values[i])
|
||||||
@@ -515,22 +451,6 @@ func (s *Stats) String() string {
|
|||||||
builder.WriteString(fmt.Sprintf("%v", s.UdDecoy))
|
builder.WriteString(fmt.Sprintf("%v", s.UdDecoy))
|
||||||
builder.WriteString(", ud_smoke=")
|
builder.WriteString(", ud_smoke=")
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.UdSmoke))
|
builder.WriteString(fmt.Sprintf("%v", s.UdSmoke))
|
||||||
builder.WriteString(", hit_group_head=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupHead))
|
|
||||||
builder.WriteString(", hit_group_chest=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupChest))
|
|
||||||
builder.WriteString(", hit_group_stomach=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupStomach))
|
|
||||||
builder.WriteString(", hit_group_left_arm=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupLeftArm))
|
|
||||||
builder.WriteString(", hit_group_right_arm=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupRightArm))
|
|
||||||
builder.WriteString(", hit_group_left_leg=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupLeftLeg))
|
|
||||||
builder.WriteString(", hit_group_right_leg=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupRightLeg))
|
|
||||||
builder.WriteString(", hit_group_gear=")
|
|
||||||
builder.WriteString(fmt.Sprintf("%v", s.HitGroupGear))
|
|
||||||
builder.WriteString(", crosshair=")
|
builder.WriteString(", crosshair=")
|
||||||
builder.WriteString(s.Crosshair)
|
builder.WriteString(s.Crosshair)
|
||||||
builder.WriteString(", color=")
|
builder.WriteString(", color=")
|
||||||
|
@@ -51,22 +51,6 @@ const (
|
|||||||
FieldUdDecoy = "ud_decoy"
|
FieldUdDecoy = "ud_decoy"
|
||||||
// FieldUdSmoke holds the string denoting the ud_smoke field in the database.
|
// FieldUdSmoke holds the string denoting the ud_smoke field in the database.
|
||||||
FieldUdSmoke = "ud_smoke"
|
FieldUdSmoke = "ud_smoke"
|
||||||
// FieldHitGroupHead holds the string denoting the hit_group_head field in the database.
|
|
||||||
FieldHitGroupHead = "hit_group_head"
|
|
||||||
// FieldHitGroupChest holds the string denoting the hit_group_chest field in the database.
|
|
||||||
FieldHitGroupChest = "hit_group_chest"
|
|
||||||
// FieldHitGroupStomach holds the string denoting the hit_group_stomach field in the database.
|
|
||||||
FieldHitGroupStomach = "hit_group_stomach"
|
|
||||||
// FieldHitGroupLeftArm holds the string denoting the hit_group_left_arm field in the database.
|
|
||||||
FieldHitGroupLeftArm = "hit_group_left_arm"
|
|
||||||
// FieldHitGroupRightArm holds the string denoting the hit_group_right_arm field in the database.
|
|
||||||
FieldHitGroupRightArm = "hit_group_right_arm"
|
|
||||||
// FieldHitGroupLeftLeg holds the string denoting the hit_group_left_leg field in the database.
|
|
||||||
FieldHitGroupLeftLeg = "hit_group_left_leg"
|
|
||||||
// FieldHitGroupRightLeg holds the string denoting the hit_group_right_leg field in the database.
|
|
||||||
FieldHitGroupRightLeg = "hit_group_right_leg"
|
|
||||||
// FieldHitGroupGear holds the string denoting the hit_group_gear field in the database.
|
|
||||||
FieldHitGroupGear = "hit_group_gear"
|
|
||||||
// FieldCrosshair holds the string denoting the crosshair field in the database.
|
// FieldCrosshair holds the string denoting the crosshair field in the database.
|
||||||
FieldCrosshair = "crosshair"
|
FieldCrosshair = "crosshair"
|
||||||
// FieldColor holds the string denoting the color field in the database.
|
// FieldColor holds the string denoting the color field in the database.
|
||||||
@@ -152,14 +136,6 @@ var Columns = []string{
|
|||||||
FieldUdFlash,
|
FieldUdFlash,
|
||||||
FieldUdDecoy,
|
FieldUdDecoy,
|
||||||
FieldUdSmoke,
|
FieldUdSmoke,
|
||||||
FieldHitGroupHead,
|
|
||||||
FieldHitGroupChest,
|
|
||||||
FieldHitGroupStomach,
|
|
||||||
FieldHitGroupLeftArm,
|
|
||||||
FieldHitGroupRightArm,
|
|
||||||
FieldHitGroupLeftLeg,
|
|
||||||
FieldHitGroupRightLeg,
|
|
||||||
FieldHitGroupGear,
|
|
||||||
FieldCrosshair,
|
FieldCrosshair,
|
||||||
FieldColor,
|
FieldColor,
|
||||||
FieldKast,
|
FieldKast,
|
||||||
|
@@ -232,62 +232,6 @@ func UdSmoke(v uint) predicate.Stats {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// HitGroupHead applies equality check predicate on the "hit_group_head" field. It's identical to HitGroupHeadEQ.
|
|
||||||
func HitGroupHead(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChest applies equality check predicate on the "hit_group_chest" field. It's identical to HitGroupChestEQ.
|
|
||||||
func HitGroupChest(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomach applies equality check predicate on the "hit_group_stomach" field. It's identical to HitGroupStomachEQ.
|
|
||||||
func HitGroupStomach(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArm applies equality check predicate on the "hit_group_left_arm" field. It's identical to HitGroupLeftArmEQ.
|
|
||||||
func HitGroupLeftArm(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArm applies equality check predicate on the "hit_group_right_arm" field. It's identical to HitGroupRightArmEQ.
|
|
||||||
func HitGroupRightArm(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLeg applies equality check predicate on the "hit_group_left_leg" field. It's identical to HitGroupLeftLegEQ.
|
|
||||||
func HitGroupLeftLeg(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLeg applies equality check predicate on the "hit_group_right_leg" field. It's identical to HitGroupRightLegEQ.
|
|
||||||
func HitGroupRightLeg(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGear applies equality check predicate on the "hit_group_gear" field. It's identical to HitGroupGearEQ.
|
|
||||||
func HitGroupGear(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Crosshair applies equality check predicate on the "crosshair" field. It's identical to CrosshairEQ.
|
// Crosshair applies equality check predicate on the "crosshair" field. It's identical to CrosshairEQ.
|
||||||
func Crosshair(v string) predicate.Stats {
|
func Crosshair(v string) predicate.Stats {
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
return predicate.Stats(func(s *sql.Selector) {
|
||||||
@@ -2060,726 +2004,6 @@ func UdSmokeNotNil() predicate.Stats {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// HitGroupHeadEQ applies the EQ predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadNEQ applies the NEQ predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadIn applies the In predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupHead), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadNotIn applies the NotIn predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupHead), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadGT applies the GT predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadGTE applies the GTE predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadLT applies the LT predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadLTE applies the LTE predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupHead), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadIsNil applies the IsNil predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupHead)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupHeadNotNil applies the NotNil predicate on the "hit_group_head" field.
|
|
||||||
func HitGroupHeadNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupHead)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestEQ applies the EQ predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestNEQ applies the NEQ predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestIn applies the In predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupChest), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestNotIn applies the NotIn predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupChest), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestGT applies the GT predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestGTE applies the GTE predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestLT applies the LT predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestLTE applies the LTE predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupChest), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestIsNil applies the IsNil predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupChest)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupChestNotNil applies the NotNil predicate on the "hit_group_chest" field.
|
|
||||||
func HitGroupChestNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupChest)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachEQ applies the EQ predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachNEQ applies the NEQ predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachIn applies the In predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupStomach), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachNotIn applies the NotIn predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupStomach), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachGT applies the GT predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachGTE applies the GTE predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachLT applies the LT predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachLTE applies the LTE predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupStomach), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachIsNil applies the IsNil predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupStomach)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupStomachNotNil applies the NotNil predicate on the "hit_group_stomach" field.
|
|
||||||
func HitGroupStomachNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupStomach)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmEQ applies the EQ predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmNEQ applies the NEQ predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmIn applies the In predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupLeftArm), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmNotIn applies the NotIn predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupLeftArm), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmGT applies the GT predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmGTE applies the GTE predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmLT applies the LT predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmLTE applies the LTE predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupLeftArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmIsNil applies the IsNil predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupLeftArm)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftArmNotNil applies the NotNil predicate on the "hit_group_left_arm" field.
|
|
||||||
func HitGroupLeftArmNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupLeftArm)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmEQ applies the EQ predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmNEQ applies the NEQ predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmIn applies the In predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupRightArm), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmNotIn applies the NotIn predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupRightArm), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmGT applies the GT predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmGTE applies the GTE predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmLT applies the LT predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmLTE applies the LTE predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupRightArm), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmIsNil applies the IsNil predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupRightArm)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightArmNotNil applies the NotNil predicate on the "hit_group_right_arm" field.
|
|
||||||
func HitGroupRightArmNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupRightArm)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegEQ applies the EQ predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegNEQ applies the NEQ predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegIn applies the In predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupLeftLeg), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegNotIn applies the NotIn predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupLeftLeg), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegGT applies the GT predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegGTE applies the GTE predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegLT applies the LT predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegLTE applies the LTE predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupLeftLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegIsNil applies the IsNil predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupLeftLeg)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupLeftLegNotNil applies the NotNil predicate on the "hit_group_left_leg" field.
|
|
||||||
func HitGroupLeftLegNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupLeftLeg)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegEQ applies the EQ predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegNEQ applies the NEQ predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegIn applies the In predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupRightLeg), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegNotIn applies the NotIn predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupRightLeg), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegGT applies the GT predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegGTE applies the GTE predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegLT applies the LT predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegLTE applies the LTE predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupRightLeg), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegIsNil applies the IsNil predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupRightLeg)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupRightLegNotNil applies the NotNil predicate on the "hit_group_right_leg" field.
|
|
||||||
func HitGroupRightLegNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupRightLeg)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearEQ applies the EQ predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.EQ(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearNEQ applies the NEQ predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearNEQ(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NEQ(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearIn applies the In predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.In(s.C(FieldHitGroupGear), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearNotIn applies the NotIn predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearNotIn(vs ...uint) predicate.Stats {
|
|
||||||
v := make([]interface{}, len(vs))
|
|
||||||
for i := range v {
|
|
||||||
v[i] = vs[i]
|
|
||||||
}
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
// if not arguments were provided, append the FALSE constants,
|
|
||||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
||||||
if len(v) == 0 {
|
|
||||||
s.Where(sql.False())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.Where(sql.NotIn(s.C(FieldHitGroupGear), v...))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearGT applies the GT predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearGT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GT(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearGTE applies the GTE predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearGTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.GTE(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearLT applies the LT predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearLT(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LT(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearLTE applies the LTE predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearLTE(v uint) predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.LTE(s.C(FieldHitGroupGear), v))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearIsNil applies the IsNil predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearIsNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.IsNull(s.C(FieldHitGroupGear)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// HitGroupGearNotNil applies the NotNil predicate on the "hit_group_gear" field.
|
|
||||||
func HitGroupGearNotNil() predicate.Stats {
|
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
|
||||||
s.Where(sql.NotNull(s.C(FieldHitGroupGear)))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// CrosshairEQ applies the EQ predicate on the "crosshair" field.
|
// CrosshairEQ applies the EQ predicate on the "crosshair" field.
|
||||||
func CrosshairEQ(v string) predicate.Stats {
|
func CrosshairEQ(v string) predicate.Stats {
|
||||||
return predicate.Stats(func(s *sql.Selector) {
|
return predicate.Stats(func(s *sql.Selector) {
|
||||||
|
@@ -247,118 +247,6 @@ func (sc *StatsCreate) SetNillableUdSmoke(u *uint) *StatsCreate {
|
|||||||
return sc
|
return sc
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHitGroupHead sets the "hit_group_head" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupHead(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupHead(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupHead sets the "hit_group_head" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupHead(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupHead(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupChest sets the "hit_group_chest" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupChest(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupChest(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupChest sets the "hit_group_chest" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupChest(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupChest(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupStomach sets the "hit_group_stomach" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupStomach(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupStomach(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupStomach sets the "hit_group_stomach" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupStomach(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupStomach(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftArm sets the "hit_group_left_arm" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupLeftArm(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupLeftArm(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftArm sets the "hit_group_left_arm" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupLeftArm(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupLeftArm(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightArm sets the "hit_group_right_arm" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupRightArm(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupRightArm(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightArm sets the "hit_group_right_arm" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupRightArm(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupRightArm(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftLeg sets the "hit_group_left_leg" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupLeftLeg(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupLeftLeg(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftLeg sets the "hit_group_left_leg" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupLeftLeg(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupLeftLeg(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightLeg sets the "hit_group_right_leg" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupRightLeg(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupRightLeg(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightLeg sets the "hit_group_right_leg" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupRightLeg(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupRightLeg(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupGear sets the "hit_group_gear" field.
|
|
||||||
func (sc *StatsCreate) SetHitGroupGear(u uint) *StatsCreate {
|
|
||||||
sc.mutation.SetHitGroupGear(u)
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupGear sets the "hit_group_gear" field if the given value is not nil.
|
|
||||||
func (sc *StatsCreate) SetNillableHitGroupGear(u *uint) *StatsCreate {
|
|
||||||
if u != nil {
|
|
||||||
sc.SetHitGroupGear(*u)
|
|
||||||
}
|
|
||||||
return sc
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCrosshair sets the "crosshair" field.
|
// SetCrosshair sets the "crosshair" field.
|
||||||
func (sc *StatsCreate) SetCrosshair(s string) *StatsCreate {
|
func (sc *StatsCreate) SetCrosshair(s string) *StatsCreate {
|
||||||
sc.mutation.SetCrosshair(s)
|
sc.mutation.SetCrosshair(s)
|
||||||
@@ -864,70 +752,6 @@ func (sc *StatsCreate) createSpec() (*Stats, *sqlgraph.CreateSpec) {
|
|||||||
})
|
})
|
||||||
_node.UdSmoke = value
|
_node.UdSmoke = value
|
||||||
}
|
}
|
||||||
if value, ok := sc.mutation.HitGroupHead(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
_node.HitGroupHead = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupChest(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
_node.HitGroupChest = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupStomach(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
_node.HitGroupStomach = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupLeftArm(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
_node.HitGroupLeftArm = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupRightArm(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
_node.HitGroupRightArm = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupLeftLeg(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
_node.HitGroupLeftLeg = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupRightLeg(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
_node.HitGroupRightLeg = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.HitGroupGear(); ok {
|
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
_node.HitGroupGear = value
|
|
||||||
}
|
|
||||||
if value, ok := sc.mutation.Crosshair(); ok {
|
if value, ok := sc.mutation.Crosshair(); ok {
|
||||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||||
Type: field.TypeString,
|
Type: field.TypeString,
|
||||||
|
@@ -472,222 +472,6 @@ func (su *StatsUpdate) ClearUdSmoke() *StatsUpdate {
|
|||||||
return su
|
return su
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHitGroupHead sets the "hit_group_head" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupHead(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupHead()
|
|
||||||
su.mutation.SetHitGroupHead(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupHead sets the "hit_group_head" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupHead(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupHead(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupHead adds u to the "hit_group_head" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupHead(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupHead(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupHead clears the value of the "hit_group_head" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupHead() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupHead()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupChest sets the "hit_group_chest" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupChest(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupChest()
|
|
||||||
su.mutation.SetHitGroupChest(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupChest sets the "hit_group_chest" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupChest(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupChest(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupChest adds u to the "hit_group_chest" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupChest(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupChest(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupChest clears the value of the "hit_group_chest" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupChest() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupChest()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupStomach sets the "hit_group_stomach" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupStomach(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupStomach()
|
|
||||||
su.mutation.SetHitGroupStomach(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupStomach sets the "hit_group_stomach" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupStomach(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupStomach(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupStomach adds u to the "hit_group_stomach" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupStomach(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupStomach(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupStomach clears the value of the "hit_group_stomach" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupStomach() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupStomach()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftArm sets the "hit_group_left_arm" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupLeftArm(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupLeftArm()
|
|
||||||
su.mutation.SetHitGroupLeftArm(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftArm sets the "hit_group_left_arm" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupLeftArm(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupLeftArm(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftArm adds u to the "hit_group_left_arm" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupLeftArm(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupLeftArm(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftArm clears the value of the "hit_group_left_arm" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupLeftArm() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupLeftArm()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightArm sets the "hit_group_right_arm" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupRightArm(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupRightArm()
|
|
||||||
su.mutation.SetHitGroupRightArm(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightArm sets the "hit_group_right_arm" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupRightArm(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupRightArm(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightArm adds u to the "hit_group_right_arm" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupRightArm(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupRightArm(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightArm clears the value of the "hit_group_right_arm" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupRightArm() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupRightArm()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftLeg sets the "hit_group_left_leg" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupLeftLeg(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupLeftLeg()
|
|
||||||
su.mutation.SetHitGroupLeftLeg(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftLeg sets the "hit_group_left_leg" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupLeftLeg(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupLeftLeg(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftLeg adds u to the "hit_group_left_leg" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupLeftLeg(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupLeftLeg(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftLeg clears the value of the "hit_group_left_leg" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupLeftLeg() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupLeftLeg()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightLeg sets the "hit_group_right_leg" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupRightLeg(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupRightLeg()
|
|
||||||
su.mutation.SetHitGroupRightLeg(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightLeg sets the "hit_group_right_leg" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupRightLeg(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupRightLeg(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightLeg adds u to the "hit_group_right_leg" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupRightLeg(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupRightLeg(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightLeg clears the value of the "hit_group_right_leg" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupRightLeg() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupRightLeg()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupGear sets the "hit_group_gear" field.
|
|
||||||
func (su *StatsUpdate) SetHitGroupGear(u uint) *StatsUpdate {
|
|
||||||
su.mutation.ResetHitGroupGear()
|
|
||||||
su.mutation.SetHitGroupGear(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupGear sets the "hit_group_gear" field if the given value is not nil.
|
|
||||||
func (su *StatsUpdate) SetNillableHitGroupGear(u *uint) *StatsUpdate {
|
|
||||||
if u != nil {
|
|
||||||
su.SetHitGroupGear(*u)
|
|
||||||
}
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupGear adds u to the "hit_group_gear" field.
|
|
||||||
func (su *StatsUpdate) AddHitGroupGear(u uint) *StatsUpdate {
|
|
||||||
su.mutation.AddHitGroupGear(u)
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupGear clears the value of the "hit_group_gear" field.
|
|
||||||
func (su *StatsUpdate) ClearHitGroupGear() *StatsUpdate {
|
|
||||||
su.mutation.ClearHitGroupGear()
|
|
||||||
return su
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCrosshair sets the "crosshair" field.
|
// SetCrosshair sets the "crosshair" field.
|
||||||
func (su *StatsUpdate) SetCrosshair(s string) *StatsUpdate {
|
func (su *StatsUpdate) SetCrosshair(s string) *StatsUpdate {
|
||||||
su.mutation.SetCrosshair(s)
|
su.mutation.SetCrosshair(s)
|
||||||
@@ -1530,166 +1314,6 @@ func (su *StatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||||||
Column: stats.FieldUdSmoke,
|
Column: stats.FieldUdSmoke,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if value, ok := su.mutation.HitGroupHead(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupHead(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupHeadCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupChest(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupChest(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupChestCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupStomach(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupStomach(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupStomachCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupLeftArm(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupLeftArm(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupLeftArmCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupRightArm(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupRightArm(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupRightArmCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupLeftLeg(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupLeftLeg(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupLeftLegCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupRightLeg(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupRightLeg(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupRightLegCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.HitGroupGear(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.AddedHitGroupGear(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if su.mutation.HitGroupGearCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := su.mutation.Crosshair(); ok {
|
if value, ok := su.mutation.Crosshair(); ok {
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||||
Type: field.TypeString,
|
Type: field.TypeString,
|
||||||
@@ -2495,222 +2119,6 @@ func (suo *StatsUpdateOne) ClearUdSmoke() *StatsUpdateOne {
|
|||||||
return suo
|
return suo
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHitGroupHead sets the "hit_group_head" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupHead(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupHead()
|
|
||||||
suo.mutation.SetHitGroupHead(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupHead sets the "hit_group_head" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupHead(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupHead(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupHead adds u to the "hit_group_head" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupHead(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupHead(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupHead clears the value of the "hit_group_head" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupHead() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupHead()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupChest sets the "hit_group_chest" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupChest(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupChest()
|
|
||||||
suo.mutation.SetHitGroupChest(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupChest sets the "hit_group_chest" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupChest(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupChest(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupChest adds u to the "hit_group_chest" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupChest(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupChest(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupChest clears the value of the "hit_group_chest" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupChest() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupChest()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupStomach sets the "hit_group_stomach" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupStomach(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupStomach()
|
|
||||||
suo.mutation.SetHitGroupStomach(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupStomach sets the "hit_group_stomach" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupStomach(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupStomach(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupStomach adds u to the "hit_group_stomach" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupStomach(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupStomach(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupStomach clears the value of the "hit_group_stomach" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupStomach() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupStomach()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftArm sets the "hit_group_left_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupLeftArm(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupLeftArm()
|
|
||||||
suo.mutation.SetHitGroupLeftArm(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftArm sets the "hit_group_left_arm" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupLeftArm(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupLeftArm(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftArm adds u to the "hit_group_left_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupLeftArm(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupLeftArm(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftArm clears the value of the "hit_group_left_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupLeftArm() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupLeftArm()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightArm sets the "hit_group_right_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupRightArm(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupRightArm()
|
|
||||||
suo.mutation.SetHitGroupRightArm(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightArm sets the "hit_group_right_arm" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupRightArm(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupRightArm(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightArm adds u to the "hit_group_right_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupRightArm(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupRightArm(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightArm clears the value of the "hit_group_right_arm" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupRightArm() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupRightArm()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupLeftLeg sets the "hit_group_left_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupLeftLeg(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupLeftLeg()
|
|
||||||
suo.mutation.SetHitGroupLeftLeg(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupLeftLeg sets the "hit_group_left_leg" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupLeftLeg(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupLeftLeg(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupLeftLeg adds u to the "hit_group_left_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupLeftLeg(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupLeftLeg(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupLeftLeg clears the value of the "hit_group_left_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupLeftLeg() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupLeftLeg()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupRightLeg sets the "hit_group_right_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupRightLeg(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupRightLeg()
|
|
||||||
suo.mutation.SetHitGroupRightLeg(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupRightLeg sets the "hit_group_right_leg" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupRightLeg(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupRightLeg(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupRightLeg adds u to the "hit_group_right_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupRightLeg(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupRightLeg(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupRightLeg clears the value of the "hit_group_right_leg" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupRightLeg() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupRightLeg()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHitGroupGear sets the "hit_group_gear" field.
|
|
||||||
func (suo *StatsUpdateOne) SetHitGroupGear(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.ResetHitGroupGear()
|
|
||||||
suo.mutation.SetHitGroupGear(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetNillableHitGroupGear sets the "hit_group_gear" field if the given value is not nil.
|
|
||||||
func (suo *StatsUpdateOne) SetNillableHitGroupGear(u *uint) *StatsUpdateOne {
|
|
||||||
if u != nil {
|
|
||||||
suo.SetHitGroupGear(*u)
|
|
||||||
}
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddHitGroupGear adds u to the "hit_group_gear" field.
|
|
||||||
func (suo *StatsUpdateOne) AddHitGroupGear(u uint) *StatsUpdateOne {
|
|
||||||
suo.mutation.AddHitGroupGear(u)
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearHitGroupGear clears the value of the "hit_group_gear" field.
|
|
||||||
func (suo *StatsUpdateOne) ClearHitGroupGear() *StatsUpdateOne {
|
|
||||||
suo.mutation.ClearHitGroupGear()
|
|
||||||
return suo
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCrosshair sets the "crosshair" field.
|
// SetCrosshair sets the "crosshair" field.
|
||||||
func (suo *StatsUpdateOne) SetCrosshair(s string) *StatsUpdateOne {
|
func (suo *StatsUpdateOne) SetCrosshair(s string) *StatsUpdateOne {
|
||||||
suo.mutation.SetCrosshair(s)
|
suo.mutation.SetCrosshair(s)
|
||||||
@@ -3577,166 +2985,6 @@ func (suo *StatsUpdateOne) sqlSave(ctx context.Context) (_node *Stats, err error
|
|||||||
Column: stats.FieldUdSmoke,
|
Column: stats.FieldUdSmoke,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if value, ok := suo.mutation.HitGroupHead(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupHead(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupHeadCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupHead,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupChest(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupChest(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupChestCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupChest,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupStomach(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupStomach(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupStomachCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupStomach,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupLeftArm(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupLeftArm(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupLeftArmCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupLeftArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupRightArm(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupRightArm(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupRightArmCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupRightArm,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupLeftLeg(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupLeftLeg(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupLeftLegCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupLeftLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupRightLeg(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupRightLeg(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupRightLegCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupRightLeg,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.HitGroupGear(); ok {
|
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.AddedHitGroupGear(); ok {
|
|
||||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Value: value,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if suo.mutation.HitGroupGearCleared() {
|
|
||||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
|
||||||
Type: field.TypeUint,
|
|
||||||
Column: stats.FieldHitGroupGear,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if value, ok := suo.mutation.Crosshair(); ok {
|
if value, ok := suo.mutation.Crosshair(); ok {
|
||||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||||
Type: field.TypeString,
|
Type: field.TypeString,
|
||||||
|
16
main.go
16
main.go
@@ -147,7 +147,7 @@ func housekeeping() {
|
|||||||
func getPlayer(w http.ResponseWriter, r *http.Request) {
|
func getPlayer(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Access-Control-Allow-Origin", conf.Httpd.CORSAllowDomains)
|
w.Header().Set("Access-Control-Allow-Origin", conf.Httpd.CORSAllowDomains)
|
||||||
id := mux.Vars(r)["id"]
|
id := mux.Vars(r)["id"]
|
||||||
tPlayer, err := utils.GetPlayer(db, id, conf.Steam.APIKey, rL)
|
tPlayer, err := utils.GetPlayer(db, id, conf.Steam.APIKey, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Infof("[GP] Player not found: %+v", err)
|
log.Infof("[GP] Player not found: %+v", err)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
@@ -301,14 +301,14 @@ func deletePlayerTrack(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
tPlayer, err := utils.GetPlayer(db, id, conf.Steam.APIKey, rL)
|
tPlayer, err := utils.GetPlayer(db, id, conf.Steam.APIKey, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Infof("[PPT] player not found: %+v", err)
|
log.Infof("[PPT] player not found: %+v", err)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = utils.IsAuthCodeValid(tPlayer, db.Lock, conf.Steam.APIKey, "", authCode, rL)
|
_, err = utils.IsAuthCodeValid(tPlayer, db.Lock, conf.Steam.APIKey, "", authCode, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
switch e := err.(type) {
|
switch e := err.(type) {
|
||||||
case utils.AuthcodeUnauthorizedError:
|
case utils.AuthcodeUnauthorizedError:
|
||||||
@@ -617,16 +617,6 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
|
|||||||
Decoy: iStats.UdDecoy,
|
Decoy: iStats.UdDecoy,
|
||||||
Flames: iStats.UdFlames,
|
Flames: iStats.UdFlames,
|
||||||
},
|
},
|
||||||
HitGroup: &utils.HitGroup{
|
|
||||||
Gear: iStats.HitGroupGear,
|
|
||||||
LeftLeg: iStats.HitGroupLeftLeg,
|
|
||||||
RightLeg: iStats.HitGroupRightLeg,
|
|
||||||
RightArm: iStats.HitGroupRightArm,
|
|
||||||
LeftArm: iStats.HitGroupLeftArm,
|
|
||||||
Stomach: iStats.HitGroupStomach,
|
|
||||||
Chest: iStats.HitGroupChest,
|
|
||||||
Head: iStats.HitGroupHead,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Color: iStats.Color.String(),
|
Color: iStats.Color.String(),
|
||||||
Crosshair: iStats.Crosshair,
|
Crosshair: iStats.Crosshair,
|
||||||
|
@@ -96,17 +96,6 @@ type Rank struct {
|
|||||||
New int `json:"new,omitempty"`
|
New int `json:"new,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HitGroup struct {
|
|
||||||
Head uint `json:"head,omitempty"`
|
|
||||||
Chest uint `json:"chest,omitempty"`
|
|
||||||
Stomach uint `json:"stomach,omitempty"`
|
|
||||||
LeftArm uint `json:"left_arm,omitempty"`
|
|
||||||
RightArm uint `json:"right_arm,omitempty"`
|
|
||||||
LeftLeg uint `json:"left_leg,omitempty"`
|
|
||||||
RightLeg uint `json:"right_leg,omitempty"`
|
|
||||||
Gear uint `json:"gear,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UD struct {
|
type UD struct {
|
||||||
HE uint `json:"he,omitempty"`
|
HE uint `json:"he,omitempty"`
|
||||||
Flames uint `json:"flames,omitempty"`
|
Flames uint `json:"flames,omitempty"`
|
||||||
@@ -116,10 +105,9 @@ type UD struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Damage struct {
|
type Damage struct {
|
||||||
Enemy uint `json:"enemy,omitempty"`
|
Enemy uint `json:"enemy,omitempty"`
|
||||||
Team uint `json:"team,omitempty"`
|
Team uint `json:"team,omitempty"`
|
||||||
UD *UD `json:"ud,omitempty"`
|
UD *UD `json:"ud,omitempty"`
|
||||||
HitGroup *HitGroup `json:"hit_group,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type SelfTeamEnemy struct {
|
type SelfTeamEnemy struct {
|
||||||
@@ -270,7 +258,7 @@ func IsAuthCodeValid(player *ent.Player, lock *sync.RWMutex, apiKey string, shar
|
|||||||
var err error
|
var err error
|
||||||
if shareCode == "" {
|
if shareCode == "" {
|
||||||
lock.RLock()
|
lock.RLock()
|
||||||
tMatch, err = player.QueryMatches().Order(ent.Desc(match.FieldDate)).First(context.Background())
|
tMatch, err = player.QueryMatches().Order(ent.Asc(match.FieldDate)).Limit(1).Only(context.Background())
|
||||||
lock.RUnlock()
|
lock.RUnlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
@@ -292,7 +280,7 @@ func IsAuthCodeValid(player *ent.Player, lock *sync.RWMutex, apiKey string, shar
|
|||||||
|
|
||||||
func GetNewShareCodesForPlayer(player *ent.Player, lock *sync.RWMutex, apiKey string, rl ratelimit.Limiter) ([]string, error) {
|
func GetNewShareCodesForPlayer(player *ent.Player, lock *sync.RWMutex, apiKey string, rl ratelimit.Limiter) ([]string, error) {
|
||||||
lock.RLock()
|
lock.RLock()
|
||||||
tMatch, err := player.QueryMatches().Order(ent.Desc(match.FieldDate)).First(context.Background())
|
tMatch, err := player.QueryMatches().Order(ent.Desc(match.FieldDate)).Limit(1).Only(context.Background())
|
||||||
lock.RUnlock()
|
lock.RUnlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -327,7 +315,9 @@ func getNextShareCode(lastCode string, apiKey string, authCode string, steamId u
|
|||||||
return "", fmt.Errorf("invalid arguments")
|
return "", fmt.Errorf("invalid arguments")
|
||||||
}
|
}
|
||||||
|
|
||||||
rl.Take()
|
if rl != nil {
|
||||||
|
rl.Take()
|
||||||
|
}
|
||||||
log.Debugf("[SC] STEAMPI with %s", fmt.Sprintf(shareCodeURLEntry, "REDACTED", steamId, "REDACTED", lastCode))
|
log.Debugf("[SC] STEAMPI with %s", fmt.Sprintf(shareCodeURLEntry, "REDACTED", steamId, "REDACTED", lastCode))
|
||||||
r, err := http.Get(fmt.Sprintf(shareCodeURLEntry, apiKey, steamId, authCode, lastCode))
|
r, err := http.Get(fmt.Sprintf(shareCodeURLEntry, apiKey, steamId, authCode, lastCode))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -397,7 +387,9 @@ func GetPlayerFromVanityURL(db *DBWithLock, id string, apiKey string, rl ratelim
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return tPlayer, nil
|
return tPlayer, nil
|
||||||
} else {
|
} else {
|
||||||
rl.Take()
|
if rl != nil {
|
||||||
|
rl.Take()
|
||||||
|
}
|
||||||
resp, err := steamapi.ResolveVanityURL(id, apiKey)
|
resp, err := steamapi.ResolveVanityURL(id, apiKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -452,7 +444,9 @@ func UpdatePlayerFromSteam(players []*ent.Player, db *ent.Client, apiKey string,
|
|||||||
|
|
||||||
log.Infof("[STEAM] Getting %d profiles from steam", len(idsToUpdate))
|
log.Infof("[STEAM] Getting %d profiles from steam", len(idsToUpdate))
|
||||||
|
|
||||||
rl.Take()
|
if rl != nil {
|
||||||
|
rl.Take()
|
||||||
|
}
|
||||||
playerSum, err := steamapi.GetPlayerSummaries(idsToUpdate, apiKey)
|
playerSum, err := steamapi.GetPlayerSummaries(idsToUpdate, apiKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -486,7 +480,9 @@ func UpdatePlayerFromSteam(players []*ent.Player, db *ent.Client, apiKey string,
|
|||||||
nPlayers = append(nPlayers, tPlayer)
|
nPlayers = append(nPlayers, tPlayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
rl.Take()
|
if rl != nil {
|
||||||
|
rl.Take()
|
||||||
|
}
|
||||||
bans, err := steamapi.GetPlayerBans(idsToUpdate, apiKey)
|
bans, err := steamapi.GetPlayerBans(idsToUpdate, apiKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Reference in New Issue
Block a user