fix game story
This commit is contained in:
parent
e508a50025
commit
a01e86d8b3
@ -153,6 +153,8 @@ 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_ep", 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},
|
||||||
}
|
}
|
||||||
@ -164,7 +166,7 @@ var (
|
|||||||
ForeignKeys: []*schema.ForeignKey{
|
ForeignKeys: []*schema.ForeignKey{
|
||||||
{
|
{
|
||||||
Symbol: "ues_users_ue",
|
Symbol: "ues_users_ue",
|
||||||
Columns: []*schema.Column{UesColumns[23]},
|
Columns: []*schema.Column{UesColumns[25]},
|
||||||
RefColumns: []*schema.Column{UsersColumns[0]},
|
RefColumns: []*schema.Column{UsersColumns[0]},
|
||||||
OnDelete: schema.NoAction,
|
OnDelete: schema.NoAction,
|
||||||
},
|
},
|
||||||
@ -205,7 +207,7 @@ var (
|
|||||||
{Name: "ten_post", Type: field.TypeString, Nullable: true},
|
{Name: "ten_post", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "ten_get", Type: field.TypeString, Nullable: true},
|
{Name: "ten_get", Type: field.TypeString, Nullable: true},
|
||||||
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
|
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
|
||||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240601"},
|
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240607"},
|
||||||
{Name: "room", Type: field.TypeInt, Nullable: true},
|
{Name: "room", Type: field.TypeInt, Nullable: true},
|
||||||
{Name: "model", Type: field.TypeBool, Nullable: true},
|
{Name: "model", Type: field.TypeBool, Nullable: true},
|
||||||
{Name: "model_at", Type: field.TypeTime, Nullable: true},
|
{Name: "model_at", Type: field.TypeTime, Nullable: true},
|
||||||
@ -221,6 +223,8 @@ var (
|
|||||||
{Name: "game_account", Type: field.TypeBool, Nullable: true, Default: false},
|
{Name: "game_account", Type: field.TypeBool, Nullable: true, Default: false},
|
||||||
{Name: "game_lv", Type: field.TypeInt, Nullable: true},
|
{Name: "game_lv", Type: field.TypeInt, Nullable: true},
|
||||||
{Name: "game_exp", Type: field.TypeInt, Nullable: true},
|
{Name: "game_exp", Type: field.TypeInt, Nullable: true},
|
||||||
|
{Name: "game_story", Type: field.TypeInt, Nullable: true},
|
||||||
|
{Name: "game_limit", Type: field.TypeBool, Nullable: true, Default: false},
|
||||||
{Name: "coin", Type: field.TypeInt, Nullable: true},
|
{Name: "coin", Type: field.TypeInt, Nullable: true},
|
||||||
{Name: "coin_open", Type: field.TypeBool, Nullable: true, Default: false},
|
{Name: "coin_open", Type: field.TypeBool, Nullable: true, Default: false},
|
||||||
{Name: "coin_at", Type: field.TypeTime, Nullable: true},
|
{Name: "coin_at", Type: field.TypeTime, Nullable: true},
|
||||||
@ -234,7 +238,7 @@ var (
|
|||||||
ForeignKeys: []*schema.ForeignKey{
|
ForeignKeys: []*schema.ForeignKey{
|
||||||
{
|
{
|
||||||
Symbol: "users_groups_users",
|
Symbol: "users_groups_users",
|
||||||
Columns: []*schema.Column{UsersColumns[52]},
|
Columns: []*schema.Column{UsersColumns[54]},
|
||||||
RefColumns: []*schema.Column{GroupsColumns[0]},
|
RefColumns: []*schema.Column{GroupsColumns[0]},
|
||||||
OnDelete: schema.SetNull,
|
OnDelete: schema.SetNull,
|
||||||
},
|
},
|
||||||
|
364
ent/mutation.go
364
ent/mutation.go
@ -5117,6 +5117,9 @@ type UeMutation struct {
|
|||||||
game_lv *string
|
game_lv *string
|
||||||
game_exp *string
|
game_exp *string
|
||||||
game_id *string
|
game_id *string
|
||||||
|
game_story *int
|
||||||
|
addgame_story *int
|
||||||
|
game_ep *string
|
||||||
created_at *time.Time
|
created_at *time.Time
|
||||||
clearedFields map[string]struct{}
|
clearedFields map[string]struct{}
|
||||||
owner *int
|
owner *int
|
||||||
@ -6471,6 +6474,125 @@ func (m *UeMutation) ResetGameID() {
|
|||||||
delete(m.clearedFields, ue.FieldGameID)
|
delete(m.clearedFields, ue.FieldGameID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the "game_story" field.
|
||||||
|
func (m *UeMutation) SetGameStory(i int) {
|
||||||
|
m.game_story = &i
|
||||||
|
m.addgame_story = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStory returns the value of the "game_story" field in the mutation.
|
||||||
|
func (m *UeMutation) GameStory() (r int, exists bool) {
|
||||||
|
v := m.game_story
|
||||||
|
if v == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return *v, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
// 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) {
|
||||||
|
if !m.op.Is(OpUpdateOne) {
|
||||||
|
return v, errors.New("OldGameStory is only allowed on UpdateOne operations")
|
||||||
|
}
|
||||||
|
if m.id == nil || m.oldValue == nil {
|
||||||
|
return v, errors.New("OldGameStory requires an ID field in the mutation")
|
||||||
|
}
|
||||||
|
oldValue, err := m.oldValue(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return v, fmt.Errorf("querying old value for OldGameStory: %w", err)
|
||||||
|
}
|
||||||
|
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.
|
||||||
|
func (m *UeMutation) ClearGameStory() {
|
||||||
|
m.game_story = nil
|
||||||
|
m.addgame_story = nil
|
||||||
|
m.clearedFields[ue.FieldGameStory] = struct{}{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryCleared returns if the "game_story" field was cleared in this mutation.
|
||||||
|
func (m *UeMutation) GameStoryCleared() bool {
|
||||||
|
_, ok := m.clearedFields[ue.FieldGameStory]
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResetGameStory resets all changes to the "game_story" field.
|
||||||
|
func (m *UeMutation) ResetGameStory() {
|
||||||
|
m.game_story = nil
|
||||||
|
m.addgame_story = nil
|
||||||
|
delete(m.clearedFields, ue.FieldGameStory)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the "game_ep" field.
|
||||||
|
func (m *UeMutation) SetGameEp(s string) {
|
||||||
|
m.game_ep = &s
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEp returns the value of the "game_ep" field in the mutation.
|
||||||
|
func (m *UeMutation) GameEp() (r string, exists bool) {
|
||||||
|
v := m.game_ep
|
||||||
|
if v == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return *v, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// OldGameEp returns the old "game_ep" field's value of the Ue entity.
|
||||||
|
// 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.
|
||||||
|
func (m *UeMutation) OldGameEp(ctx context.Context) (v string, err error) {
|
||||||
|
if !m.op.Is(OpUpdateOne) {
|
||||||
|
return v, errors.New("OldGameEp is only allowed on UpdateOne operations")
|
||||||
|
}
|
||||||
|
if m.id == nil || m.oldValue == nil {
|
||||||
|
return v, errors.New("OldGameEp requires an ID field in the mutation")
|
||||||
|
}
|
||||||
|
oldValue, err := m.oldValue(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return v, fmt.Errorf("querying old value for OldGameEp: %w", err)
|
||||||
|
}
|
||||||
|
return oldValue.GameEp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClearGameEp clears the value of the "game_ep" field.
|
||||||
|
func (m *UeMutation) ClearGameEp() {
|
||||||
|
m.game_ep = nil
|
||||||
|
m.clearedFields[ue.FieldGameEp] = struct{}{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpCleared returns if the "game_ep" field was cleared in this mutation.
|
||||||
|
func (m *UeMutation) GameEpCleared() bool {
|
||||||
|
_, ok := m.clearedFields[ue.FieldGameEp]
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResetGameEp resets all changes to the "game_ep" field.
|
||||||
|
func (m *UeMutation) ResetGameEp() {
|
||||||
|
m.game_ep = nil
|
||||||
|
delete(m.clearedFields, ue.FieldGameEp)
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the "created_at" field.
|
// SetCreatedAt sets the "created_at" field.
|
||||||
func (m *UeMutation) SetCreatedAt(t time.Time) {
|
func (m *UeMutation) SetCreatedAt(t time.Time) {
|
||||||
m.created_at = &t
|
m.created_at = &t
|
||||||
@ -6593,7 +6715,7 @@ func (m *UeMutation) Type() string {
|
|||||||
// order to get all numeric fields that were incremented/decremented, call
|
// order to get all numeric fields that were incremented/decremented, call
|
||||||
// AddedFields().
|
// AddedFields().
|
||||||
func (m *UeMutation) Fields() []string {
|
func (m *UeMutation) Fields() []string {
|
||||||
fields := make([]string, 0, 22)
|
fields := make([]string, 0, 24)
|
||||||
if m._limit != nil {
|
if m._limit != nil {
|
||||||
fields = append(fields, ue.FieldLimit)
|
fields = append(fields, ue.FieldLimit)
|
||||||
}
|
}
|
||||||
@ -6657,6 +6779,12 @@ func (m *UeMutation) Fields() []string {
|
|||||||
if m.game_id != nil {
|
if m.game_id != nil {
|
||||||
fields = append(fields, ue.FieldGameID)
|
fields = append(fields, ue.FieldGameID)
|
||||||
}
|
}
|
||||||
|
if m.game_story != nil {
|
||||||
|
fields = append(fields, ue.FieldGameStory)
|
||||||
|
}
|
||||||
|
if m.game_ep != nil {
|
||||||
|
fields = append(fields, ue.FieldGameEp)
|
||||||
|
}
|
||||||
if m.created_at != nil {
|
if m.created_at != nil {
|
||||||
fields = append(fields, ue.FieldCreatedAt)
|
fields = append(fields, ue.FieldCreatedAt)
|
||||||
}
|
}
|
||||||
@ -6710,6 +6838,10 @@ func (m *UeMutation) Field(name string) (ent.Value, bool) {
|
|||||||
return m.GameExp()
|
return m.GameExp()
|
||||||
case ue.FieldGameID:
|
case ue.FieldGameID:
|
||||||
return m.GameID()
|
return m.GameID()
|
||||||
|
case ue.FieldGameStory:
|
||||||
|
return m.GameStory()
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
return m.GameEp()
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
return m.CreatedAt()
|
return m.CreatedAt()
|
||||||
}
|
}
|
||||||
@ -6763,6 +6895,10 @@ func (m *UeMutation) OldField(ctx context.Context, name string) (ent.Value, erro
|
|||||||
return m.OldGameExp(ctx)
|
return m.OldGameExp(ctx)
|
||||||
case ue.FieldGameID:
|
case ue.FieldGameID:
|
||||||
return m.OldGameID(ctx)
|
return m.OldGameID(ctx)
|
||||||
|
case ue.FieldGameStory:
|
||||||
|
return m.OldGameStory(ctx)
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
return m.OldGameEp(ctx)
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
return m.OldCreatedAt(ctx)
|
return m.OldCreatedAt(ctx)
|
||||||
}
|
}
|
||||||
@ -6921,6 +7057,20 @@ func (m *UeMutation) SetField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.SetGameID(v)
|
m.SetGameID(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.SetGameStory(v)
|
||||||
|
return nil
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
v, ok := value.(string)
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||||
|
}
|
||||||
|
m.SetGameEp(v)
|
||||||
|
return nil
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
v, ok := value.(time.Time)
|
v, ok := value.(time.Time)
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -6969,6 +7119,9 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6999,6 +7152,8 @@ 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
|
||||||
}
|
}
|
||||||
@ -7085,6 +7240,13 @@ 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)
|
||||||
}
|
}
|
||||||
@ -7153,6 +7315,12 @@ func (m *UeMutation) ClearedFields() []string {
|
|||||||
if m.FieldCleared(ue.FieldGameID) {
|
if m.FieldCleared(ue.FieldGameID) {
|
||||||
fields = append(fields, ue.FieldGameID)
|
fields = append(fields, ue.FieldGameID)
|
||||||
}
|
}
|
||||||
|
if m.FieldCleared(ue.FieldGameStory) {
|
||||||
|
fields = append(fields, ue.FieldGameStory)
|
||||||
|
}
|
||||||
|
if m.FieldCleared(ue.FieldGameEp) {
|
||||||
|
fields = append(fields, ue.FieldGameEp)
|
||||||
|
}
|
||||||
if m.FieldCleared(ue.FieldCreatedAt) {
|
if m.FieldCleared(ue.FieldCreatedAt) {
|
||||||
fields = append(fields, ue.FieldCreatedAt)
|
fields = append(fields, ue.FieldCreatedAt)
|
||||||
}
|
}
|
||||||
@ -7230,6 +7398,12 @@ func (m *UeMutation) ClearField(name string) error {
|
|||||||
case ue.FieldGameID:
|
case ue.FieldGameID:
|
||||||
m.ClearGameID()
|
m.ClearGameID()
|
||||||
return nil
|
return nil
|
||||||
|
case ue.FieldGameStory:
|
||||||
|
m.ClearGameStory()
|
||||||
|
return nil
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
m.ClearGameEp()
|
||||||
|
return nil
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
m.ClearCreatedAt()
|
m.ClearCreatedAt()
|
||||||
return nil
|
return nil
|
||||||
@ -7304,6 +7478,12 @@ func (m *UeMutation) ResetField(name string) error {
|
|||||||
case ue.FieldGameID:
|
case ue.FieldGameID:
|
||||||
m.ResetGameID()
|
m.ResetGameID()
|
||||||
return nil
|
return nil
|
||||||
|
case ue.FieldGameStory:
|
||||||
|
m.ResetGameStory()
|
||||||
|
return nil
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
m.ResetGameEp()
|
||||||
|
return nil
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
m.ResetCreatedAt()
|
m.ResetCreatedAt()
|
||||||
return nil
|
return nil
|
||||||
@ -7455,6 +7635,9 @@ type UserMutation struct {
|
|||||||
addgame_lv *int
|
addgame_lv *int
|
||||||
game_exp *int
|
game_exp *int
|
||||||
addgame_exp *int
|
addgame_exp *int
|
||||||
|
game_story *int
|
||||||
|
addgame_story *int
|
||||||
|
game_limit *bool
|
||||||
coin *int
|
coin *int
|
||||||
addcoin *int
|
addcoin *int
|
||||||
coin_open *bool
|
coin_open *bool
|
||||||
@ -10237,6 +10420,125 @@ func (m *UserMutation) ResetGameExp() {
|
|||||||
delete(m.clearedFields, user.FieldGameExp)
|
delete(m.clearedFields, user.FieldGameExp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the "game_story" field.
|
||||||
|
func (m *UserMutation) SetGameStory(i int) {
|
||||||
|
m.game_story = &i
|
||||||
|
m.addgame_story = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStory returns the value of the "game_story" field in the mutation.
|
||||||
|
func (m *UserMutation) GameStory() (r int, exists bool) {
|
||||||
|
v := m.game_story
|
||||||
|
if v == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return *v, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// OldGameStory returns the old "game_story" field's value of the User entity.
|
||||||
|
// If the User 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.
|
||||||
|
func (m *UserMutation) OldGameStory(ctx context.Context) (v int, err error) {
|
||||||
|
if !m.op.Is(OpUpdateOne) {
|
||||||
|
return v, errors.New("OldGameStory is only allowed on UpdateOne operations")
|
||||||
|
}
|
||||||
|
if m.id == nil || m.oldValue == nil {
|
||||||
|
return v, errors.New("OldGameStory requires an ID field in the mutation")
|
||||||
|
}
|
||||||
|
oldValue, err := m.oldValue(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return v, fmt.Errorf("querying old value for OldGameStory: %w", err)
|
||||||
|
}
|
||||||
|
return oldValue.GameStory, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddGameStory adds i to the "game_story" field.
|
||||||
|
func (m *UserMutation) 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 *UserMutation) 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.
|
||||||
|
func (m *UserMutation) ClearGameStory() {
|
||||||
|
m.game_story = nil
|
||||||
|
m.addgame_story = nil
|
||||||
|
m.clearedFields[user.FieldGameStory] = struct{}{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryCleared returns if the "game_story" field was cleared in this mutation.
|
||||||
|
func (m *UserMutation) GameStoryCleared() bool {
|
||||||
|
_, ok := m.clearedFields[user.FieldGameStory]
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResetGameStory resets all changes to the "game_story" field.
|
||||||
|
func (m *UserMutation) ResetGameStory() {
|
||||||
|
m.game_story = nil
|
||||||
|
m.addgame_story = nil
|
||||||
|
delete(m.clearedFields, user.FieldGameStory)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the "game_limit" field.
|
||||||
|
func (m *UserMutation) SetGameLimit(b bool) {
|
||||||
|
m.game_limit = &b
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimit returns the value of the "game_limit" field in the mutation.
|
||||||
|
func (m *UserMutation) GameLimit() (r bool, exists bool) {
|
||||||
|
v := m.game_limit
|
||||||
|
if v == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return *v, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// OldGameLimit returns the old "game_limit" field's value of the User entity.
|
||||||
|
// If the User 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.
|
||||||
|
func (m *UserMutation) OldGameLimit(ctx context.Context) (v bool, err error) {
|
||||||
|
if !m.op.Is(OpUpdateOne) {
|
||||||
|
return v, errors.New("OldGameLimit is only allowed on UpdateOne operations")
|
||||||
|
}
|
||||||
|
if m.id == nil || m.oldValue == nil {
|
||||||
|
return v, errors.New("OldGameLimit requires an ID field in the mutation")
|
||||||
|
}
|
||||||
|
oldValue, err := m.oldValue(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return v, fmt.Errorf("querying old value for OldGameLimit: %w", err)
|
||||||
|
}
|
||||||
|
return oldValue.GameLimit, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClearGameLimit clears the value of the "game_limit" field.
|
||||||
|
func (m *UserMutation) ClearGameLimit() {
|
||||||
|
m.game_limit = nil
|
||||||
|
m.clearedFields[user.FieldGameLimit] = struct{}{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimitCleared returns if the "game_limit" field was cleared in this mutation.
|
||||||
|
func (m *UserMutation) GameLimitCleared() bool {
|
||||||
|
_, ok := m.clearedFields[user.FieldGameLimit]
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResetGameLimit resets all changes to the "game_limit" field.
|
||||||
|
func (m *UserMutation) ResetGameLimit() {
|
||||||
|
m.game_limit = nil
|
||||||
|
delete(m.clearedFields, user.FieldGameLimit)
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the "coin" field.
|
// SetCoin sets the "coin" field.
|
||||||
func (m *UserMutation) SetCoin(i int) {
|
func (m *UserMutation) SetCoin(i int) {
|
||||||
m.coin = &i
|
m.coin = &i
|
||||||
@ -10655,7 +10957,7 @@ func (m *UserMutation) Type() string {
|
|||||||
// order to get all numeric fields that were incremented/decremented, call
|
// order to get all numeric fields that were incremented/decremented, call
|
||||||
// AddedFields().
|
// AddedFields().
|
||||||
func (m *UserMutation) Fields() []string {
|
func (m *UserMutation) Fields() []string {
|
||||||
fields := make([]string, 0, 51)
|
fields := make([]string, 0, 53)
|
||||||
if m.username != nil {
|
if m.username != nil {
|
||||||
fields = append(fields, user.FieldUsername)
|
fields = append(fields, user.FieldUsername)
|
||||||
}
|
}
|
||||||
@ -10800,6 +11102,12 @@ func (m *UserMutation) Fields() []string {
|
|||||||
if m.game_exp != nil {
|
if m.game_exp != nil {
|
||||||
fields = append(fields, user.FieldGameExp)
|
fields = append(fields, user.FieldGameExp)
|
||||||
}
|
}
|
||||||
|
if m.game_story != nil {
|
||||||
|
fields = append(fields, user.FieldGameStory)
|
||||||
|
}
|
||||||
|
if m.game_limit != nil {
|
||||||
|
fields = append(fields, user.FieldGameLimit)
|
||||||
|
}
|
||||||
if m.coin != nil {
|
if m.coin != nil {
|
||||||
fields = append(fields, user.FieldCoin)
|
fields = append(fields, user.FieldCoin)
|
||||||
}
|
}
|
||||||
@ -10913,6 +11221,10 @@ func (m *UserMutation) Field(name string) (ent.Value, bool) {
|
|||||||
return m.GameLv()
|
return m.GameLv()
|
||||||
case user.FieldGameExp:
|
case user.FieldGameExp:
|
||||||
return m.GameExp()
|
return m.GameExp()
|
||||||
|
case user.FieldGameStory:
|
||||||
|
return m.GameStory()
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
return m.GameLimit()
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
return m.Coin()
|
return m.Coin()
|
||||||
case user.FieldCoinOpen:
|
case user.FieldCoinOpen:
|
||||||
@ -11024,6 +11336,10 @@ func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, er
|
|||||||
return m.OldGameLv(ctx)
|
return m.OldGameLv(ctx)
|
||||||
case user.FieldGameExp:
|
case user.FieldGameExp:
|
||||||
return m.OldGameExp(ctx)
|
return m.OldGameExp(ctx)
|
||||||
|
case user.FieldGameStory:
|
||||||
|
return m.OldGameStory(ctx)
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
return m.OldGameLimit(ctx)
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
return m.OldCoin(ctx)
|
return m.OldCoin(ctx)
|
||||||
case user.FieldCoinOpen:
|
case user.FieldCoinOpen:
|
||||||
@ -11375,6 +11691,20 @@ func (m *UserMutation) SetField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.SetGameExp(v)
|
m.SetGameExp(v)
|
||||||
return nil
|
return nil
|
||||||
|
case user.FieldGameStory:
|
||||||
|
v, ok := value.(int)
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||||
|
}
|
||||||
|
m.SetGameStory(v)
|
||||||
|
return nil
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
v, ok := value.(bool)
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||||
|
}
|
||||||
|
m.SetGameLimit(v)
|
||||||
|
return nil
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
v, ok := value.(int)
|
v, ok := value.(int)
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -11452,6 +11782,9 @@ func (m *UserMutation) AddedFields() []string {
|
|||||||
if m.addgame_exp != nil {
|
if m.addgame_exp != nil {
|
||||||
fields = append(fields, user.FieldGameExp)
|
fields = append(fields, user.FieldGameExp)
|
||||||
}
|
}
|
||||||
|
if m.addgame_story != nil {
|
||||||
|
fields = append(fields, user.FieldGameStory)
|
||||||
|
}
|
||||||
if m.addcoin != nil {
|
if m.addcoin != nil {
|
||||||
fields = append(fields, user.FieldCoin)
|
fields = append(fields, user.FieldCoin)
|
||||||
}
|
}
|
||||||
@ -11495,6 +11828,8 @@ func (m *UserMutation) AddedField(name string) (ent.Value, bool) {
|
|||||||
return m.AddedGameLv()
|
return m.AddedGameLv()
|
||||||
case user.FieldGameExp:
|
case user.FieldGameExp:
|
||||||
return m.AddedGameExp()
|
return m.AddedGameExp()
|
||||||
|
case user.FieldGameStory:
|
||||||
|
return m.AddedGameStory()
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
return m.AddedCoin()
|
return m.AddedCoin()
|
||||||
}
|
}
|
||||||
@ -11618,6 +11953,13 @@ func (m *UserMutation) AddField(name string, value ent.Value) error {
|
|||||||
}
|
}
|
||||||
m.AddGameExp(v)
|
m.AddGameExp(v)
|
||||||
return nil
|
return nil
|
||||||
|
case user.FieldGameStory:
|
||||||
|
v, ok := value.(int)
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||||
|
}
|
||||||
|
m.AddGameStory(v)
|
||||||
|
return nil
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
v, ok := value.(int)
|
v, ok := value.(int)
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -11771,6 +12113,12 @@ func (m *UserMutation) ClearedFields() []string {
|
|||||||
if m.FieldCleared(user.FieldGameExp) {
|
if m.FieldCleared(user.FieldGameExp) {
|
||||||
fields = append(fields, user.FieldGameExp)
|
fields = append(fields, user.FieldGameExp)
|
||||||
}
|
}
|
||||||
|
if m.FieldCleared(user.FieldGameStory) {
|
||||||
|
fields = append(fields, user.FieldGameStory)
|
||||||
|
}
|
||||||
|
if m.FieldCleared(user.FieldGameLimit) {
|
||||||
|
fields = append(fields, user.FieldGameLimit)
|
||||||
|
}
|
||||||
if m.FieldCleared(user.FieldCoin) {
|
if m.FieldCleared(user.FieldCoin) {
|
||||||
fields = append(fields, user.FieldCoin)
|
fields = append(fields, user.FieldCoin)
|
||||||
}
|
}
|
||||||
@ -11932,6 +12280,12 @@ func (m *UserMutation) ClearField(name string) error {
|
|||||||
case user.FieldGameExp:
|
case user.FieldGameExp:
|
||||||
m.ClearGameExp()
|
m.ClearGameExp()
|
||||||
return nil
|
return nil
|
||||||
|
case user.FieldGameStory:
|
||||||
|
m.ClearGameStory()
|
||||||
|
return nil
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
m.ClearGameLimit()
|
||||||
|
return nil
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
m.ClearCoin()
|
m.ClearCoin()
|
||||||
return nil
|
return nil
|
||||||
@ -12093,6 +12447,12 @@ func (m *UserMutation) ResetField(name string) error {
|
|||||||
case user.FieldGameExp:
|
case user.FieldGameExp:
|
||||||
m.ResetGameExp()
|
m.ResetGameExp()
|
||||||
return nil
|
return nil
|
||||||
|
case user.FieldGameStory:
|
||||||
|
m.ResetGameStory()
|
||||||
|
return nil
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
m.ResetGameLimit()
|
||||||
|
return nil
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
m.ResetCoin()
|
m.ResetCoin()
|
||||||
return nil
|
return nil
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -265,6 +265,8 @@ type CardOwnerRead struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -505,6 +507,16 @@ func (s *CardOwnerRead) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *CardOwnerRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *CardOwnerRead) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *CardOwnerRead) GetCoin() OptInt {
|
func (s *CardOwnerRead) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -755,6 +767,16 @@ func (s *CardOwnerRead) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *CardOwnerRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *CardOwnerRead) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *CardOwnerRead) SetCoin(val OptInt) {
|
func (s *CardOwnerRead) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -1577,6 +1599,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
Owner int `json:"owner"`
|
Owner int `json:"owner"`
|
||||||
}
|
}
|
||||||
@ -1686,6 +1710,16 @@ func (s *CreateUeReq) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *CreateUeReq) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *CreateUeReq) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *CreateUeReq) GetCreatedAt() OptDateTime {
|
func (s *CreateUeReq) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -1801,6 +1835,16 @@ func (s *CreateUeReq) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *CreateUeReq) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *CreateUeReq) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *CreateUeReq) SetCreatedAt(val OptDateTime) {
|
func (s *CreateUeReq) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -1860,6 +1904,8 @@ type CreateUserReq struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -2109,6 +2155,16 @@ func (s *CreateUserReq) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *CreateUserReq) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *CreateUserReq) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *CreateUserReq) GetCoin() OptInt {
|
func (s *CreateUserReq) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -2384,6 +2440,16 @@ func (s *CreateUserReq) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *CreateUserReq) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *CreateUserReq) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *CreateUserReq) SetCoin(val OptInt) {
|
func (s *CreateUserReq) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -2614,6 +2680,8 @@ type GroupUsersList struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -2854,6 +2922,16 @@ func (s *GroupUsersList) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *GroupUsersList) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *GroupUsersList) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *GroupUsersList) GetCoin() OptInt {
|
func (s *GroupUsersList) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -3104,6 +3182,16 @@ func (s *GroupUsersList) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *GroupUsersList) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *GroupUsersList) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *GroupUsersList) SetCoin(val OptInt) {
|
func (s *GroupUsersList) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -3706,6 +3794,8 @@ type MaOwnerRead struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -3946,6 +4036,16 @@ func (s *MaOwnerRead) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *MaOwnerRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *MaOwnerRead) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *MaOwnerRead) GetCoin() OptInt {
|
func (s *MaOwnerRead) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -4196,6 +4296,16 @@ func (s *MaOwnerRead) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *MaOwnerRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *MaOwnerRead) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *MaOwnerRead) SetCoin(val OptInt) {
|
func (s *MaOwnerRead) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -5492,6 +5602,8 @@ type SevOwnerRead struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -5732,6 +5844,16 @@ func (s *SevOwnerRead) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *SevOwnerRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *SevOwnerRead) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *SevOwnerRead) GetCoin() OptInt {
|
func (s *SevOwnerRead) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -5982,6 +6104,16 @@ func (s *SevOwnerRead) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *SevOwnerRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *SevOwnerRead) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *SevOwnerRead) SetCoin(val OptInt) {
|
func (s *SevOwnerRead) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -6275,6 +6407,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6378,6 +6512,16 @@ func (s *UeCreate) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UeCreate) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UeCreate) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *UeCreate) GetCreatedAt() OptDateTime {
|
func (s *UeCreate) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -6483,6 +6627,16 @@ func (s *UeCreate) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UeCreate) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UeCreate) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *UeCreate) SetCreatedAt(val OptDateTime) {
|
func (s *UeCreate) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -6512,6 +6666,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6615,6 +6771,16 @@ func (s *UeList) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UeList) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UeList) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *UeList) GetCreatedAt() OptDateTime {
|
func (s *UeList) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -6720,6 +6886,16 @@ func (s *UeList) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UeList) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UeList) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *UeList) SetCreatedAt(val OptDateTime) {
|
func (s *UeList) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -6774,6 +6950,8 @@ type UeOwnerRead struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -7014,6 +7192,16 @@ func (s *UeOwnerRead) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UeOwnerRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UeOwnerRead) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UeOwnerRead) GetCoin() OptInt {
|
func (s *UeOwnerRead) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -7264,6 +7452,16 @@ func (s *UeOwnerRead) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UeOwnerRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UeOwnerRead) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UeOwnerRead) SetCoin(val OptInt) {
|
func (s *UeOwnerRead) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -7303,6 +7501,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7406,6 +7606,16 @@ func (s *UeRead) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UeRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UeRead) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *UeRead) GetCreatedAt() OptDateTime {
|
func (s *UeRead) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -7511,6 +7721,16 @@ func (s *UeRead) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UeRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UeRead) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *UeRead) SetCreatedAt(val OptDateTime) {
|
func (s *UeRead) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -7540,6 +7760,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7643,6 +7865,16 @@ func (s *UeUpdate) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UeUpdate) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UeUpdate) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *UeUpdate) GetCreatedAt() OptDateTime {
|
func (s *UeUpdate) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -7748,6 +7980,16 @@ func (s *UeUpdate) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UeUpdate) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UeUpdate) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *UeUpdate) SetCreatedAt(val OptDateTime) {
|
func (s *UeUpdate) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -8272,6 +8514,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
Owner OptInt `json:"owner"`
|
Owner OptInt `json:"owner"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8375,6 +8619,16 @@ func (s *UpdateUeReq) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UpdateUeReq) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UpdateUeReq) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetOwner returns the value of Owner.
|
// GetOwner returns the value of Owner.
|
||||||
func (s *UpdateUeReq) GetOwner() OptInt {
|
func (s *UpdateUeReq) GetOwner() OptInt {
|
||||||
return s.Owner
|
return s.Owner
|
||||||
@ -8480,6 +8734,16 @@ func (s *UpdateUeReq) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UpdateUeReq) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UpdateUeReq) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetOwner sets the value of Owner.
|
// SetOwner sets the value of Owner.
|
||||||
func (s *UpdateUeReq) SetOwner(val OptInt) {
|
func (s *UpdateUeReq) SetOwner(val OptInt) {
|
||||||
s.Owner = val
|
s.Owner = val
|
||||||
@ -8531,6 +8795,8 @@ type UpdateUserReq struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -8765,6 +9031,16 @@ func (s *UpdateUserReq) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UpdateUserReq) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UpdateUserReq) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UpdateUserReq) GetCoin() OptInt {
|
func (s *UpdateUserReq) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -9025,6 +9301,16 @@ func (s *UpdateUserReq) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UpdateUserReq) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UpdateUserReq) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UpdateUserReq) SetCoin(val OptInt) {
|
func (s *UpdateUserReq) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -9212,6 +9498,8 @@ type UserCreate struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -9452,6 +9740,16 @@ func (s *UserCreate) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UserCreate) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UserCreate) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UserCreate) GetCoin() OptInt {
|
func (s *UserCreate) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -9702,6 +10000,16 @@ func (s *UserCreate) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UserCreate) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UserCreate) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UserCreate) SetCoin(val OptInt) {
|
func (s *UserCreate) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -9768,6 +10076,8 @@ type UserList struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -10008,6 +10318,16 @@ func (s *UserList) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UserList) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UserList) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UserList) GetCoin() OptInt {
|
func (s *UserList) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -10258,6 +10578,16 @@ func (s *UserList) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UserList) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UserList) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UserList) SetCoin(val OptInt) {
|
func (s *UserList) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -10568,6 +10898,8 @@ type UserRead struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -10808,6 +11140,16 @@ func (s *UserRead) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UserRead) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UserRead) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UserRead) GetCoin() OptInt {
|
func (s *UserRead) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -11058,6 +11400,16 @@ func (s *UserRead) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UserRead) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UserRead) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UserRead) SetCoin(val OptInt) {
|
func (s *UserRead) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
@ -11222,6 +11574,8 @@ 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"`
|
||||||
|
GameEp OptString `json:"game_ep"`
|
||||||
CreatedAt OptDateTime `json:"created_at"`
|
CreatedAt OptDateTime `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11325,6 +11679,16 @@ func (s *UserUeList) GetGameID() OptString {
|
|||||||
return s.GameID
|
return s.GameID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UserUeList) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameEp returns the value of GameEp.
|
||||||
|
func (s *UserUeList) GetGameEp() OptString {
|
||||||
|
return s.GameEp
|
||||||
|
}
|
||||||
|
|
||||||
// GetCreatedAt returns the value of CreatedAt.
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
func (s *UserUeList) GetCreatedAt() OptDateTime {
|
func (s *UserUeList) GetCreatedAt() OptDateTime {
|
||||||
return s.CreatedAt
|
return s.CreatedAt
|
||||||
@ -11430,6 +11794,16 @@ func (s *UserUeList) SetGameID(val OptString) {
|
|||||||
s.GameID = val
|
s.GameID = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UserUeList) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the value of GameEp.
|
||||||
|
func (s *UserUeList) SetGameEp(val OptString) {
|
||||||
|
s.GameEp = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the value of CreatedAt.
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
func (s *UserUeList) SetCreatedAt(val OptDateTime) {
|
func (s *UserUeList) SetCreatedAt(val OptDateTime) {
|
||||||
s.CreatedAt = val
|
s.CreatedAt = val
|
||||||
@ -11484,6 +11858,8 @@ type UserUpdate struct {
|
|||||||
GameAccount OptBool `json:"game_account"`
|
GameAccount OptBool `json:"game_account"`
|
||||||
GameLv OptInt `json:"game_lv"`
|
GameLv OptInt `json:"game_lv"`
|
||||||
GameExp OptInt `json:"game_exp"`
|
GameExp OptInt `json:"game_exp"`
|
||||||
|
GameStory OptInt `json:"game_story"`
|
||||||
|
GameLimit OptBool `json:"game_limit"`
|
||||||
Coin OptInt `json:"coin"`
|
Coin OptInt `json:"coin"`
|
||||||
CoinOpen OptBool `json:"coin_open"`
|
CoinOpen OptBool `json:"coin_open"`
|
||||||
CoinAt OptDateTime `json:"coin_at"`
|
CoinAt OptDateTime `json:"coin_at"`
|
||||||
@ -11724,6 +12100,16 @@ func (s *UserUpdate) GetGameExp() OptInt {
|
|||||||
return s.GameExp
|
return s.GameExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameStory returns the value of GameStory.
|
||||||
|
func (s *UserUpdate) GetGameStory() OptInt {
|
||||||
|
return s.GameStory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetGameLimit returns the value of GameLimit.
|
||||||
|
func (s *UserUpdate) GetGameLimit() OptBool {
|
||||||
|
return s.GameLimit
|
||||||
|
}
|
||||||
|
|
||||||
// GetCoin returns the value of Coin.
|
// GetCoin returns the value of Coin.
|
||||||
func (s *UserUpdate) GetCoin() OptInt {
|
func (s *UserUpdate) GetCoin() OptInt {
|
||||||
return s.Coin
|
return s.Coin
|
||||||
@ -11974,6 +12360,16 @@ func (s *UserUpdate) SetGameExp(val OptInt) {
|
|||||||
s.GameExp = val
|
s.GameExp = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the value of GameStory.
|
||||||
|
func (s *UserUpdate) SetGameStory(val OptInt) {
|
||||||
|
s.GameStory = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the value of GameLimit.
|
||||||
|
func (s *UserUpdate) SetGameLimit(val OptBool) {
|
||||||
|
s.GameLimit = val
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the value of Coin.
|
// SetCoin sets the value of Coin.
|
||||||
func (s *UserUpdate) SetCoin(val OptInt) {
|
func (s *UserUpdate) SetCoin(val OptInt) {
|
||||||
s.Coin = val
|
s.Coin = val
|
||||||
|
@ -1174,6 +1174,12 @@ func (h *OgentHandler) CreateUe(ctx context.Context, req *CreateUeReq) (CreateUe
|
|||||||
if v, ok := req.GameID.Get(); ok {
|
if v, ok := req.GameID.Get(); ok {
|
||||||
b.SetGameID(v)
|
b.SetGameID(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameEp.Get(); ok {
|
||||||
|
b.SetGameEp(v)
|
||||||
|
}
|
||||||
|
|
||||||
// Add all edges.
|
// Add all edges.
|
||||||
//b.SetOwnerID(req.Owner)
|
//b.SetOwnerID(req.Owner)
|
||||||
@ -1303,6 +1309,13 @@ func (h *OgentHandler) UpdateUe(ctx context.Context, req *UpdateUeReq, params Up
|
|||||||
if v, ok := req.GameID.Get(); ok {
|
if v, ok := req.GameID.Get(); ok {
|
||||||
b.SetGameID(v)
|
b.SetGameID(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameEp.Get(); ok {
|
||||||
|
b.SetGameEp(v)
|
||||||
|
}
|
||||||
|
|
||||||
// Add all edges.
|
// Add all edges.
|
||||||
//if v, ok := req.Owner.Get(); ok {
|
//if v, ok := req.Owner.Get(); ok {
|
||||||
// b.SetOwnerID(v)
|
// b.SetOwnerID(v)
|
||||||
@ -1585,6 +1598,12 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
|
|||||||
if v, ok := req.GameExp.Get(); ok {
|
if v, ok := req.GameExp.Get(); ok {
|
||||||
b.SetGameExp(v)
|
b.SetGameExp(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameLimit.Get(); ok {
|
||||||
|
b.SetGameLimit(v)
|
||||||
|
}
|
||||||
if v, ok := req.Coin.Get(); ok {
|
if v, ok := req.Coin.Get(); ok {
|
||||||
b.SetCoin(v)
|
b.SetCoin(v)
|
||||||
}
|
}
|
||||||
@ -1797,6 +1816,12 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
|
|||||||
if v, ok := req.GameExp.Get(); ok {
|
if v, ok := req.GameExp.Get(); ok {
|
||||||
b.SetGameExp(v)
|
b.SetGameExp(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameLimit.Get(); ok {
|
||||||
|
b.SetGameLimit(v)
|
||||||
|
}
|
||||||
if v, ok := req.Coin.Get(); ok {
|
if v, ok := req.Coin.Get(); ok {
|
||||||
b.SetCoin(v)
|
b.SetCoin(v)
|
||||||
}
|
}
|
||||||
|
@ -196,6 +196,8 @@ func NewCardOwnerRead(e *ent.User) *CardOwnerRead {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -384,6 +386,8 @@ func NewGroupUsersList(e *ent.User) *GroupUsersList {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -652,6 +656,8 @@ func NewMaOwnerRead(e *ent.User) *MaOwnerRead {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -876,6 +882,8 @@ func NewSevOwnerRead(e *ent.User) *SevOwnerRead {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -925,6 +933,8 @@ 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.GameEp = NewOptString(e.GameEp)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -972,6 +982,8 @@ 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.GameEp = NewOptString(e.GameEp)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1019,6 +1031,8 @@ 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.GameEp = NewOptString(e.GameEp)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1066,6 +1080,8 @@ 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.GameEp = NewOptString(e.GameEp)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
@ -1140,6 +1156,8 @@ func NewUeOwnerRead(e *ent.User) *UeOwnerRead {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -1216,6 +1234,8 @@ func NewUserCreate(e *ent.User) *UserCreate {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -1292,6 +1312,8 @@ func NewUserList(e *ent.User) *UserList {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -1368,6 +1390,8 @@ func NewUserRead(e *ent.User) *UserRead {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -1444,6 +1468,8 @@ func NewUserUpdate(e *ent.User) *UserUpdate {
|
|||||||
ret.GameAccount = NewOptBool(e.GameAccount)
|
ret.GameAccount = NewOptBool(e.GameAccount)
|
||||||
ret.GameLv = NewOptInt(e.GameLv)
|
ret.GameLv = NewOptInt(e.GameLv)
|
||||||
ret.GameExp = NewOptInt(e.GameExp)
|
ret.GameExp = NewOptInt(e.GameExp)
|
||||||
|
ret.GameStory = NewOptInt(e.GameStory)
|
||||||
|
ret.GameLimit = NewOptBool(e.GameLimit)
|
||||||
ret.Coin = NewOptInt(e.Coin)
|
ret.Coin = NewOptInt(e.Coin)
|
||||||
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
ret.CoinOpen = NewOptBool(e.CoinOpen)
|
||||||
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
ret.CoinAt = NewOptDateTime(e.CoinAt)
|
||||||
@ -1613,6 +1639,8 @@ 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.GameEp = NewOptString(e.GameEp)
|
||||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||||
return &ret
|
return &ret
|
||||||
}
|
}
|
||||||
|
120
ent/openapi.json
120
ent/openapi.json
@ -1626,6 +1626,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -1831,6 +1837,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"owner": {
|
"owner": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -2135,6 +2147,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -2450,6 +2468,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -3144,6 +3168,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -3398,6 +3428,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -3958,6 +3994,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -4353,6 +4395,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -4438,6 +4486,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -4515,6 +4569,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -4587,6 +4647,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -4659,6 +4725,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -4731,6 +4803,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
@ -4893,6 +4971,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5068,6 +5152,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5262,6 +5352,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5431,6 +5527,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5600,6 +5702,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5769,6 +5877,12 @@
|
|||||||
"game_exp": {
|
"game_exp": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_limit": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"coin": {
|
"coin": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -6003,6 +6117,12 @@
|
|||||||
"game_id": {
|
"game_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"game_story": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"game_ep": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
|
@ -100,7 +100,7 @@ func init() {
|
|||||||
// ue.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
// ue.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
||||||
ue.PasswordValidator = ueDescPassword.Validators[0].(func(string) error)
|
ue.PasswordValidator = ueDescPassword.Validators[0].(func(string) error)
|
||||||
// ueDescCreatedAt is the schema descriptor for created_at field.
|
// ueDescCreatedAt is the schema descriptor for created_at field.
|
||||||
ueDescCreatedAt := ueFields[21].Descriptor()
|
ueDescCreatedAt := ueFields[23].Descriptor()
|
||||||
// ue.DefaultCreatedAt holds the default value on creation for the created_at field.
|
// ue.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||||
ue.DefaultCreatedAt = ueDescCreatedAt.Default.(func() time.Time)
|
ue.DefaultCreatedAt = ueDescCreatedAt.Default.(func() time.Time)
|
||||||
userFields := schema.User{}.Fields()
|
userFields := schema.User{}.Fields()
|
||||||
@ -215,12 +215,16 @@ func init() {
|
|||||||
userDescGameAccount := userFields[45].Descriptor()
|
userDescGameAccount := userFields[45].Descriptor()
|
||||||
// user.DefaultGameAccount holds the default value on creation for the game_account field.
|
// user.DefaultGameAccount holds the default value on creation for the game_account field.
|
||||||
user.DefaultGameAccount = userDescGameAccount.Default.(bool)
|
user.DefaultGameAccount = userDescGameAccount.Default.(bool)
|
||||||
|
// userDescGameLimit is the schema descriptor for game_limit field.
|
||||||
|
userDescGameLimit := userFields[49].Descriptor()
|
||||||
|
// user.DefaultGameLimit holds the default value on creation for the game_limit field.
|
||||||
|
user.DefaultGameLimit = userDescGameLimit.Default.(bool)
|
||||||
// userDescCoinOpen is the schema descriptor for coin_open field.
|
// userDescCoinOpen is the schema descriptor for coin_open field.
|
||||||
userDescCoinOpen := userFields[49].Descriptor()
|
userDescCoinOpen := userFields[51].Descriptor()
|
||||||
// user.DefaultCoinOpen holds the default value on creation for the coin_open field.
|
// user.DefaultCoinOpen holds the default value on creation for the coin_open field.
|
||||||
user.DefaultCoinOpen = userDescCoinOpen.Default.(bool)
|
user.DefaultCoinOpen = userDescCoinOpen.Default.(bool)
|
||||||
// userDescCoinAt is the schema descriptor for coin_at field.
|
// userDescCoinAt is the schema descriptor for coin_at field.
|
||||||
userDescCoinAt := userFields[50].Descriptor()
|
userDescCoinAt := userFields[52].Descriptor()
|
||||||
// user.DefaultCoinAt holds the default value on creation for the coin_at field.
|
// user.DefaultCoinAt holds the default value on creation for the coin_at field.
|
||||||
user.DefaultCoinAt = userDescCoinAt.Default.(func() time.Time)
|
user.DefaultCoinAt = userDescCoinAt.Default.(func() time.Time)
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,12 @@ func (Ue) Fields() []ent.Field {
|
|||||||
field.String("game_id").
|
field.String("game_id").
|
||||||
Optional(),
|
Optional(),
|
||||||
|
|
||||||
|
field.Int("game_story").
|
||||||
|
Optional(),
|
||||||
|
|
||||||
|
field.String("game_ep").
|
||||||
|
Optional(),
|
||||||
|
|
||||||
field.Time("created_at").
|
field.Time("created_at").
|
||||||
Immutable().
|
Immutable().
|
||||||
Optional().
|
Optional().
|
||||||
|
@ -221,6 +221,13 @@ func (User) Fields() []ent.Field {
|
|||||||
field.Int("game_exp").
|
field.Int("game_exp").
|
||||||
Optional(),
|
Optional(),
|
||||||
|
|
||||||
|
field.Int("game_story").
|
||||||
|
Optional(),
|
||||||
|
|
||||||
|
field.Bool("game_limit").
|
||||||
|
Default(false).
|
||||||
|
Optional(),
|
||||||
|
|
||||||
field.Int("coin").
|
field.Int("coin").
|
||||||
Optional(),
|
Optional(),
|
||||||
|
|
||||||
|
26
ent/ue.go
26
ent/ue.go
@ -60,6 +60,10 @@ type Ue struct {
|
|||||||
GameExp string `json:"game_exp,omitempty"`
|
GameExp string `json:"game_exp,omitempty"`
|
||||||
// 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 int `json:"game_story,omitempty"`
|
||||||
|
// GameEp holds the value of the "game_ep" field.
|
||||||
|
GameEp string `json:"game_ep,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.
|
||||||
@ -98,9 +102,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:
|
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:
|
||||||
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.FieldGameEp:
|
||||||
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)
|
||||||
@ -253,6 +257,18 @@ func (u *Ue) assignValues(columns []string, values []any) error {
|
|||||||
} else if value.Valid {
|
} else if value.Valid {
|
||||||
u.GameID = value.String
|
u.GameID = value.String
|
||||||
}
|
}
|
||||||
|
case ue.FieldGameStory:
|
||||||
|
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field game_story", values[i])
|
||||||
|
} else if value.Valid {
|
||||||
|
u.GameStory = int(value.Int64)
|
||||||
|
}
|
||||||
|
case ue.FieldGameEp:
|
||||||
|
if value, ok := values[i].(*sql.NullString); !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field game_ep", values[i])
|
||||||
|
} else if value.Valid {
|
||||||
|
u.GameEp = value.String
|
||||||
|
}
|
||||||
case ue.FieldCreatedAt:
|
case ue.FieldCreatedAt:
|
||||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||||
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
||||||
@ -368,6 +384,12 @@ func (u *Ue) String() string {
|
|||||||
builder.WriteString("game_id=")
|
builder.WriteString("game_id=")
|
||||||
builder.WriteString(u.GameID)
|
builder.WriteString(u.GameID)
|
||||||
builder.WriteString(", ")
|
builder.WriteString(", ")
|
||||||
|
builder.WriteString("game_story=")
|
||||||
|
builder.WriteString(fmt.Sprintf("%v", u.GameStory))
|
||||||
|
builder.WriteString(", ")
|
||||||
|
builder.WriteString("game_ep=")
|
||||||
|
builder.WriteString(u.GameEp)
|
||||||
|
builder.WriteString(", ")
|
||||||
builder.WriteString("created_at=")
|
builder.WriteString("created_at=")
|
||||||
builder.WriteString(u.CreatedAt.Format(time.ANSIC))
|
builder.WriteString(u.CreatedAt.Format(time.ANSIC))
|
||||||
builder.WriteByte(')')
|
builder.WriteByte(')')
|
||||||
|
16
ent/ue/ue.go
16
ent/ue/ue.go
@ -56,6 +56,10 @@ const (
|
|||||||
FieldGameExp = "game_exp"
|
FieldGameExp = "game_exp"
|
||||||
// FieldGameID holds the string denoting the game_id field in the database.
|
// FieldGameID holds the string denoting the game_id field in the database.
|
||||||
FieldGameID = "game_id"
|
FieldGameID = "game_id"
|
||||||
|
// FieldGameStory holds the string denoting the game_story field in the database.
|
||||||
|
FieldGameStory = "game_story"
|
||||||
|
// FieldGameEp holds the string denoting the game_ep field in the database.
|
||||||
|
FieldGameEp = "game_ep"
|
||||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||||
FieldCreatedAt = "created_at"
|
FieldCreatedAt = "created_at"
|
||||||
// EdgeOwner holds the string denoting the owner edge name in mutations.
|
// EdgeOwner holds the string denoting the owner edge name in mutations.
|
||||||
@ -95,6 +99,8 @@ var Columns = []string{
|
|||||||
FieldGameLv,
|
FieldGameLv,
|
||||||
FieldGameExp,
|
FieldGameExp,
|
||||||
FieldGameID,
|
FieldGameID,
|
||||||
|
FieldGameStory,
|
||||||
|
FieldGameEp,
|
||||||
FieldCreatedAt,
|
FieldCreatedAt,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,6 +251,16 @@ func ByGameID(opts ...sql.OrderTermOption) OrderOption {
|
|||||||
return sql.OrderByField(FieldGameID, opts...).ToFunc()
|
return sql.OrderByField(FieldGameID, opts...).ToFunc()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ByGameStory orders the results by the game_story field.
|
||||||
|
func ByGameStory(opts ...sql.OrderTermOption) OrderOption {
|
||||||
|
return sql.OrderByField(FieldGameStory, opts...).ToFunc()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ByGameEp orders the results by the game_ep field.
|
||||||
|
func ByGameEp(opts ...sql.OrderTermOption) OrderOption {
|
||||||
|
return sql.OrderByField(FieldGameEp, opts...).ToFunc()
|
||||||
|
}
|
||||||
|
|
||||||
// ByCreatedAt orders the results by the created_at field.
|
// ByCreatedAt orders the results by the created_at field.
|
||||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||||
|
135
ent/ue/where.go
135
ent/ue/where.go
@ -160,6 +160,16 @@ func GameID(v string) predicate.Ue {
|
|||||||
return predicate.Ue(sql.FieldEQ(FieldGameID, v))
|
return predicate.Ue(sql.FieldEQ(FieldGameID, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStory applies equality check predicate on the "game_story" field. It's identical to GameStoryEQ.
|
||||||
|
func GameStory(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEp applies equality check predicate on the "game_ep" field. It's identical to GameEpEQ.
|
||||||
|
func GameEp(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEQ(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||||
func CreatedAt(v time.Time) predicate.Ue {
|
func CreatedAt(v time.Time) predicate.Ue {
|
||||||
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))
|
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))
|
||||||
@ -1290,6 +1300,131 @@ func GameIDContainsFold(v string) predicate.Ue {
|
|||||||
return predicate.Ue(sql.FieldContainsFold(FieldGameID, v))
|
return predicate.Ue(sql.FieldContainsFold(FieldGameID, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStoryEQ applies the EQ predicate on the "game_story" field.
|
||||||
|
func GameStoryEQ(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNEQ applies the NEQ predicate on the "game_story" field.
|
||||||
|
func GameStoryNEQ(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryIn applies the In predicate on the "game_story" field.
|
||||||
|
func GameStoryIn(vs ...int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldIn(FieldGameStory, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNotIn applies the NotIn predicate on the "game_story" field.
|
||||||
|
func GameStoryNotIn(vs ...int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNotIn(FieldGameStory, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryGT applies the GT predicate on the "game_story" field.
|
||||||
|
func GameStoryGT(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldGT(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryGTE applies the GTE predicate on the "game_story" field.
|
||||||
|
func GameStoryGTE(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldGTE(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryLT applies the LT predicate on the "game_story" field.
|
||||||
|
func GameStoryLT(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldLT(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryLTE applies the LTE predicate on the "game_story" field.
|
||||||
|
func GameStoryLTE(v int) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldLTE(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryIsNil applies the IsNil predicate on the "game_story" field.
|
||||||
|
func GameStoryIsNil() predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldIsNull(FieldGameStory))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNotNil applies the NotNil predicate on the "game_story" field.
|
||||||
|
func GameStoryNotNil() predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNotNull(FieldGameStory))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpEQ applies the EQ predicate on the "game_ep" field.
|
||||||
|
func GameEpEQ(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEQ(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpNEQ applies the NEQ predicate on the "game_ep" field.
|
||||||
|
func GameEpNEQ(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNEQ(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpIn applies the In predicate on the "game_ep" field.
|
||||||
|
func GameEpIn(vs ...string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldIn(FieldGameEp, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpNotIn applies the NotIn predicate on the "game_ep" field.
|
||||||
|
func GameEpNotIn(vs ...string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNotIn(FieldGameEp, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpGT applies the GT predicate on the "game_ep" field.
|
||||||
|
func GameEpGT(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldGT(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpGTE applies the GTE predicate on the "game_ep" field.
|
||||||
|
func GameEpGTE(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldGTE(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpLT applies the LT predicate on the "game_ep" field.
|
||||||
|
func GameEpLT(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldLT(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpLTE applies the LTE predicate on the "game_ep" field.
|
||||||
|
func GameEpLTE(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldLTE(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpContains applies the Contains predicate on the "game_ep" field.
|
||||||
|
func GameEpContains(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldContains(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpHasPrefix applies the HasPrefix predicate on the "game_ep" field.
|
||||||
|
func GameEpHasPrefix(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldHasPrefix(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpHasSuffix applies the HasSuffix predicate on the "game_ep" field.
|
||||||
|
func GameEpHasSuffix(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldHasSuffix(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpIsNil applies the IsNil predicate on the "game_ep" field.
|
||||||
|
func GameEpIsNil() predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldIsNull(FieldGameEp))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpNotNil applies the NotNil predicate on the "game_ep" field.
|
||||||
|
func GameEpNotNil() predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldNotNull(FieldGameEp))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpEqualFold applies the EqualFold predicate on the "game_ep" field.
|
||||||
|
func GameEpEqualFold(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldEqualFold(FieldGameEp, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameEpContainsFold applies the ContainsFold predicate on the "game_ep" field.
|
||||||
|
func GameEpContainsFold(v string) predicate.Ue {
|
||||||
|
return predicate.Ue(sql.FieldContainsFold(FieldGameEp, 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))
|
||||||
|
@ -307,6 +307,34 @@ func (uc *UeCreate) SetNillableGameID(s *string) *UeCreate {
|
|||||||
return uc
|
return uc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the "game_story" field.
|
||||||
|
func (uc *UeCreate) SetGameStory(i int) *UeCreate {
|
||||||
|
uc.mutation.SetGameStory(i)
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||||
|
func (uc *UeCreate) SetNillableGameStory(i *int) *UeCreate {
|
||||||
|
if i != nil {
|
||||||
|
uc.SetGameStory(*i)
|
||||||
|
}
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameEp sets the "game_ep" field.
|
||||||
|
func (uc *UeCreate) SetGameEp(s string) *UeCreate {
|
||||||
|
uc.mutation.SetGameEp(s)
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNillableGameEp sets the "game_ep" field if the given value is not nil.
|
||||||
|
func (uc *UeCreate) SetNillableGameEp(s *string) *UeCreate {
|
||||||
|
if s != nil {
|
||||||
|
uc.SetGameEp(*s)
|
||||||
|
}
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
// SetCreatedAt sets the "created_at" field.
|
// SetCreatedAt sets the "created_at" field.
|
||||||
func (uc *UeCreate) SetCreatedAt(t time.Time) *UeCreate {
|
func (uc *UeCreate) SetCreatedAt(t time.Time) *UeCreate {
|
||||||
uc.mutation.SetCreatedAt(t)
|
uc.mutation.SetCreatedAt(t)
|
||||||
@ -508,6 +536,14 @@ func (uc *UeCreate) createSpec() (*Ue, *sqlgraph.CreateSpec) {
|
|||||||
_spec.SetField(ue.FieldGameID, field.TypeString, value)
|
_spec.SetField(ue.FieldGameID, field.TypeString, value)
|
||||||
_node.GameID = value
|
_node.GameID = value
|
||||||
}
|
}
|
||||||
|
if value, ok := uc.mutation.GameStory(); ok {
|
||||||
|
_spec.SetField(ue.FieldGameStory, field.TypeInt, value)
|
||||||
|
_node.GameStory = value
|
||||||
|
}
|
||||||
|
if value, ok := uc.mutation.GameEp(); ok {
|
||||||
|
_spec.SetField(ue.FieldGameEp, field.TypeString, value)
|
||||||
|
_node.GameEp = value
|
||||||
|
}
|
||||||
if value, ok := uc.mutation.CreatedAt(); ok {
|
if value, ok := uc.mutation.CreatedAt(); ok {
|
||||||
_spec.SetField(ue.FieldCreatedAt, field.TypeTime, value)
|
_spec.SetField(ue.FieldCreatedAt, field.TypeTime, value)
|
||||||
_node.CreatedAt = value
|
_node.CreatedAt = value
|
||||||
|
124
ent/ue_update.go
124
ent/ue_update.go
@ -505,6 +505,53 @@ func (uu *UeUpdate) ClearGameID() *UeUpdate {
|
|||||||
return uu
|
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.
|
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||||
func (uu *UeUpdate) SetOwnerID(id int) *UeUpdate {
|
func (uu *UeUpdate) SetOwnerID(id int) *UeUpdate {
|
||||||
uu.mutation.SetOwnerID(id)
|
uu.mutation.SetOwnerID(id)
|
||||||
@ -727,6 +774,21 @@ func (uu *UeUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||||||
if uu.mutation.GameIDCleared() {
|
if uu.mutation.GameIDCleared() {
|
||||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
_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() {
|
if uu.mutation.CreatedAtCleared() {
|
||||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||||
}
|
}
|
||||||
@ -1256,6 +1318,53 @@ func (uuo *UeUpdateOne) ClearGameID() *UeUpdateOne {
|
|||||||
return uuo
|
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.
|
// SetOwnerID sets the "owner" edge to the User entity by ID.
|
||||||
func (uuo *UeUpdateOne) SetOwnerID(id int) *UeUpdateOne {
|
func (uuo *UeUpdateOne) SetOwnerID(id int) *UeUpdateOne {
|
||||||
uuo.mutation.SetOwnerID(id)
|
uuo.mutation.SetOwnerID(id)
|
||||||
@ -1508,6 +1617,21 @@ func (uuo *UeUpdateOne) sqlSave(ctx context.Context) (_node *Ue, err error) {
|
|||||||
if uuo.mutation.GameIDCleared() {
|
if uuo.mutation.GameIDCleared() {
|
||||||
_spec.ClearField(ue.FieldGameID, field.TypeString)
|
_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() {
|
if uuo.mutation.CreatedAtCleared() {
|
||||||
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
_spec.ClearField(ue.FieldCreatedAt, field.TypeTime)
|
||||||
}
|
}
|
||||||
|
26
ent/user.go
26
ent/user.go
@ -113,6 +113,10 @@ type User struct {
|
|||||||
GameLv int `json:"game_lv,omitempty"`
|
GameLv int `json:"game_lv,omitempty"`
|
||||||
// GameExp holds the value of the "game_exp" field.
|
// GameExp holds the value of the "game_exp" field.
|
||||||
GameExp int `json:"game_exp,omitempty"`
|
GameExp int `json:"game_exp,omitempty"`
|
||||||
|
// GameStory holds the value of the "game_story" field.
|
||||||
|
GameStory int `json:"game_story,omitempty"`
|
||||||
|
// GameLimit holds the value of the "game_limit" field.
|
||||||
|
GameLimit bool `json:"game_limit,omitempty"`
|
||||||
// Coin holds the value of the "coin" field.
|
// Coin holds the value of the "coin" field.
|
||||||
Coin int `json:"coin,omitempty"`
|
Coin int `json:"coin,omitempty"`
|
||||||
// CoinOpen holds the value of the "coin_open" field.
|
// CoinOpen holds the value of the "coin_open" field.
|
||||||
@ -182,9 +186,9 @@ func (*User) scanValues(columns []string) ([]any, error) {
|
|||||||
values := make([]any, len(columns))
|
values := make([]any, len(columns))
|
||||||
for i := range columns {
|
for i := range columns {
|
||||||
switch columns[i] {
|
switch columns[i] {
|
||||||
case user.FieldMember, user.FieldBook, user.FieldManga, user.FieldBadge, user.FieldBsky, user.FieldMastodon, user.FieldDelete, user.FieldHandle, user.FieldTen, user.FieldModel, user.FieldGame, user.FieldGameTest, user.FieldGameEnd, user.FieldGameAccount, user.FieldCoinOpen:
|
case user.FieldMember, user.FieldBook, user.FieldManga, user.FieldBadge, user.FieldBsky, user.FieldMastodon, user.FieldDelete, user.FieldHandle, user.FieldTen, user.FieldModel, user.FieldGame, user.FieldGameTest, user.FieldGameEnd, user.FieldGameAccount, user.FieldGameLimit, user.FieldCoinOpen:
|
||||||
values[i] = new(sql.NullBool)
|
values[i] = new(sql.NullBool)
|
||||||
case user.FieldID, user.FieldLuck, user.FieldLike, user.FieldLikeRank, user.FieldFav, user.FieldTenSu, user.FieldTenKai, user.FieldAiten, user.FieldRoom, user.FieldModelAttack, user.FieldModelLimit, user.FieldModelSkill, user.FieldModelMode, user.FieldModelCritical, user.FieldModelCriticalD, user.FieldGameLv, user.FieldGameExp, user.FieldCoin:
|
case user.FieldID, user.FieldLuck, user.FieldLike, user.FieldLikeRank, user.FieldFav, user.FieldTenSu, user.FieldTenKai, user.FieldAiten, user.FieldRoom, user.FieldModelAttack, user.FieldModelLimit, user.FieldModelSkill, user.FieldModelMode, user.FieldModelCritical, user.FieldModelCriticalD, user.FieldGameLv, user.FieldGameExp, user.FieldGameStory, user.FieldCoin:
|
||||||
values[i] = new(sql.NullInt64)
|
values[i] = new(sql.NullInt64)
|
||||||
case user.FieldUsername, user.FieldDid, user.FieldToken, user.FieldPassword, user.FieldTenCard, user.FieldTenDelete, user.FieldTenPost, user.FieldTenGet, user.FieldNext:
|
case user.FieldUsername, user.FieldDid, user.FieldToken, user.FieldPassword, user.FieldTenCard, user.FieldTenDelete, user.FieldTenPost, user.FieldTenGet, user.FieldNext:
|
||||||
values[i] = new(sql.NullString)
|
values[i] = new(sql.NullString)
|
||||||
@ -501,6 +505,18 @@ func (u *User) assignValues(columns []string, values []any) error {
|
|||||||
} else if value.Valid {
|
} else if value.Valid {
|
||||||
u.GameExp = int(value.Int64)
|
u.GameExp = int(value.Int64)
|
||||||
}
|
}
|
||||||
|
case user.FieldGameStory:
|
||||||
|
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field game_story", values[i])
|
||||||
|
} else if value.Valid {
|
||||||
|
u.GameStory = int(value.Int64)
|
||||||
|
}
|
||||||
|
case user.FieldGameLimit:
|
||||||
|
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||||
|
return fmt.Errorf("unexpected type %T for field game_limit", values[i])
|
||||||
|
} else if value.Valid {
|
||||||
|
u.GameLimit = value.Bool
|
||||||
|
}
|
||||||
case user.FieldCoin:
|
case user.FieldCoin:
|
||||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||||
return fmt.Errorf("unexpected type %T for field coin", values[i])
|
return fmt.Errorf("unexpected type %T for field coin", values[i])
|
||||||
@ -724,6 +740,12 @@ func (u *User) String() string {
|
|||||||
builder.WriteString("game_exp=")
|
builder.WriteString("game_exp=")
|
||||||
builder.WriteString(fmt.Sprintf("%v", u.GameExp))
|
builder.WriteString(fmt.Sprintf("%v", u.GameExp))
|
||||||
builder.WriteString(", ")
|
builder.WriteString(", ")
|
||||||
|
builder.WriteString("game_story=")
|
||||||
|
builder.WriteString(fmt.Sprintf("%v", u.GameStory))
|
||||||
|
builder.WriteString(", ")
|
||||||
|
builder.WriteString("game_limit=")
|
||||||
|
builder.WriteString(fmt.Sprintf("%v", u.GameLimit))
|
||||||
|
builder.WriteString(", ")
|
||||||
builder.WriteString("coin=")
|
builder.WriteString("coin=")
|
||||||
builder.WriteString(fmt.Sprintf("%v", u.Coin))
|
builder.WriteString(fmt.Sprintf("%v", u.Coin))
|
||||||
builder.WriteString(", ")
|
builder.WriteString(", ")
|
||||||
|
@ -110,6 +110,10 @@ const (
|
|||||||
FieldGameLv = "game_lv"
|
FieldGameLv = "game_lv"
|
||||||
// FieldGameExp holds the string denoting the game_exp field in the database.
|
// FieldGameExp holds the string denoting the game_exp field in the database.
|
||||||
FieldGameExp = "game_exp"
|
FieldGameExp = "game_exp"
|
||||||
|
// FieldGameStory holds the string denoting the game_story field in the database.
|
||||||
|
FieldGameStory = "game_story"
|
||||||
|
// FieldGameLimit holds the string denoting the game_limit field in the database.
|
||||||
|
FieldGameLimit = "game_limit"
|
||||||
// FieldCoin holds the string denoting the coin field in the database.
|
// FieldCoin holds the string denoting the coin field in the database.
|
||||||
FieldCoin = "coin"
|
FieldCoin = "coin"
|
||||||
// FieldCoinOpen holds the string denoting the coin_open field in the database.
|
// FieldCoinOpen holds the string denoting the coin_open field in the database.
|
||||||
@ -207,6 +211,8 @@ var Columns = []string{
|
|||||||
FieldGameAccount,
|
FieldGameAccount,
|
||||||
FieldGameLv,
|
FieldGameLv,
|
||||||
FieldGameExp,
|
FieldGameExp,
|
||||||
|
FieldGameStory,
|
||||||
|
FieldGameLimit,
|
||||||
FieldCoin,
|
FieldCoin,
|
||||||
FieldCoinOpen,
|
FieldCoinOpen,
|
||||||
FieldCoinAt,
|
FieldCoinAt,
|
||||||
@ -282,6 +288,8 @@ var (
|
|||||||
DefaultGameEnd bool
|
DefaultGameEnd bool
|
||||||
// DefaultGameAccount holds the default value on creation for the "game_account" field.
|
// DefaultGameAccount holds the default value on creation for the "game_account" field.
|
||||||
DefaultGameAccount bool
|
DefaultGameAccount bool
|
||||||
|
// DefaultGameLimit holds the default value on creation for the "game_limit" field.
|
||||||
|
DefaultGameLimit bool
|
||||||
// DefaultCoinOpen holds the default value on creation for the "coin_open" field.
|
// DefaultCoinOpen holds the default value on creation for the "coin_open" field.
|
||||||
DefaultCoinOpen bool
|
DefaultCoinOpen bool
|
||||||
// DefaultCoinAt holds the default value on creation for the "coin_at" field.
|
// DefaultCoinAt holds the default value on creation for the "coin_at" field.
|
||||||
@ -536,6 +544,16 @@ func ByGameExp(opts ...sql.OrderTermOption) OrderOption {
|
|||||||
return sql.OrderByField(FieldGameExp, opts...).ToFunc()
|
return sql.OrderByField(FieldGameExp, opts...).ToFunc()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ByGameStory orders the results by the game_story field.
|
||||||
|
func ByGameStory(opts ...sql.OrderTermOption) OrderOption {
|
||||||
|
return sql.OrderByField(FieldGameStory, opts...).ToFunc()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ByGameLimit orders the results by the game_limit field.
|
||||||
|
func ByGameLimit(opts ...sql.OrderTermOption) OrderOption {
|
||||||
|
return sql.OrderByField(FieldGameLimit, opts...).ToFunc()
|
||||||
|
}
|
||||||
|
|
||||||
// ByCoin orders the results by the coin field.
|
// ByCoin orders the results by the coin field.
|
||||||
func ByCoin(opts ...sql.OrderTermOption) OrderOption {
|
func ByCoin(opts ...sql.OrderTermOption) OrderOption {
|
||||||
return sql.OrderByField(FieldCoin, opts...).ToFunc()
|
return sql.OrderByField(FieldCoin, opts...).ToFunc()
|
||||||
|
@ -295,6 +295,16 @@ func GameExp(v int) predicate.User {
|
|||||||
return predicate.User(sql.FieldEQ(FieldGameExp, v))
|
return predicate.User(sql.FieldEQ(FieldGameExp, v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStory applies equality check predicate on the "game_story" field. It's identical to GameStoryEQ.
|
||||||
|
func GameStory(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimit applies equality check predicate on the "game_limit" field. It's identical to GameLimitEQ.
|
||||||
|
func GameLimit(v bool) predicate.User {
|
||||||
|
return predicate.User(sql.FieldEQ(FieldGameLimit, v))
|
||||||
|
}
|
||||||
|
|
||||||
// Coin applies equality check predicate on the "coin" field. It's identical to CoinEQ.
|
// Coin applies equality check predicate on the "coin" field. It's identical to CoinEQ.
|
||||||
func Coin(v int) predicate.User {
|
func Coin(v int) predicate.User {
|
||||||
return predicate.User(sql.FieldEQ(FieldCoin, v))
|
return predicate.User(sql.FieldEQ(FieldCoin, v))
|
||||||
@ -2495,6 +2505,76 @@ func GameExpNotNil() predicate.User {
|
|||||||
return predicate.User(sql.FieldNotNull(FieldGameExp))
|
return predicate.User(sql.FieldNotNull(FieldGameExp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GameStoryEQ applies the EQ predicate on the "game_story" field.
|
||||||
|
func GameStoryEQ(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNEQ applies the NEQ predicate on the "game_story" field.
|
||||||
|
func GameStoryNEQ(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldNEQ(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryIn applies the In predicate on the "game_story" field.
|
||||||
|
func GameStoryIn(vs ...int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldIn(FieldGameStory, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNotIn applies the NotIn predicate on the "game_story" field.
|
||||||
|
func GameStoryNotIn(vs ...int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldNotIn(FieldGameStory, vs...))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryGT applies the GT predicate on the "game_story" field.
|
||||||
|
func GameStoryGT(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldGT(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryGTE applies the GTE predicate on the "game_story" field.
|
||||||
|
func GameStoryGTE(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldGTE(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryLT applies the LT predicate on the "game_story" field.
|
||||||
|
func GameStoryLT(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldLT(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryLTE applies the LTE predicate on the "game_story" field.
|
||||||
|
func GameStoryLTE(v int) predicate.User {
|
||||||
|
return predicate.User(sql.FieldLTE(FieldGameStory, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryIsNil applies the IsNil predicate on the "game_story" field.
|
||||||
|
func GameStoryIsNil() predicate.User {
|
||||||
|
return predicate.User(sql.FieldIsNull(FieldGameStory))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameStoryNotNil applies the NotNil predicate on the "game_story" field.
|
||||||
|
func GameStoryNotNil() predicate.User {
|
||||||
|
return predicate.User(sql.FieldNotNull(FieldGameStory))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimitEQ applies the EQ predicate on the "game_limit" field.
|
||||||
|
func GameLimitEQ(v bool) predicate.User {
|
||||||
|
return predicate.User(sql.FieldEQ(FieldGameLimit, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimitNEQ applies the NEQ predicate on the "game_limit" field.
|
||||||
|
func GameLimitNEQ(v bool) predicate.User {
|
||||||
|
return predicate.User(sql.FieldNEQ(FieldGameLimit, v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimitIsNil applies the IsNil predicate on the "game_limit" field.
|
||||||
|
func GameLimitIsNil() predicate.User {
|
||||||
|
return predicate.User(sql.FieldIsNull(FieldGameLimit))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GameLimitNotNil applies the NotNil predicate on the "game_limit" field.
|
||||||
|
func GameLimitNotNil() predicate.User {
|
||||||
|
return predicate.User(sql.FieldNotNull(FieldGameLimit))
|
||||||
|
}
|
||||||
|
|
||||||
// CoinEQ applies the EQ predicate on the "coin" field.
|
// CoinEQ applies the EQ predicate on the "coin" field.
|
||||||
func CoinEQ(v int) predicate.User {
|
func CoinEQ(v int) predicate.User {
|
||||||
return predicate.User(sql.FieldEQ(FieldCoin, v))
|
return predicate.User(sql.FieldEQ(FieldCoin, v))
|
||||||
|
@ -680,6 +680,34 @@ func (uc *UserCreate) SetNillableGameExp(i *int) *UserCreate {
|
|||||||
return uc
|
return uc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetGameStory sets the "game_story" field.
|
||||||
|
func (uc *UserCreate) SetGameStory(i int) *UserCreate {
|
||||||
|
uc.mutation.SetGameStory(i)
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNillableGameStory sets the "game_story" field if the given value is not nil.
|
||||||
|
func (uc *UserCreate) SetNillableGameStory(i *int) *UserCreate {
|
||||||
|
if i != nil {
|
||||||
|
uc.SetGameStory(*i)
|
||||||
|
}
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetGameLimit sets the "game_limit" field.
|
||||||
|
func (uc *UserCreate) SetGameLimit(b bool) *UserCreate {
|
||||||
|
uc.mutation.SetGameLimit(b)
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNillableGameLimit sets the "game_limit" field if the given value is not nil.
|
||||||
|
func (uc *UserCreate) SetNillableGameLimit(b *bool) *UserCreate {
|
||||||
|
if b != nil {
|
||||||
|
uc.SetGameLimit(*b)
|
||||||
|
}
|
||||||
|
return uc
|
||||||
|
}
|
||||||
|
|
||||||
// SetCoin sets the "coin" field.
|
// SetCoin sets the "coin" field.
|
||||||
func (uc *UserCreate) SetCoin(i int) *UserCreate {
|
func (uc *UserCreate) SetCoin(i int) *UserCreate {
|
||||||
uc.mutation.SetCoin(i)
|
uc.mutation.SetCoin(i)
|
||||||
@ -905,6 +933,10 @@ func (uc *UserCreate) defaults() {
|
|||||||
v := user.DefaultGameAccount
|
v := user.DefaultGameAccount
|
||||||
uc.mutation.SetGameAccount(v)
|
uc.mutation.SetGameAccount(v)
|
||||||
}
|
}
|
||||||
|
if _, ok := uc.mutation.GameLimit(); !ok {
|
||||||
|
v := user.DefaultGameLimit
|
||||||
|
uc.mutation.SetGameLimit(v)
|
||||||
|
}
|
||||||
if _, ok := uc.mutation.CoinOpen(); !ok {
|
if _, ok := uc.mutation.CoinOpen(); !ok {
|
||||||
v := user.DefaultCoinOpen
|
v := user.DefaultCoinOpen
|
||||||
uc.mutation.SetCoinOpen(v)
|
uc.mutation.SetCoinOpen(v)
|
||||||
@ -1151,6 +1183,14 @@ func (uc *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) {
|
|||||||
_spec.SetField(user.FieldGameExp, field.TypeInt, value)
|
_spec.SetField(user.FieldGameExp, field.TypeInt, value)
|
||||||
_node.GameExp = value
|
_node.GameExp = value
|
||||||
}
|
}
|
||||||
|
if value, ok := uc.mutation.GameStory(); ok {
|
||||||
|
_spec.SetField(user.FieldGameStory, field.TypeInt, value)
|
||||||
|
_node.GameStory = value
|
||||||
|
}
|
||||||
|
if value, ok := uc.mutation.GameLimit(); ok {
|
||||||
|
_spec.SetField(user.FieldGameLimit, field.TypeBool, value)
|
||||||
|
_node.GameLimit = value
|
||||||
|
}
|
||||||
if value, ok := uc.mutation.Coin(); ok {
|
if value, ok := uc.mutation.Coin(); ok {
|
||||||
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
||||||
_node.Coin = value
|
_node.Coin = value
|
||||||
|
@ -1044,6 +1044,53 @@ func (uu *UserUpdate) ClearGameExp() *UserUpdate {
|
|||||||
return uu
|
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.
|
// SetCoin sets the "coin" field.
|
||||||
func (uu *UserUpdate) SetCoin(i int) *UserUpdate {
|
func (uu *UserUpdate) SetCoin(i int) *UserUpdate {
|
||||||
uu.mutation.ResetCoin()
|
uu.mutation.ResetCoin()
|
||||||
@ -1617,6 +1664,21 @@ func (uu *UserUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||||||
if uu.mutation.GameExpCleared() {
|
if uu.mutation.GameExpCleared() {
|
||||||
_spec.ClearField(user.FieldGameExp, field.TypeInt)
|
_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 {
|
if value, ok := uu.mutation.Coin(); ok {
|
||||||
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
||||||
}
|
}
|
||||||
@ -2850,6 +2912,53 @@ func (uuo *UserUpdateOne) ClearGameExp() *UserUpdateOne {
|
|||||||
return uuo
|
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.
|
// SetCoin sets the "coin" field.
|
||||||
func (uuo *UserUpdateOne) SetCoin(i int) *UserUpdateOne {
|
func (uuo *UserUpdateOne) SetCoin(i int) *UserUpdateOne {
|
||||||
uuo.mutation.ResetCoin()
|
uuo.mutation.ResetCoin()
|
||||||
@ -3453,6 +3562,21 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error)
|
|||||||
if uuo.mutation.GameExpCleared() {
|
if uuo.mutation.GameExpCleared() {
|
||||||
_spec.ClearField(user.FieldGameExp, field.TypeInt)
|
_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 {
|
if value, ok := uuo.mutation.Coin(); ok {
|
||||||
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
_spec.SetField(user.FieldCoin, field.TypeInt, value)
|
||||||
}
|
}
|
||||||
|
@ -1174,6 +1174,12 @@ func (h *OgentHandler) CreateUe(ctx context.Context, req *CreateUeReq) (CreateUe
|
|||||||
if v, ok := req.GameID.Get(); ok {
|
if v, ok := req.GameID.Get(); ok {
|
||||||
b.SetGameID(v)
|
b.SetGameID(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameEp.Get(); ok {
|
||||||
|
b.SetGameEp(v)
|
||||||
|
}
|
||||||
|
|
||||||
// Add all edges.
|
// Add all edges.
|
||||||
//b.SetOwnerID(req.Owner)
|
//b.SetOwnerID(req.Owner)
|
||||||
@ -1303,6 +1309,13 @@ func (h *OgentHandler) UpdateUe(ctx context.Context, req *UpdateUeReq, params Up
|
|||||||
if v, ok := req.GameID.Get(); ok {
|
if v, ok := req.GameID.Get(); ok {
|
||||||
b.SetGameID(v)
|
b.SetGameID(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameEp.Get(); ok {
|
||||||
|
b.SetGameEp(v)
|
||||||
|
}
|
||||||
|
|
||||||
// Add all edges.
|
// Add all edges.
|
||||||
//if v, ok := req.Owner.Get(); ok {
|
//if v, ok := req.Owner.Get(); ok {
|
||||||
// b.SetOwnerID(v)
|
// b.SetOwnerID(v)
|
||||||
@ -1585,6 +1598,12 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
|
|||||||
if v, ok := req.GameExp.Get(); ok {
|
if v, ok := req.GameExp.Get(); ok {
|
||||||
b.SetGameExp(v)
|
b.SetGameExp(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameLimit.Get(); ok {
|
||||||
|
b.SetGameLimit(v)
|
||||||
|
}
|
||||||
if v, ok := req.Coin.Get(); ok {
|
if v, ok := req.Coin.Get(); ok {
|
||||||
b.SetCoin(v)
|
b.SetCoin(v)
|
||||||
}
|
}
|
||||||
@ -1797,6 +1816,12 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
|
|||||||
if v, ok := req.GameExp.Get(); ok {
|
if v, ok := req.GameExp.Get(); ok {
|
||||||
b.SetGameExp(v)
|
b.SetGameExp(v)
|
||||||
}
|
}
|
||||||
|
if v, ok := req.GameStory.Get(); ok {
|
||||||
|
b.SetGameStory(v)
|
||||||
|
}
|
||||||
|
if v, ok := req.GameLimit.Get(); ok {
|
||||||
|
b.SetGameLimit(v)
|
||||||
|
}
|
||||||
if v, ok := req.Coin.Get(); ok {
|
if v, ok := req.Coin.Get(); ok {
|
||||||
b.SetCoin(v)
|
b.SetCoin(v)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user