removed rateLimit from http router requests
improved logging
This commit is contained in:
858
ent/mutation.go
858
ent/mutation.go
@@ -3131,22 +3131,6 @@ type StatsMutation struct {
|
||||
addud_decoy *uint
|
||||
ud_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
|
||||
color *stats.Color
|
||||
kast *int
|
||||
@@ -4560,566 +4544,6 @@ func (m *StatsMutation) ResetUdSmoke() {
|
||||
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.
|
||||
func (m *StatsMutation) SetCrosshair(s string) {
|
||||
m.crosshair = &s
|
||||
@@ -6011,7 +5435,7 @@ func (m *StatsMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *StatsMutation) Fields() []string {
|
||||
fields := make([]string, 0, 39)
|
||||
fields := make([]string, 0, 31)
|
||||
if m.team_id != nil {
|
||||
fields = append(fields, stats.FieldTeamID)
|
||||
}
|
||||
@@ -6072,30 +5496,6 @@ func (m *StatsMutation) Fields() []string {
|
||||
if m.ud_smoke != nil {
|
||||
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 {
|
||||
fields = append(fields, stats.FieldCrosshair)
|
||||
}
|
||||
@@ -6177,22 +5577,6 @@ func (m *StatsMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.UdDecoy()
|
||||
case stats.FieldUdSmoke:
|
||||
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:
|
||||
return m.Crosshair()
|
||||
case stats.FieldColor:
|
||||
@@ -6264,22 +5648,6 @@ func (m *StatsMutation) OldField(ctx context.Context, name string) (ent.Value, e
|
||||
return m.OldUdDecoy(ctx)
|
||||
case stats.FieldUdSmoke:
|
||||
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:
|
||||
return m.OldCrosshair(ctx)
|
||||
case stats.FieldColor:
|
||||
@@ -6451,62 +5819,6 @@ func (m *StatsMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetUdSmoke(v)
|
||||
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:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
@@ -6652,30 +5964,6 @@ func (m *StatsMutation) AddedFields() []string {
|
||||
if m.addud_smoke != nil {
|
||||
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 {
|
||||
fields = append(fields, stats.FieldKast)
|
||||
}
|
||||
@@ -6745,22 +6033,6 @@ func (m *StatsMutation) AddedField(name string) (ent.Value, bool) {
|
||||
return m.AddedUdDecoy()
|
||||
case stats.FieldUdSmoke:
|
||||
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:
|
||||
return m.AddedKast()
|
||||
case stats.FieldFlashDurationSelf:
|
||||
@@ -6924,62 +6196,6 @@ func (m *StatsMutation) AddField(name string, value ent.Value) error {
|
||||
}
|
||||
m.AddUdSmoke(v)
|
||||
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:
|
||||
v, ok := value.(int)
|
||||
if !ok {
|
||||
@@ -7076,30 +6292,6 @@ func (m *StatsMutation) ClearedFields() []string {
|
||||
if m.FieldCleared(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) {
|
||||
fields = append(fields, stats.FieldCrosshair)
|
||||
}
|
||||
@@ -7186,30 +6378,6 @@ func (m *StatsMutation) ClearField(name string) error {
|
||||
case stats.FieldUdSmoke:
|
||||
m.ClearUdSmoke()
|
||||
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:
|
||||
m.ClearCrosshair()
|
||||
return nil
|
||||
@@ -7311,30 +6479,6 @@ func (m *StatsMutation) ResetField(name string) error {
|
||||
case stats.FieldUdSmoke:
|
||||
m.ResetUdSmoke()
|
||||
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:
|
||||
m.ResetCrosshair()
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user