fix
This commit is contained in:
parent
e707b1802e
commit
db13d9689e
@ -153,7 +153,7 @@ var (
|
|||||||
{Name: "game_lv", Type: field.TypeString, Nullable: true},
|
{Name: "game_lv", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "game_exp", Type: field.TypeString, Nullable: true},
|
{Name: "game_exp", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "game_id", Type: field.TypeString, Nullable: true},
|
{Name: "game_id", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "game_story", Type: field.TypeInt, Nullable: true},
|
{Name: "game_story", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "created_at", Type: field.TypeTime, Nullable: true},
|
{Name: "created_at", Type: field.TypeTime, Nullable: true},
|
||||||
{Name: "user_ue", Type: field.TypeInt},
|
{Name: "user_ue", Type: field.TypeInt},
|
||||||
}
|
}
|
||||||
|
@ -5117,8 +5117,7 @@ type UeMutation struct {
|
|||||||
game_lv *string
|
game_lv *string
|
||||||
game_exp *string
|
game_exp *string
|
||||||
game_id *string
|
game_id *string
|
||||||
game_story *int
|
game_story *string
|
||||||
addgame_story *int
|
|
||||||
created_at *time.Time
|
created_at *time.Time
|
||||||
clearedFields map[string]struct{}
|
clearedFields map[string]struct{}
|
||||||
owner *int
|
owner *int
|
||||||
@ -6474,13 +6473,12 @@ func (m *UeMutation) ResetGameID() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the "game_story" field.
|
// SetGameStory sets the "game_story" field.
|
||||||
func (m *UeMutation) SetGameStory(i int) {
|
func (m *UeMutation) SetGameStory(s string) {
|
||||||
m.game_story = &i
|
m.game_story = &s
|
||||||
m.addgame_story = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStory returns the value of the "game_story" field in the mutation.
|
// GameStory returns the value of the "game_story" field in the mutation.
|
||||||
func (m *UeMutation) GameStory() (r int, exists bool) {
|
func (m *UeMutation) GameStory() (r string, exists bool) {
|
||||||
v := m.game_story
|
v := m.game_story
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return
|
return
|
||||||
@ -6491,7 +6489,7 @@ func (m *UeMutation) GameStory() (r int, exists bool) {
|
|||||||
// OldGameStory returns the old "game_story" field's value of the Ue entity.
|
// OldGameStory returns the old "game_story" field's value of the Ue entity.
|
||||||
// If the Ue object wasn't provided to the builder, the object is fetched from the database.
|
// If the Ue object wasn't provided to the builder, the object is fetched from the database.
|
||||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||||
func (m *UeMutation) OldGameStory(ctx context.Context) (v int, err error) {
|
func (m *UeMutation) OldGameStory(ctx context.Context) (v string, err error) {
|
||||||
if !m.op.Is(OpUpdateOne) {
|
if !m.op.Is(OpUpdateOne) {
|
||||||
return v, errors.New("OldGameStory is only allowed on UpdateOne operations")
|
return v, errors.New("OldGameStory is only allowed on UpdateOne operations")
|
||||||
}
|
}
|
||||||
@ -6505,28 +6503,9 @@ func (m *UeMutation) OldGameStory(ctx context.Context) (v int, err error) {
|
|||||||
return oldValue.GameStory, nil
|
return oldValue.GameStory, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddGameStory adds i to the "game_story" field.
|
|
||||||
func (m *UeMutation) AddGameStory(i int) {
|
|
||||||
if m.addgame_story != nil {
|
|
||||||
*m.addgame_story += i
|
|
||||||
} else {
|
|
||||||
m.addgame_story = &i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddedGameStory returns the value that was added to the "game_story" field in this mutation.
|
|
||||||
func (m *UeMutation) AddedGameStory() (r int, exists bool) {
|
|
||||||
v := m.addgame_story
|
|
||||||
if v == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return *v, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClearGameStory clears the value of the "game_story" field.
|
// ClearGameStory clears the value of the "game_story" field.
|
||||||
func (m *UeMutation) ClearGameStory() {
|
func (m *UeMutation) ClearGameStory() {
|
||||||
m.game_story = nil
|
m.game_story = nil
|
||||||
m.addgame_story = nil
|
|
||||||
m.clearedFields[ue.FieldGameStory] = struct{}{}
|
m.clearedFields[ue.FieldGameStory] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6539,7 +6518,6 @@ func (m *UeMutation) GameStoryCleared() bool {
|
|||||||
// ResetGameStory resets all changes to the "game_story" field.
|
// ResetGameStory resets all changes to the "game_story" field.
|
||||||
func (m *UeMutation) ResetGameStory() {
|
func (m *UeMutation) ResetGameStory() {
|
||||||
m.game_story = nil
|
m.game_story = nil
|
||||||
m.addgame_story = nil
|
|
||||||
delete(m.clearedFields, ue.FieldGameStory)
|
delete(m.clearedFields, ue.FieldGameStory)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7001,7 +6979,7 @@ func (m *UeMutation) SetField(name string, value ent.Value) error {
|
|||||||
m.SetGameID(v)
|
m.SetGameID(v)
|
||||||
return nil
|
return nil
|
||||||
case ue.FieldGameStory:
|
case ue.FieldGameStory:
|
||||||
v, ok := value.(int)
|
v, ok := value.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||||
}
|
}
|
||||||
@ -7055,9 +7033,6 @@ func (m *UeMutation) AddedFields() []string {
|
|||||||
if m.addlocation_n != nil {
|
if m.addlocation_n != nil {
|
||||||
fields = append(fields, ue.FieldLocationN)
|
fields = append(fields, ue.FieldLocationN)
|
||||||
}
|
}
|
||||||
if m.addgame_story != nil {
|
|
||||||
fields = append(fields, ue.FieldGameStory)
|
|
||||||
}
|
|
||||||
return fields
|
return fields
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7088,8 +7063,6 @@ func (m *UeMutation) AddedField(name string) (ent.Value, bool) {
|
|||||||
return m.AddedLocationZ()
|
return m.AddedLocationZ()
|
||||||
case ue.FieldLocationN:
|
case ue.FieldLocationN:
|
||||||
return m.AddedLocationN()
|
return m.AddedLocationN()
|
||||||
case ue.FieldGameStory:
|
|
||||||
return m.AddedGameStory()
|
|
||||||
}
|
}
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
@ -7176,13 +7149,6 @@ func (m *UeMutation) AddField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.AddLocationN(v)
|
m.AddLocationN(v)
|
||||||
return nil
|
return nil
|
||||||
case ue.FieldGameStory:
|
|
||||||
v, ok := value.(int)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
||||||
}
|
|
||||||
m.AddGameStory(v)
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
return fmt.Errorf("unknown Ue numeric field %s", name)
|
return fmt.Errorf("unknown Ue numeric field %s", name)
|
||||||
}
|
}
|
||||||
|
@ -1599,7 +1599,7 @@ type CreateUeReq struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
Owner int `json:"owner"`
|
Owner int `json:"owner"`
|
||||||
}
|
}
|
||||||
@ -1710,7 +1710,7 @@ func (s *CreateUeReq) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *CreateUeReq) GetGameStory() OptInt {
|
func (s *CreateUeReq) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1830,7 +1830,7 @@ func (s *CreateUeReq) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *CreateUeReq) SetGameStory(val OptInt) {
|
func (s *CreateUeReq) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6396,7 +6396,7 @@ type UeCreate struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6501,7 +6501,7 @@ func (s *UeCreate) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UeCreate) GetGameStory() OptInt {
|
func (s *UeCreate) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6611,7 +6611,7 @@ func (s *UeCreate) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UeCreate) SetGameStory(val OptInt) {
|
func (s *UeCreate) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6644,7 +6644,7 @@ type UeList struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6749,7 +6749,7 @@ func (s *UeList) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UeList) GetGameStory() OptInt {
|
func (s *UeList) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6859,7 +6859,7 @@ func (s *UeList) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UeList) SetGameStory(val OptInt) {
|
func (s *UeList) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7468,7 +7468,7 @@ type UeRead struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7573,7 +7573,7 @@ func (s *UeRead) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UeRead) GetGameStory() OptInt {
|
func (s *UeRead) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7683,7 +7683,7 @@ func (s *UeRead) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UeRead) SetGameStory(val OptInt) {
|
func (s *UeRead) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7716,7 +7716,7 @@ type UeUpdate struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7821,7 +7821,7 @@ func (s *UeUpdate) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UeUpdate) GetGameStory() OptInt {
|
func (s *UeUpdate) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7931,7 +7931,7 @@ func (s *UeUpdate) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UeUpdate) SetGameStory(val OptInt) {
|
func (s *UeUpdate) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8459,7 +8459,7 @@ type UpdateUeReq struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
Owner OptInt `json:"owner"`
|
Owner OptInt `json:"owner"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8564,7 +8564,7 @@ func (s *UpdateUeReq) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UpdateUeReq) GetGameStory() OptInt {
|
func (s *UpdateUeReq) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8674,7 +8674,7 @@ func (s *UpdateUeReq) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UpdateUeReq) SetGameStory(val OptInt) {
|
func (s *UpdateUeReq) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11508,7 +11508,7 @@ type UserUeList struct {
|
|||||||
GameLv OptString `json:"game_lv"`
|
GameLv OptString `json:"game_lv"`
|
||||||
GameExp OptString `json:"game_exp"`
|
GameExp OptString `json:"game_exp"`
|
||||||
GameID OptString `json:"game_id"`
|
GameID OptString `json:"game_id"`
|
||||||
GameStory OptInt `json:"game_story"`
|
GameStory OptString `json:"game_story"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11613,7 +11613,7 @@ func (s *UserUeList) GetGameID() OptString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetGameStory returns the value of GameStory.
|
// GetGameStory returns the value of GameStory.
|
||||||
func (s *UserUeList) GetGameStory() OptInt {
|
func (s *UserUeList) GetGameStory() OptString {
|
||||||
return s.GameStory
|
return s.GameStory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11723,7 +11723,7 @@ func (s *UserUeList) SetGameID(val OptString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the value of GameStory.
|
// SetGameStory sets the value of GameStory.
|
||||||
func (s *UserUeList) SetGameStory(val OptInt) {
|
func (s *UserUeList) SetGameStory(val OptString) {
|
||||||
s.GameStory = val
|
s.GameStory = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -933,7 +933,7 @@ func NewUeCreate(e *ent.Ue) *UeCreate {
|
|||||||
ret.GameLv = NewOptString(e.GameLv)
|
ret.GameLv = NewOptString(e.GameLv)
|
||||||
ret.GameExp = NewOptString(e.GameExp)
|
ret.GameExp = NewOptString(e.GameExp)
|
||||||
ret.GameID = NewOptString(e.GameID)
|
ret.GameID = NewOptString(e.GameID)
|
||||||
ret.GameStory = NewOptInt(e.GameStory)
|
ret.GameStory = NewOptString(e.GameStory)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -981,7 +981,7 @@ func NewUeList(e *ent.Ue) *UeList {
|
|||||||
ret.GameLv = NewOptString(e.GameLv)
|
ret.GameLv = NewOptString(e.GameLv)
|
||||||
ret.GameExp = NewOptString(e.GameExp)
|
ret.GameExp = NewOptString(e.GameExp)
|
||||||
ret.GameID = NewOptString(e.GameID)
|
ret.GameID = NewOptString(e.GameID)
|
||||||
ret.GameStory = NewOptInt(e.GameStory)
|
ret.GameStory = NewOptString(e.GameStory)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1029,7 +1029,7 @@ func NewUeRead(e *ent.Ue) *UeRead {
|
|||||||
ret.GameLv = NewOptString(e.GameLv)
|
ret.GameLv = NewOptString(e.GameLv)
|
||||||
ret.GameExp = NewOptString(e.GameExp)
|
ret.GameExp = NewOptString(e.GameExp)
|
||||||
ret.GameID = NewOptString(e.GameID)
|
ret.GameID = NewOptString(e.GameID)
|
||||||
ret.GameStory = NewOptInt(e.GameStory)
|
ret.GameStory = NewOptString(e.GameStory)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1077,7 +1077,7 @@ func NewUeUpdate(e *ent.Ue) *UeUpdate {
|
|||||||
ret.GameLv = NewOptString(e.GameLv)
|
ret.GameLv = NewOptString(e.GameLv)
|
||||||
ret.GameExp = NewOptString(e.GameExp)
|
ret.GameExp = NewOptString(e.GameExp)
|
||||||
ret.GameID = NewOptString(e.GameID)
|
ret.GameID = NewOptString(e.GameID)
|
||||||
ret.GameStory = NewOptInt(e.GameStory)
|
ret.GameStory = NewOptString(e.GameStory)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1635,7 +1635,7 @@ func NewUserUeList(e *ent.Ue) *UserUeList {
|
|||||||
ret.GameLv = NewOptString(e.GameLv)
|
ret.GameLv = NewOptString(e.GameLv)
|
||||||
ret.GameExp = NewOptString(e.GameExp)
|
ret.GameExp = NewOptString(e.GameExp)
|
||||||
ret.GameID = NewOptString(e.GameID)
|
ret.GameID = NewOptString(e.GameID)
|
||||||
ret.GameStory = NewOptInt(e.GameStory)
|
ret.GameStory = NewOptString(e.GameStory)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
|
@ -1627,7 +1627,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1835,7 +1835,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"owner": {
|
"owner": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
@ -4481,7 +4481,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -4561,7 +4561,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -4636,7 +4636,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -4711,7 +4711,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -4786,7 +4786,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -6097,7 +6097,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"game_story": {
|
"game_story": {
|
||||||
"type": "integer"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -84,7 +84,7 @@ func (Ue) Fields() []ent.Field {
|
|||||||
field.String("game_id").
|
field.String("game_id").
|
||||||
Optional(),
|
Optional(),
|
||||||
|
|
||||||
field.Int("game_story").
|
field.String("game_story").
|
||||||
Optional(),
|
Optional(),
|
||||||
|
|
||||||
field.Time("created_at").
|
field.Time("created_at").
|
||||||
|
12
ent/ue.go
12
ent/ue.go
@ -61,7 +61,7 @@ type Ue struct {
|
|||||||
// GameID holds the value of the "game_id" field.
|
// GameID holds the value of the "game_id" field.
|
||||||
GameID string `json:"game_id,omitempty"`
|
GameID string `json:"game_id,omitempty"`
|
||||||
// GameStory holds the value of the "game_story" field.
|
// GameStory holds the value of the "game_story" field.
|
||||||
GameStory int `json:"game_story,omitempty"`
|
GameStory string `json:"game_story,omitempty"`
|
||||||
// CreatedAt holds the value of the "created_at" field.
|
// CreatedAt holds the value of the "created_at" field.
|
||||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||||
// Edges holds the relations/edges for other nodes in the graph.
|
// Edges holds the relations/edges for other nodes in the graph.
|
||||||
@ -100,9 +100,9 @@ func (*Ue) scanValues(columns []string) ([]any, error) {
|
|||||||
switch columns[i] {
|
switch columns[i] {
|
||||||
case ue.FieldLimit, ue.FieldLimitBoss, ue.FieldLimitItem:
|
case ue.FieldLimit, ue.FieldLimitBoss, ue.FieldLimitItem:
|
||||||
values[i] = new(sql.NullBool)
|
values[i] = new(sql.NullBool)
|
||||||
case ue.FieldID, ue.FieldLv, ue.FieldLvPoint, ue.FieldModel, ue.FieldSword, ue.FieldCard, ue.FieldCp, ue.FieldCount, ue.FieldLocationX, ue.FieldLocationY, ue.FieldLocationZ, ue.FieldLocationN, ue.FieldGameStory:
|
case ue.FieldID, ue.FieldLv, ue.FieldLvPoint, ue.FieldModel, ue.FieldSword, ue.FieldCard, ue.FieldCp, ue.FieldCount, ue.FieldLocationX, ue.FieldLocationY, ue.FieldLocationZ, ue.FieldLocationN:
|
||||||
values[i] = new(sql.NullInt64)
|
values[i] = new(sql.NullInt64)
|
||||||
case ue.FieldPassword, ue.FieldMode, ue.FieldToken, ue.FieldAuthor, ue.FieldGameLv, ue.FieldGameExp, ue.FieldGameID:
|
case ue.FieldPassword, ue.FieldMode, ue.FieldToken, ue.FieldAuthor, ue.FieldGameLv, ue.FieldGameExp, ue.FieldGameID, ue.FieldGameStory:
|
||||||
values[i] = new(sql.NullString)
|
values[i] = new(sql.NullString)
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
values[i] = new(sql.NullTime)
|
values[i] = new(sql.NullTime)
|
||||||
@ -256,10 +256,10 @@ func (u *Ue) assignValues(columns []string, values []any) error {
|
|||||||
u.GameID = value.String
|
u.GameID = value.String
|
||||||
}
|
}
|
||||||
case ue.FieldGameStory:
|
case ue.FieldGameStory:
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
if value, ok := values[i].(*sql.NullString); !ok {
|
||||||
return fmt.Errorf("unexpected type %T for field game_story", values[i])
|
return fmt.Errorf("unexpected type %T for field game_story", values[i])
|
||||||
} else if value.Valid {
|
} else if value.Valid {
|
||||||
u.GameStory = int(value.Int64)
|
u.GameStory = value.String
|
||||||
}
|
}
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||||
@ -377,7 +377,7 @@ func (u *Ue) String() string {
|
|||||||
builder.WriteString(u.GameID)
|
builder.WriteString(u.GameID)
|
||||||
builder.WriteString(", ")
|
builder.WriteString(", ")
|
||||||
builder.WriteString("game_story=")
|
builder.WriteString("game_story=")
|
||||||
builder.WriteString(fmt.Sprintf("%v", u.GameStory))
|
builder.WriteString(u.GameStory)
|
||||||
builder.WriteString(", ")
|
builder.WriteString(", ")
|
||||||
builder.WriteString("created_at=")
|
builder.WriteString("created_at=")
|
||||||
builder.WriteString(u.CreatedAt.Format(time.ANSIC))
|
builder.WriteString(u.CreatedAt.Format(time.ANSIC))
|
||||||
|
@ -161,7 +161,7 @@ func GameID(v string) predicate.Ue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GameStory applies equality check predicate on the "game_story" field. It's identical to GameStoryEQ.
|
// GameStory applies equality check predicate on the "game_story" field. It's identical to GameStoryEQ.
|
||||||
func GameStory(v int) predicate.Ue {
|
func GameStory(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1296,45 +1296,60 @@ func GameIDContainsFold(v string) predicate.Ue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryEQ applies the EQ predicate on the "game_story" field.
|
// GameStoryEQ applies the EQ predicate on the "game_story" field.
|
||||||
func GameStoryEQ(v int) predicate.Ue {
|
func GameStoryEQ(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryNEQ applies the NEQ predicate on the "game_story" field.
|
// GameStoryNEQ applies the NEQ predicate on the "game_story" field.
|
||||||
func GameStoryNEQ(v int) predicate.Ue {
|
func GameStoryNEQ(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldNEQ(FieldGameStory, v))
|
return predicate.Ue(sql.FieldNEQ(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryIn applies the In predicate on the "game_story" field.
|
// GameStoryIn applies the In predicate on the "game_story" field.
|
||||||
func GameStoryIn(vs ...int) predicate.Ue {
|
func GameStoryIn(vs ...string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldIn(FieldGameStory, vs...))
|
return predicate.Ue(sql.FieldIn(FieldGameStory, vs...))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryNotIn applies the NotIn predicate on the "game_story" field.
|
// GameStoryNotIn applies the NotIn predicate on the "game_story" field.
|
||||||
func GameStoryNotIn(vs ...int) predicate.Ue {
|
func GameStoryNotIn(vs ...string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldNotIn(FieldGameStory, vs...))
|
return predicate.Ue(sql.FieldNotIn(FieldGameStory, vs...))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryGT applies the GT predicate on the "game_story" field.
|
// GameStoryGT applies the GT predicate on the "game_story" field.
|
||||||
func GameStoryGT(v int) predicate.Ue {
|
func GameStoryGT(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldGT(FieldGameStory, v))
|
return predicate.Ue(sql.FieldGT(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryGTE applies the GTE predicate on the "game_story" field.
|
// GameStoryGTE applies the GTE predicate on the "game_story" field.
|
||||||
func GameStoryGTE(v int) predicate.Ue {
|
func GameStoryGTE(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldGTE(FieldGameStory, v))
|
return predicate.Ue(sql.FieldGTE(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryLT applies the LT predicate on the "game_story" field.
|
// GameStoryLT applies the LT predicate on the "game_story" field.
|
||||||
func GameStoryLT(v int) predicate.Ue {
|
func GameStoryLT(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldLT(FieldGameStory, v))
|
return predicate.Ue(sql.FieldLT(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GameStoryLTE applies the LTE predicate on the "game_story" field.
|
// GameStoryLTE applies the LTE predicate on the "game_story" field.
|
||||||
func GameStoryLTE(v int) predicate.Ue {
|
func GameStoryLTE(v string) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldLTE(FieldGameStory, v))
|
return predicate.Ue(sql.FieldLTE(FieldGameStory, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStoryContains applies the Contains predicate on the "game_story" field.
|
||||||
|
func GameStoryContains(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldContains(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryHasPrefix applies the HasPrefix predicate on the "game_story" field.
|
||||||
|
func GameStoryHasPrefix(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldHasPrefix(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryHasSuffix applies the HasSuffix predicate on the "game_story" field.
|
||||||
|
func GameStoryHasSuffix(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldHasSuffix(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
// GameStoryIsNil applies the IsNil predicate on the "game_story" field.
|
// GameStoryIsNil applies the IsNil predicate on the "game_story" field.
|
||||||
func GameStoryIsNil() predicate.Ue {
|
func GameStoryIsNil() predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldIsNull(FieldGameStory))
|
return predicate.Ue(sql.FieldIsNull(FieldGameStory))
|
||||||
@ -1345,6 +1360,16 @@ func GameStoryNotNil() predicate.Ue {
|
|||||||
return predicate.Ue(sql.FieldNotNull(FieldGameStory))
|
return predicate.Ue(sql.FieldNotNull(FieldGameStory))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStoryEqualFold applies the EqualFold predicate on the "game_story" field.
|
||||||
|
func GameStoryEqualFold(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEqualFold(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryContainsFold applies the ContainsFold predicate on the "game_story" field.
|
||||||
|
func GameStoryContainsFold(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldContainsFold(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||||
func CreatedAtEQ(v time.Time) predicate.Ue {
|
func CreatedAtEQ(v time.Time) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))
|
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))
|
||||||
|
@ -308,15 +308,15 @@ func (uc *UeCreate) SetNillableGameID(s *string) *UeCreate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the "game_story" field.
|
// SetGameStory sets the "game_story" field.
|
||||||
func (uc *UeCreate) SetGameStory(i int) *UeCreate {
|
func (uc *UeCreate) SetGameStory(s string) *UeCreate {
|
||||||
uc.mutation.SetGameStory(i)
|
uc.mutation.SetGameStory(s)
|
||||||
return uc
|
return uc
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||||
func (uc *UeCreate) SetNillableGameStory(i *int) *UeCreate {
|
func (uc *UeCreate) SetNillableGameStory(s *string) *UeCreate {
|
||||||
if i != nil {
|
if s != nil {
|
||||||
uc.SetGameStory(*i)
|
uc.SetGameStory(*s)
|
||||||
}
|
}
|
||||||
return uc
|
return uc
|
||||||
}
|
}
|
||||||
@ -523,7 +523,7 @@ func (uc *UeCreate) createSpec() (*Ue, *sqlgraph.CreateSpec) {
|
|||||||
_node.GameID = value
|
_node.GameID = value
|
||||||
}
|
}
|
||||||
if value, ok := uc.mutation.GameStory(); ok {
|
if value, ok := uc.mutation.GameStory(); ok {
|
||||||
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
_spec.SetField(ue.FieldGameStory, field.TypeString, value)
|
||||||
_node.GameStory = value
|
_node.GameStory = value
|
||||||
}
|
}
|
||||||
if value, ok := uc.mutation.CreatedAt(); ok {
|
if value, ok := uc.mutation.CreatedAt(); ok {
|
||||||
|
@ -506,26 +506,19 @@ func (uu *UeUpdate) ClearGameID() *UeUpdate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the "game_story" field.
|
// SetGameStory sets the "game_story" field.
|
||||||
func (uu *UeUpdate) SetGameStory(i int) *UeUpdate {
|
func (uu *UeUpdate) SetGameStory(s string) *UeUpdate {
|
||||||
uu.mutation.ResetGameStory()
|
uu.mutation.SetGameStory(s)
|
||||||
uu.mutation.SetGameStory(i)
|
|
||||||
return uu
|
return uu
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||||
func (uu *UeUpdate) SetNillableGameStory(i *int) *UeUpdate {
|
func (uu *UeUpdate) SetNillableGameStory(s *string) *UeUpdate {
|
||||||
if i != nil {
|
if s != nil {
|
||||||
uu.SetGameStory(*i)
|
uu.SetGameStory(*s)
|
||||||
}
|
}
|
||||||
return uu
|
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.
|
// ClearGameStory clears the value of the "game_story" field.
|
||||||
func (uu *UeUpdate) ClearGameStory() *UeUpdate {
|
func (uu *UeUpdate) ClearGameStory() *UeUpdate {
|
||||||
uu.mutation.ClearGameStory()
|
uu.mutation.ClearGameStory()
|
||||||
@ -755,13 +748,10 @@ func (uu *UeUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||||
}
|
}
|
||||||
if value, ok := uu.mutation.GameStory(); ok {
|
if value, ok := uu.mutation.GameStory(); ok {
|
||||||
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
_spec.SetField(ue.FieldGameStory, field.TypeString, value)
|
||||||
}
|
|
||||||
if value, ok := uu.mutation.AddedGameStory(); ok {
|
|
||||||
_spec.AddField(ue.FieldGameStory, field.TypeInt, value)
|
|
||||||
}
|
}
|
||||||
if uu.mutation.GameStoryCleared() {
|
if uu.mutation.GameStoryCleared() {
|
||||||
_spec.ClearField(ue.FieldGameStory, field.TypeInt)
|
_spec.ClearField(ue.FieldGameStory, field.TypeString)
|
||||||
}
|
}
|
||||||
if uu.mutation.CreatedAtCleared() {
|
if uu.mutation.CreatedAtCleared() {
|
||||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||||
@ -1293,26 +1283,19 @@ func (uuo *UeUpdateOne) ClearGameID() *UeUpdateOne {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetGameStory sets the "game_story" field.
|
// SetGameStory sets the "game_story" field.
|
||||||
func (uuo *UeUpdateOne) SetGameStory(i int) *UeUpdateOne {
|
func (uuo *UeUpdateOne) SetGameStory(s string) *UeUpdateOne {
|
||||||
uuo.mutation.ResetGameStory()
|
uuo.mutation.SetGameStory(s)
|
||||||
uuo.mutation.SetGameStory(i)
|
|
||||||
return uuo
|
return uuo
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||||
func (uuo *UeUpdateOne) SetNillableGameStory(i *int) *UeUpdateOne {
|
func (uuo *UeUpdateOne) SetNillableGameStory(s *string) *UeUpdateOne {
|
||||||
if i != nil {
|
if s != nil {
|
||||||
uuo.SetGameStory(*i)
|
uuo.SetGameStory(*s)
|
||||||
}
|
}
|
||||||
return uuo
|
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.
|
// ClearGameStory clears the value of the "game_story" field.
|
||||||
func (uuo *UeUpdateOne) ClearGameStory() *UeUpdateOne {
|
func (uuo *UeUpdateOne) ClearGameStory() *UeUpdateOne {
|
||||||
uuo.mutation.ClearGameStory()
|
uuo.mutation.ClearGameStory()
|
||||||
@ -1572,13 +1555,10 @@ func (uuo *UeUpdateOne) sqlSave(ctx context.Context) (_node *Ue, err error) {
|
|||||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
||||||
}
|
}
|
||||||
if value, ok := uuo.mutation.GameStory(); ok {
|
if value, ok := uuo.mutation.GameStory(); ok {
|
||||||
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
_spec.SetField(ue.FieldGameStory, field.TypeString, value)
|
||||||
}
|
|
||||||
if value, ok := uuo.mutation.AddedGameStory(); ok {
|
|
||||||
_spec.AddField(ue.FieldGameStory, field.TypeInt, value)
|
|
||||||
}
|
}
|
||||||
if uuo.mutation.GameStoryCleared() {
|
if uuo.mutation.GameStoryCleared() {
|
||||||
_spec.ClearField(ue.FieldGameStory, field.TypeInt)
|
_spec.ClearField(ue.FieldGameStory, field.TypeString)
|
||||||
}
|
}
|
||||||
if uuo.mutation.CreatedAtCleared() {
|
if uuo.mutation.CreatedAtCleared() {
|
||||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||||
|
Loading…
Reference in New Issue
Block a user