fix game story
This commit is contained in:
124
ent/ue_update.go
124
ent/ue_update.go
@@ -505,6 +505,53 @@ func (uu *UeUpdate) ClearGameID() *UeUpdate {
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameStory sets the "game_story" field.
|
||||
func (uu *UeUpdate) SetGameStory(i int) *UeUpdate {
|
||||
uu.mutation.ResetGameStory()
|
||||
uu.mutation.SetGameStory(i)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||
func (uu *UeUpdate) SetNillableGameStory(i *int) *UeUpdate {
|
||||
if i != nil {
|
||||
uu.SetGameStory(*i)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// AddGameStory adds i to the "game_story" field.
|
||||
func (uu *UeUpdate) AddGameStory(i int) *UeUpdate {
|
||||
uu.mutation.AddGameStory(i)
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameStory clears the value of the "game_story" field.
|
||||
func (uu *UeUpdate) ClearGameStory() *UeUpdate {
|
||||
uu.mutation.ClearGameStory()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameEp sets the "game_ep" field.
|
||||
func (uu *UeUpdate) SetGameEp(s string) *UeUpdate {
|
||||
uu.mutation.SetGameEp(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameEp sets the "game_ep" field if the given value is not nil.
|
||||
func (uu *UeUpdate) SetNillableGameEp(s *string) *UeUpdate {
|
||||
if s != nil {
|
||||
uu.SetGameEp(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameEp clears the value of the "game_ep" field.
|
||||
func (uu *UeUpdate) ClearGameEp() *UeUpdate {
|
||||
uu.mutation.ClearGameEp()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||
func (uu *UeUpdate) SetOwnerID(id int) *UeUpdate {
|
||||
uu.mutation.SetOwnerID(id)
|
||||
@@ -727,6 +774,21 @@ func (uu *UeUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if uu.mutation.GameIDCleared() {
|
||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||
}
|
||||
if value, ok := uu.mutation.GameStory(); ok {
|
||||
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := uu.mutation.AddedGameStory(); ok {
|
||||
_spec.AddField(ue.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if uu.mutation.GameStoryCleared() {
|
||||
_spec.ClearField(ue.FieldGameStory, field.TypeInt)
|
||||
}
|
||||
if value, ok := uu.mutation.GameEp(); ok {
|
||||
_spec.SetField(ue.FieldGameEp, field.TypeString, value)
|
||||
}
|
||||
if uu.mutation.GameEpCleared() {
|
||||
_spec.ClearField(ue.FieldGameEp, field.TypeString)
|
||||
}
|
||||
if uu.mutation.CreatedAtCleared() {
|
||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||
}
|
||||
@@ -1256,6 +1318,53 @@ func (uuo *UeUpdateOne) ClearGameID() *UeUpdateOne {
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameStory sets the "game_story" field.
|
||||
func (uuo *UeUpdateOne) SetGameStory(i int) *UeUpdateOne {
|
||||
uuo.mutation.ResetGameStory()
|
||||
uuo.mutation.SetGameStory(i)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||
func (uuo *UeUpdateOne) SetNillableGameStory(i *int) *UeUpdateOne {
|
||||
if i != nil {
|
||||
uuo.SetGameStory(*i)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// AddGameStory adds i to the "game_story" field.
|
||||
func (uuo *UeUpdateOne) AddGameStory(i int) *UeUpdateOne {
|
||||
uuo.mutation.AddGameStory(i)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameStory clears the value of the "game_story" field.
|
||||
func (uuo *UeUpdateOne) ClearGameStory() *UeUpdateOne {
|
||||
uuo.mutation.ClearGameStory()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameEp sets the "game_ep" field.
|
||||
func (uuo *UeUpdateOne) SetGameEp(s string) *UeUpdateOne {
|
||||
uuo.mutation.SetGameEp(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameEp sets the "game_ep" field if the given value is not nil.
|
||||
func (uuo *UeUpdateOne) SetNillableGameEp(s *string) *UeUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetGameEp(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameEp clears the value of the "game_ep" field.
|
||||
func (uuo *UeUpdateOne) ClearGameEp() *UeUpdateOne {
|
||||
uuo.mutation.ClearGameEp()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||
func (uuo *UeUpdateOne) SetOwnerID(id int) *UeUpdateOne {
|
||||
uuo.mutation.SetOwnerID(id)
|
||||
@@ -1508,6 +1617,21 @@ func (uuo *UeUpdateOne) sqlSave(ctx context.Context) (_node *Ue, err error) {
|
||||
if uuo.mutation.GameIDCleared() {
|
||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameStory(); ok {
|
||||
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := uuo.mutation.AddedGameStory(); ok {
|
||||
_spec.AddField(ue.FieldGameStory, field.TypeInt, value)
|
||||
}
|
||||
if uuo.mutation.GameStoryCleared() {
|
||||
_spec.ClearField(ue.FieldGameStory, field.TypeInt)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameEp(); ok {
|
||||
_spec.SetField(ue.FieldGameEp, field.TypeString, value)
|
||||
}
|
||||
if uuo.mutation.GameEpCleared() {
|
||||
_spec.ClearField(ue.FieldGameEp, field.TypeString)
|
||||
}
|
||||
if uuo.mutation.CreatedAtCleared() {
|
||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||
}
|
||||
|
Reference in New Issue
Block a user