fix ue game lv
This commit is contained in:
156
ent/ue_update.go
156
ent/ue_update.go
@@ -445,6 +445,66 @@ func (uu *UeUpdate) ClearAuthor() *UeUpdate {
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameLv sets the "game_lv" field.
|
||||
func (uu *UeUpdate) SetGameLv(s string) *UeUpdate {
|
||||
uu.mutation.SetGameLv(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameLv sets the "game_lv" field if the given value is not nil.
|
||||
func (uu *UeUpdate) SetNillableGameLv(s *string) *UeUpdate {
|
||||
if s != nil {
|
||||
uu.SetGameLv(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameLv clears the value of the "game_lv" field.
|
||||
func (uu *UeUpdate) ClearGameLv() *UeUpdate {
|
||||
uu.mutation.ClearGameLv()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameExp sets the "game_exp" field.
|
||||
func (uu *UeUpdate) SetGameExp(s string) *UeUpdate {
|
||||
uu.mutation.SetGameExp(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
|
||||
func (uu *UeUpdate) SetNillableGameExp(s *string) *UeUpdate {
|
||||
if s != nil {
|
||||
uu.SetGameExp(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameExp clears the value of the "game_exp" field.
|
||||
func (uu *UeUpdate) ClearGameExp() *UeUpdate {
|
||||
uu.mutation.ClearGameExp()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetGameID sets the "game_id" field.
|
||||
func (uu *UeUpdate) SetGameID(s string) *UeUpdate {
|
||||
uu.mutation.SetGameID(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableGameID sets the "game_id" field if the given value is not nil.
|
||||
func (uu *UeUpdate) SetNillableGameID(s *string) *UeUpdate {
|
||||
if s != nil {
|
||||
uu.SetGameID(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// ClearGameID clears the value of the "game_id" field.
|
||||
func (uu *UeUpdate) ClearGameID() *UeUpdate {
|
||||
uu.mutation.ClearGameID()
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||
func (uu *UeUpdate) SetOwnerID(id int) *UeUpdate {
|
||||
uu.mutation.SetOwnerID(id)
|
||||
@@ -649,6 +709,24 @@ func (uu *UeUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if uu.mutation.AuthorCleared() {
|
||||
_spec.ClearField(ue.FieldAuthor, field.TypeString)
|
||||
}
|
||||
if value, ok := uu.mutation.GameLv(); ok {
|
||||
_spec.SetField(ue.FieldGameLv, field.TypeString, value)
|
||||
}
|
||||
if uu.mutation.GameLvCleared() {
|
||||
_spec.ClearField(ue.FieldGameLv, field.TypeString)
|
||||
}
|
||||
if value, ok := uu.mutation.GameExp(); ok {
|
||||
_spec.SetField(ue.FieldGameExp, field.TypeString, value)
|
||||
}
|
||||
if uu.mutation.GameExpCleared() {
|
||||
_spec.ClearField(ue.FieldGameExp, field.TypeString)
|
||||
}
|
||||
if value, ok := uu.mutation.GameID(); ok {
|
||||
_spec.SetField(ue.FieldGameID, field.TypeString, value)
|
||||
}
|
||||
if uu.mutation.GameIDCleared() {
|
||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||
}
|
||||
if uu.mutation.CreatedAtCleared() {
|
||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||
}
|
||||
@@ -1118,6 +1196,66 @@ func (uuo *UeUpdateOne) ClearAuthor() *UeUpdateOne {
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameLv sets the "game_lv" field.
|
||||
func (uuo *UeUpdateOne) SetGameLv(s string) *UeUpdateOne {
|
||||
uuo.mutation.SetGameLv(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameLv sets the "game_lv" field if the given value is not nil.
|
||||
func (uuo *UeUpdateOne) SetNillableGameLv(s *string) *UeUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetGameLv(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameLv clears the value of the "game_lv" field.
|
||||
func (uuo *UeUpdateOne) ClearGameLv() *UeUpdateOne {
|
||||
uuo.mutation.ClearGameLv()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameExp sets the "game_exp" field.
|
||||
func (uuo *UeUpdateOne) SetGameExp(s string) *UeUpdateOne {
|
||||
uuo.mutation.SetGameExp(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
|
||||
func (uuo *UeUpdateOne) SetNillableGameExp(s *string) *UeUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetGameExp(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameExp clears the value of the "game_exp" field.
|
||||
func (uuo *UeUpdateOne) ClearGameExp() *UeUpdateOne {
|
||||
uuo.mutation.ClearGameExp()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetGameID sets the "game_id" field.
|
||||
func (uuo *UeUpdateOne) SetGameID(s string) *UeUpdateOne {
|
||||
uuo.mutation.SetGameID(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableGameID sets the "game_id" field if the given value is not nil.
|
||||
func (uuo *UeUpdateOne) SetNillableGameID(s *string) *UeUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetGameID(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// ClearGameID clears the value of the "game_id" field.
|
||||
func (uuo *UeUpdateOne) ClearGameID() *UeUpdateOne {
|
||||
uuo.mutation.ClearGameID()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||
func (uuo *UeUpdateOne) SetOwnerID(id int) *UeUpdateOne {
|
||||
uuo.mutation.SetOwnerID(id)
|
||||
@@ -1352,6 +1490,24 @@ func (uuo *UeUpdateOne) sqlSave(ctx context.Context) (_node *Ue, err error) {
|
||||
if uuo.mutation.AuthorCleared() {
|
||||
_spec.ClearField(ue.FieldAuthor, field.TypeString)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameLv(); ok {
|
||||
_spec.SetField(ue.FieldGameLv, field.TypeString, value)
|
||||
}
|
||||
if uuo.mutation.GameLvCleared() {
|
||||
_spec.ClearField(ue.FieldGameLv, field.TypeString)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameExp(); ok {
|
||||
_spec.SetField(ue.FieldGameExp, field.TypeString, value)
|
||||
}
|
||||
if uuo.mutation.GameExpCleared() {
|
||||
_spec.ClearField(ue.FieldGameExp, field.TypeString)
|
||||
}
|
||||
if value, ok := uuo.mutation.GameID(); ok {
|
||||
_spec.SetField(ue.FieldGameID, field.TypeString, value)
|
||||
}
|
||||
if uuo.mutation.GameIDCleared() {
|
||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||
}
|
||||
if uuo.mutation.CreatedAtCleared() {
|
||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||
}
|
||||
|
Reference in New Issue
Block a user