added gameban as separate thing
This commit is contained in:
@@ -156,6 +156,53 @@ func (pu *PlayerUpdate) ClearVacCount() *PlayerUpdate {
|
||||
return pu
|
||||
}
|
||||
|
||||
// SetGameBanDate sets the "game_ban_date" field.
|
||||
func (pu *PlayerUpdate) SetGameBanDate(t time.Time) *PlayerUpdate {
|
||||
pu.mutation.SetGameBanDate(t)
|
||||
return pu
|
||||
}
|
||||
|
||||
// SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.
|
||||
func (pu *PlayerUpdate) SetNillableGameBanDate(t *time.Time) *PlayerUpdate {
|
||||
if t != nil {
|
||||
pu.SetGameBanDate(*t)
|
||||
}
|
||||
return pu
|
||||
}
|
||||
|
||||
// ClearGameBanDate clears the value of the "game_ban_date" field.
|
||||
func (pu *PlayerUpdate) ClearGameBanDate() *PlayerUpdate {
|
||||
pu.mutation.ClearGameBanDate()
|
||||
return pu
|
||||
}
|
||||
|
||||
// SetGameBanCount sets the "game_ban_count" field.
|
||||
func (pu *PlayerUpdate) SetGameBanCount(i int) *PlayerUpdate {
|
||||
pu.mutation.ResetGameBanCount()
|
||||
pu.mutation.SetGameBanCount(i)
|
||||
return pu
|
||||
}
|
||||
|
||||
// SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.
|
||||
func (pu *PlayerUpdate) SetNillableGameBanCount(i *int) *PlayerUpdate {
|
||||
if i != nil {
|
||||
pu.SetGameBanCount(*i)
|
||||
}
|
||||
return pu
|
||||
}
|
||||
|
||||
// AddGameBanCount adds i to the "game_ban_count" field.
|
||||
func (pu *PlayerUpdate) AddGameBanCount(i int) *PlayerUpdate {
|
||||
pu.mutation.AddGameBanCount(i)
|
||||
return pu
|
||||
}
|
||||
|
||||
// ClearGameBanCount clears the value of the "game_ban_count" field.
|
||||
func (pu *PlayerUpdate) ClearGameBanCount() *PlayerUpdate {
|
||||
pu.mutation.ClearGameBanCount()
|
||||
return pu
|
||||
}
|
||||
|
||||
// SetSteamUpdated sets the "steam_updated" field.
|
||||
func (pu *PlayerUpdate) SetSteamUpdated(t time.Time) *PlayerUpdate {
|
||||
pu.mutation.SetSteamUpdated(t)
|
||||
@@ -484,6 +531,39 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
}
|
||||
if value, ok := pu.mutation.GameBanDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
}
|
||||
if pu.mutation.GameBanDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
}
|
||||
if value, ok := pu.mutation.GameBanCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if value, ok := pu.mutation.AddedGameBanCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if pu.mutation.GameBanCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if value, ok := pu.mutation.SteamUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
@@ -797,6 +877,53 @@ func (puo *PlayerUpdateOne) ClearVacCount() *PlayerUpdateOne {
|
||||
return puo
|
||||
}
|
||||
|
||||
// SetGameBanDate sets the "game_ban_date" field.
|
||||
func (puo *PlayerUpdateOne) SetGameBanDate(t time.Time) *PlayerUpdateOne {
|
||||
puo.mutation.SetGameBanDate(t)
|
||||
return puo
|
||||
}
|
||||
|
||||
// SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.
|
||||
func (puo *PlayerUpdateOne) SetNillableGameBanDate(t *time.Time) *PlayerUpdateOne {
|
||||
if t != nil {
|
||||
puo.SetGameBanDate(*t)
|
||||
}
|
||||
return puo
|
||||
}
|
||||
|
||||
// ClearGameBanDate clears the value of the "game_ban_date" field.
|
||||
func (puo *PlayerUpdateOne) ClearGameBanDate() *PlayerUpdateOne {
|
||||
puo.mutation.ClearGameBanDate()
|
||||
return puo
|
||||
}
|
||||
|
||||
// SetGameBanCount sets the "game_ban_count" field.
|
||||
func (puo *PlayerUpdateOne) SetGameBanCount(i int) *PlayerUpdateOne {
|
||||
puo.mutation.ResetGameBanCount()
|
||||
puo.mutation.SetGameBanCount(i)
|
||||
return puo
|
||||
}
|
||||
|
||||
// SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.
|
||||
func (puo *PlayerUpdateOne) SetNillableGameBanCount(i *int) *PlayerUpdateOne {
|
||||
if i != nil {
|
||||
puo.SetGameBanCount(*i)
|
||||
}
|
||||
return puo
|
||||
}
|
||||
|
||||
// AddGameBanCount adds i to the "game_ban_count" field.
|
||||
func (puo *PlayerUpdateOne) AddGameBanCount(i int) *PlayerUpdateOne {
|
||||
puo.mutation.AddGameBanCount(i)
|
||||
return puo
|
||||
}
|
||||
|
||||
// ClearGameBanCount clears the value of the "game_ban_count" field.
|
||||
func (puo *PlayerUpdateOne) ClearGameBanCount() *PlayerUpdateOne {
|
||||
puo.mutation.ClearGameBanCount()
|
||||
return puo
|
||||
}
|
||||
|
||||
// SetSteamUpdated sets the "steam_updated" field.
|
||||
func (puo *PlayerUpdateOne) SetSteamUpdated(t time.Time) *PlayerUpdateOne {
|
||||
puo.mutation.SetSteamUpdated(t)
|
||||
@@ -1149,6 +1276,39 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
}
|
||||
if value, ok := puo.mutation.GameBanDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
}
|
||||
if puo.mutation.GameBanDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
}
|
||||
if value, ok := puo.mutation.GameBanCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if value, ok := puo.mutation.AddedGameBanCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if puo.mutation.GameBanCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
}
|
||||
if value, ok := puo.mutation.SteamUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
|
Reference in New Issue
Block a user