fix game story
This commit is contained in:
@@ -1044,6 +1044,53 @@ func (uu *UserUpdate) ClearGameExp() *UserUpdate {
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameStory sets the "game_story" field.
|
||||
func (uu *UserUpdate) SetGameStory(i int) *UserUpdate {
|
||||
uu.mutation.ResetGameStory()
|
||||
uu.mutation.SetGameStory(i)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||
func (uu *UserUpdate) SetNillableGameStory(i *int) *UserUpdate {
|
||||
if i != nil {
|
||||
uu.SetGameStory(*i)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// AddGameStory adds i to the "game_story" field.
|
||||
func (uu *UserUpdate) AddGameStory(i int) *UserUpdate {
|
||||
uu.mutation.AddGameStory(i)
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameStory clears the value of the "game_story" field.
|
||||
func (uu *UserUpdate) ClearGameStory() *UserUpdate {
|
||||
uu.mutation.ClearGameStory()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameLimit sets the "game_limit" field.
|
||||
func (uu *UserUpdate) SetGameLimit(b bool) *UserUpdate {
|
||||
uu.mutation.SetGameLimit(b)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameLimit sets the "game_limit" field if the given value is not nil.
|
||||
func (uu *UserUpdate) SetNillableGameLimit(b *bool) *UserUpdate {
|
||||
if b != nil {
|
||||
uu.SetGameLimit(*b)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameLimit clears the value of the "game_limit" field.
|
||||
func (uu *UserUpdate) ClearGameLimit() *UserUpdate {
|
||||
uu.mutation.ClearGameLimit()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetCoin sets the "coin" field.
|
||||
func (uu *UserUpdate) SetCoin(i int) *UserUpdate {
|
||||
uu.mutation.ResetCoin()
|
||||
@@ -1617,6 +1664,21 @@ func (uu *UserUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if uu.mutation.GameExpCleared() {
|
||||
_spec.ClearField(user.FieldGameExp, field.TypeInt)
|
||||
}
|
||||
if value, ok := uu.mutation.GameStory(); ok {
|
||||
_spec.SetField(user.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := uu.mutation.AddedGameStory(); ok {
|
||||
_spec.AddField(user.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if uu.mutation.GameStoryCleared() {
|
||||
_spec.ClearField(user.FieldGameStory, field.TypeInt)
|
||||
}
|
||||
if value, ok := uu.mutation.GameLimit(); ok {
|
||||
_spec.SetField(user.FieldGameLimit, field.TypeBool, value)
|
||||
}
|
||||
if uu.mutation.GameLimitCleared() {
|
||||
_spec.ClearField(user.FieldGameLimit, field.TypeBool)
|
||||
}
|
||||
if value, ok := uu.mutation.Coin(); ok {
|
||||
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
||||
}
|
||||
@@ -2850,6 +2912,53 @@ func (uuo *UserUpdateOne) ClearGameExp() *UserUpdateOne {
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameStory sets the "game_story" field.
|
||||
func (uuo *UserUpdateOne) SetGameStory(i int) *UserUpdateOne {
|
||||
uuo.mutation.ResetGameStory()
|
||||
uuo.mutation.SetGameStory(i)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||
func (uuo *UserUpdateOne) SetNillableGameStory(i *int) *UserUpdateOne {
|
||||
if i != nil {
|
||||
uuo.SetGameStory(*i)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// AddGameStory adds i to the "game_story" field.
|
||||
func (uuo *UserUpdateOne) AddGameStory(i int) *UserUpdateOne {
|
||||
uuo.mutation.AddGameStory(i)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameStory clears the value of the "game_story" field.
|
||||
func (uuo *UserUpdateOne) ClearGameStory() *UserUpdateOne {
|
||||
uuo.mutation.ClearGameStory()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameLimit sets the "game_limit" field.
|
||||
func (uuo *UserUpdateOne) SetGameLimit(b bool) *UserUpdateOne {
|
||||
uuo.mutation.SetGameLimit(b)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameLimit sets the "game_limit" field if the given value is not nil.
|
||||
func (uuo *UserUpdateOne) SetNillableGameLimit(b *bool) *UserUpdateOne {
|
||||
if b != nil {
|
||||
uuo.SetGameLimit(*b)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameLimit clears the value of the "game_limit" field.
|
||||
func (uuo *UserUpdateOne) ClearGameLimit() *UserUpdateOne {
|
||||
uuo.mutation.ClearGameLimit()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetCoin sets the "coin" field.
|
||||
func (uuo *UserUpdateOne) SetCoin(i int) *UserUpdateOne {
|
||||
uuo.mutation.ResetCoin()
|
||||
@@ -3453,6 +3562,21 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error)
|
||||
if uuo.mutation.GameExpCleared() {
|
||||
_spec.ClearField(user.FieldGameExp, field.TypeInt)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameStory(); ok {
|
||||
_spec.SetField(user.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := uuo.mutation.AddedGameStory(); ok {
|
||||
_spec.AddField(user.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if uuo.mutation.GameStoryCleared() {
|
||||
_spec.ClearField(user.FieldGameStory, field.TypeInt)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameLimit(); ok {
|
||||
_spec.SetField(user.FieldGameLimit, field.TypeBool, value)
|
||||
}
|
||||
if uuo.mutation.GameLimitCleared() {
|
||||
_spec.ClearField(user.FieldGameLimit, field.TypeBool)
|
||||
}
|
||||
if value, ok := uuo.mutation.Coin(); ok {
|
||||
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user