added gameban as separate thing

This commit is contained in:
2021-10-23 00:14:24 +02:00
parent 2c9dc3870f
commit cd6cd6bf58
13 changed files with 652 additions and 50 deletions

View File

@@ -106,6 +106,34 @@ func (pc *PlayerCreate) SetNillableVacCount(i *int) *PlayerCreate {
return pc
}
// SetGameBanDate sets the "game_ban_date" field.
func (pc *PlayerCreate) SetGameBanDate(t time.Time) *PlayerCreate {
pc.mutation.SetGameBanDate(t)
return pc
}
// SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.
func (pc *PlayerCreate) SetNillableGameBanDate(t *time.Time) *PlayerCreate {
if t != nil {
pc.SetGameBanDate(*t)
}
return pc
}
// SetGameBanCount sets the "game_ban_count" field.
func (pc *PlayerCreate) SetGameBanCount(i int) *PlayerCreate {
pc.mutation.SetGameBanCount(i)
return pc
}
// SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.
func (pc *PlayerCreate) SetNillableGameBanCount(i *int) *PlayerCreate {
if i != nil {
pc.SetGameBanCount(*i)
}
return pc
}
// SetSteamUpdated sets the "steam_updated" field.
func (pc *PlayerCreate) SetSteamUpdated(t time.Time) *PlayerCreate {
pc.mutation.SetSteamUpdated(t)
@@ -375,6 +403,22 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
})
_node.VacCount = value
}
if value, ok := pc.mutation.GameBanDate(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeTime,
Value: value,
Column: player.FieldGameBanDate,
})
_node.GameBanDate = value
}
if value, ok := pc.mutation.GameBanCount(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeInt,
Value: value,
Column: player.FieldGameBanCount,
})
_node.GameBanCount = value
}
if value, ok := pc.mutation.SteamUpdated(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeTime,