1
0

fix ue game lv

This commit is contained in:
syui 2024-06-01 23:35:34 +09:00
parent 2b479451c1
commit e508a50025
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
21 changed files with 2170 additions and 79 deletions

View File

@ -150,6 +150,9 @@ var (
{Name: "location_z", Type: field.TypeInt, Nullable: true},
{Name: "location_n", Type: field.TypeInt, Nullable: true},
{Name: "author", Type: field.TypeString, Nullable: true},
{Name: "game_lv", Type: field.TypeString, Nullable: true},
{Name: "game_exp", Type: field.TypeString, Nullable: true},
{Name: "game_id", Type: field.TypeString, Nullable: true},
{Name: "created_at", Type: field.TypeTime, Nullable: true},
{Name: "user_ue", Type: field.TypeInt},
}
@ -161,7 +164,7 @@ var (
ForeignKeys: []*schema.ForeignKey{
{
Symbol: "ues_users_ue",
Columns: []*schema.Column{UesColumns[20]},
Columns: []*schema.Column{UesColumns[23]},
RefColumns: []*schema.Column{UsersColumns[0]},
OnDelete: schema.NoAction,
},
@ -202,7 +205,7 @@ var (
{Name: "ten_post", Type: field.TypeString, Nullable: true},
{Name: "ten_get", Type: field.TypeString, Nullable: true},
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240516"},
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240601"},
{Name: "room", Type: field.TypeInt, Nullable: true},
{Name: "model", Type: field.TypeBool, Nullable: true},
{Name: "model_at", Type: field.TypeTime, Nullable: true},
@ -217,6 +220,7 @@ var (
{Name: "game_end", 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_exp", Type: field.TypeInt, Nullable: true},
{Name: "coin", Type: field.TypeInt, Nullable: true},
{Name: "coin_open", Type: field.TypeBool, Nullable: true, Default: false},
{Name: "coin_at", Type: field.TypeTime, Nullable: true},
@ -230,7 +234,7 @@ var (
ForeignKeys: []*schema.ForeignKey{
{
Symbol: "users_groups_users",
Columns: []*schema.Column{UsersColumns[51]},
Columns: []*schema.Column{UsersColumns[52]},
RefColumns: []*schema.Column{GroupsColumns[0]},
OnDelete: schema.SetNull,
},

View File

@ -5114,6 +5114,9 @@ type UeMutation struct {
location_n *int
addlocation_n *int
author *string
game_lv *string
game_exp *string
game_id *string
created_at *time.Time
clearedFields map[string]struct{}
owner *int
@ -6321,6 +6324,153 @@ func (m *UeMutation) ResetAuthor() {
delete(m.clearedFields, ue.FieldAuthor)
}
// SetGameLv sets the "game_lv" field.
func (m *UeMutation) SetGameLv(s string) {
m.game_lv = &s
}
// GameLv returns the value of the "game_lv" field in the mutation.
func (m *UeMutation) GameLv() (r string, exists bool) {
v := m.game_lv
if v == nil {
return
}
return *v, true
}
// OldGameLv returns the old "game_lv" 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) OldGameLv(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldGameLv is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldGameLv requires an ID field in the mutation")
}
oldValue, err := m.oldValue(ctx)
if err != nil {
return v, fmt.Errorf("querying old value for OldGameLv: %w", err)
}
return oldValue.GameLv, nil
}
// ClearGameLv clears the value of the "game_lv" field.
func (m *UeMutation) ClearGameLv() {
m.game_lv = nil
m.clearedFields[ue.FieldGameLv] = struct{}{}
}
// GameLvCleared returns if the "game_lv" field was cleared in this mutation.
func (m *UeMutation) GameLvCleared() bool {
_, ok := m.clearedFields[ue.FieldGameLv]
return ok
}
// ResetGameLv resets all changes to the "game_lv" field.
func (m *UeMutation) ResetGameLv() {
m.game_lv = nil
delete(m.clearedFields, ue.FieldGameLv)
}
// SetGameExp sets the "game_exp" field.
func (m *UeMutation) SetGameExp(s string) {
m.game_exp = &s
}
// GameExp returns the value of the "game_exp" field in the mutation.
func (m *UeMutation) GameExp() (r string, exists bool) {
v := m.game_exp
if v == nil {
return
}
return *v, true
}
// OldGameExp returns the old "game_exp" 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) OldGameExp(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldGameExp is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldGameExp requires an ID field in the mutation")
}
oldValue, err := m.oldValue(ctx)
if err != nil {
return v, fmt.Errorf("querying old value for OldGameExp: %w", err)
}
return oldValue.GameExp, nil
}
// ClearGameExp clears the value of the "game_exp" field.
func (m *UeMutation) ClearGameExp() {
m.game_exp = nil
m.clearedFields[ue.FieldGameExp] = struct{}{}
}
// GameExpCleared returns if the "game_exp" field was cleared in this mutation.
func (m *UeMutation) GameExpCleared() bool {
_, ok := m.clearedFields[ue.FieldGameExp]
return ok
}
// ResetGameExp resets all changes to the "game_exp" field.
func (m *UeMutation) ResetGameExp() {
m.game_exp = nil
delete(m.clearedFields, ue.FieldGameExp)
}
// SetGameID sets the "game_id" field.
func (m *UeMutation) SetGameID(s string) {
m.game_id = &s
}
// GameID returns the value of the "game_id" field in the mutation.
func (m *UeMutation) GameID() (r string, exists bool) {
v := m.game_id
if v == nil {
return
}
return *v, true
}
// OldGameID returns the old "game_id" 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) OldGameID(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldGameID is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldGameID requires an ID field in the mutation")
}
oldValue, err := m.oldValue(ctx)
if err != nil {
return v, fmt.Errorf("querying old value for OldGameID: %w", err)
}
return oldValue.GameID, nil
}
// ClearGameID clears the value of the "game_id" field.
func (m *UeMutation) ClearGameID() {
m.game_id = nil
m.clearedFields[ue.FieldGameID] = struct{}{}
}
// GameIDCleared returns if the "game_id" field was cleared in this mutation.
func (m *UeMutation) GameIDCleared() bool {
_, ok := m.clearedFields[ue.FieldGameID]
return ok
}
// ResetGameID resets all changes to the "game_id" field.
func (m *UeMutation) ResetGameID() {
m.game_id = nil
delete(m.clearedFields, ue.FieldGameID)
}
// SetCreatedAt sets the "created_at" field.
func (m *UeMutation) SetCreatedAt(t time.Time) {
m.created_at = &t
@ -6443,7 +6593,7 @@ func (m *UeMutation) Type() string {
// order to get all numeric fields that were incremented/decremented, call
// AddedFields().
func (m *UeMutation) Fields() []string {
fields := make([]string, 0, 19)
fields := make([]string, 0, 22)
if m._limit != nil {
fields = append(fields, ue.FieldLimit)
}
@ -6498,6 +6648,15 @@ func (m *UeMutation) Fields() []string {
if m.author != nil {
fields = append(fields, ue.FieldAuthor)
}
if m.game_lv != nil {
fields = append(fields, ue.FieldGameLv)
}
if m.game_exp != nil {
fields = append(fields, ue.FieldGameExp)
}
if m.game_id != nil {
fields = append(fields, ue.FieldGameID)
}
if m.created_at != nil {
fields = append(fields, ue.FieldCreatedAt)
}
@ -6545,6 +6704,12 @@ func (m *UeMutation) Field(name string) (ent.Value, bool) {
return m.LocationN()
case ue.FieldAuthor:
return m.Author()
case ue.FieldGameLv:
return m.GameLv()
case ue.FieldGameExp:
return m.GameExp()
case ue.FieldGameID:
return m.GameID()
case ue.FieldCreatedAt:
return m.CreatedAt()
}
@ -6592,6 +6757,12 @@ func (m *UeMutation) OldField(ctx context.Context, name string) (ent.Value, erro
return m.OldLocationN(ctx)
case ue.FieldAuthor:
return m.OldAuthor(ctx)
case ue.FieldGameLv:
return m.OldGameLv(ctx)
case ue.FieldGameExp:
return m.OldGameExp(ctx)
case ue.FieldGameID:
return m.OldGameID(ctx)
case ue.FieldCreatedAt:
return m.OldCreatedAt(ctx)
}
@ -6729,6 +6900,27 @@ func (m *UeMutation) SetField(name string, value ent.Value) error {
}
m.SetAuthor(v)
return nil
case ue.FieldGameLv:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetGameLv(v)
return nil
case ue.FieldGameExp:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetGameExp(v)
return nil
case ue.FieldGameID:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetGameID(v)
return nil
case ue.FieldCreatedAt:
v, ok := value.(time.Time)
if !ok {
@ -6952,6 +7144,15 @@ func (m *UeMutation) ClearedFields() []string {
if m.FieldCleared(ue.FieldAuthor) {
fields = append(fields, ue.FieldAuthor)
}
if m.FieldCleared(ue.FieldGameLv) {
fields = append(fields, ue.FieldGameLv)
}
if m.FieldCleared(ue.FieldGameExp) {
fields = append(fields, ue.FieldGameExp)
}
if m.FieldCleared(ue.FieldGameID) {
fields = append(fields, ue.FieldGameID)
}
if m.FieldCleared(ue.FieldCreatedAt) {
fields = append(fields, ue.FieldCreatedAt)
}
@ -7020,6 +7221,15 @@ func (m *UeMutation) ClearField(name string) error {
case ue.FieldAuthor:
m.ClearAuthor()
return nil
case ue.FieldGameLv:
m.ClearGameLv()
return nil
case ue.FieldGameExp:
m.ClearGameExp()
return nil
case ue.FieldGameID:
m.ClearGameID()
return nil
case ue.FieldCreatedAt:
m.ClearCreatedAt()
return nil
@ -7085,6 +7295,15 @@ func (m *UeMutation) ResetField(name string) error {
case ue.FieldAuthor:
m.ResetAuthor()
return nil
case ue.FieldGameLv:
m.ResetGameLv()
return nil
case ue.FieldGameExp:
m.ResetGameExp()
return nil
case ue.FieldGameID:
m.ResetGameID()
return nil
case ue.FieldCreatedAt:
m.ResetCreatedAt()
return nil
@ -7234,6 +7453,8 @@ type UserMutation struct {
game_account *bool
game_lv *int
addgame_lv *int
game_exp *int
addgame_exp *int
coin *int
addcoin *int
coin_open *bool
@ -9946,6 +10167,76 @@ func (m *UserMutation) ResetGameLv() {
delete(m.clearedFields, user.FieldGameLv)
}
// SetGameExp sets the "game_exp" field.
func (m *UserMutation) SetGameExp(i int) {
m.game_exp = &i
m.addgame_exp = nil
}
// GameExp returns the value of the "game_exp" field in the mutation.
func (m *UserMutation) GameExp() (r int, exists bool) {
v := m.game_exp
if v == nil {
return
}
return *v, true
}
// OldGameExp returns the old "game_exp" 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) OldGameExp(ctx context.Context) (v int, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldGameExp is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldGameExp requires an ID field in the mutation")
}
oldValue, err := m.oldValue(ctx)
if err != nil {
return v, fmt.Errorf("querying old value for OldGameExp: %w", err)
}
return oldValue.GameExp, nil
}
// AddGameExp adds i to the "game_exp" field.
func (m *UserMutation) AddGameExp(i int) {
if m.addgame_exp != nil {
*m.addgame_exp += i
} else {
m.addgame_exp = &i
}
}
// AddedGameExp returns the value that was added to the "game_exp" field in this mutation.
func (m *UserMutation) AddedGameExp() (r int, exists bool) {
v := m.addgame_exp
if v == nil {
return
}
return *v, true
}
// ClearGameExp clears the value of the "game_exp" field.
func (m *UserMutation) ClearGameExp() {
m.game_exp = nil
m.addgame_exp = nil
m.clearedFields[user.FieldGameExp] = struct{}{}
}
// GameExpCleared returns if the "game_exp" field was cleared in this mutation.
func (m *UserMutation) GameExpCleared() bool {
_, ok := m.clearedFields[user.FieldGameExp]
return ok
}
// ResetGameExp resets all changes to the "game_exp" field.
func (m *UserMutation) ResetGameExp() {
m.game_exp = nil
m.addgame_exp = nil
delete(m.clearedFields, user.FieldGameExp)
}
// SetCoin sets the "coin" field.
func (m *UserMutation) SetCoin(i int) {
m.coin = &i
@ -10364,7 +10655,7 @@ func (m *UserMutation) Type() string {
// order to get all numeric fields that were incremented/decremented, call
// AddedFields().
func (m *UserMutation) Fields() []string {
fields := make([]string, 0, 50)
fields := make([]string, 0, 51)
if m.username != nil {
fields = append(fields, user.FieldUsername)
}
@ -10506,6 +10797,9 @@ func (m *UserMutation) Fields() []string {
if m.game_lv != nil {
fields = append(fields, user.FieldGameLv)
}
if m.game_exp != nil {
fields = append(fields, user.FieldGameExp)
}
if m.coin != nil {
fields = append(fields, user.FieldCoin)
}
@ -10617,6 +10911,8 @@ func (m *UserMutation) Field(name string) (ent.Value, bool) {
return m.GameAccount()
case user.FieldGameLv:
return m.GameLv()
case user.FieldGameExp:
return m.GameExp()
case user.FieldCoin:
return m.Coin()
case user.FieldCoinOpen:
@ -10726,6 +11022,8 @@ func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, er
return m.OldGameAccount(ctx)
case user.FieldGameLv:
return m.OldGameLv(ctx)
case user.FieldGameExp:
return m.OldGameExp(ctx)
case user.FieldCoin:
return m.OldCoin(ctx)
case user.FieldCoinOpen:
@ -11070,6 +11368,13 @@ func (m *UserMutation) SetField(name string, value ent.Value) error {
}
m.SetGameLv(v)
return nil
case user.FieldGameExp:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetGameExp(v)
return nil
case user.FieldCoin:
v, ok := value.(int)
if !ok {
@ -11144,6 +11449,9 @@ func (m *UserMutation) AddedFields() []string {
if m.addgame_lv != nil {
fields = append(fields, user.FieldGameLv)
}
if m.addgame_exp != nil {
fields = append(fields, user.FieldGameExp)
}
if m.addcoin != nil {
fields = append(fields, user.FieldCoin)
}
@ -11185,6 +11493,8 @@ func (m *UserMutation) AddedField(name string) (ent.Value, bool) {
return m.AddedModelCriticalD()
case user.FieldGameLv:
return m.AddedGameLv()
case user.FieldGameExp:
return m.AddedGameExp()
case user.FieldCoin:
return m.AddedCoin()
}
@ -11301,6 +11611,13 @@ func (m *UserMutation) AddField(name string, value ent.Value) error {
}
m.AddGameLv(v)
return nil
case user.FieldGameExp:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.AddGameExp(v)
return nil
case user.FieldCoin:
v, ok := value.(int)
if !ok {
@ -11451,6 +11768,9 @@ func (m *UserMutation) ClearedFields() []string {
if m.FieldCleared(user.FieldGameLv) {
fields = append(fields, user.FieldGameLv)
}
if m.FieldCleared(user.FieldGameExp) {
fields = append(fields, user.FieldGameExp)
}
if m.FieldCleared(user.FieldCoin) {
fields = append(fields, user.FieldCoin)
}
@ -11609,6 +11929,9 @@ func (m *UserMutation) ClearField(name string) error {
case user.FieldGameLv:
m.ClearGameLv()
return nil
case user.FieldGameExp:
m.ClearGameExp()
return nil
case user.FieldCoin:
m.ClearCoin()
return nil
@ -11767,6 +12090,9 @@ func (m *UserMutation) ResetField(name string) error {
case user.FieldGameLv:
m.ResetGameLv()
return nil
case user.FieldGameExp:
m.ResetGameExp()
return nil
case user.FieldCoin:
m.ResetCoin()
return nil

File diff suppressed because it is too large Load Diff

View File

@ -264,6 +264,7 @@ type CardOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -499,6 +500,11 @@ func (s *CardOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *CardOwnerRead) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *CardOwnerRead) GetCoin() OptInt {
return s.Coin
@ -744,6 +750,11 @@ func (s *CardOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *CardOwnerRead) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *CardOwnerRead) SetCoin(val OptInt) {
s.Coin = val
@ -1563,6 +1574,9 @@ type CreateUeReq struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
Owner int `json:"owner"`
}
@ -1657,6 +1671,21 @@ func (s *CreateUeReq) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *CreateUeReq) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *CreateUeReq) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *CreateUeReq) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *CreateUeReq) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -1757,6 +1786,21 @@ func (s *CreateUeReq) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *CreateUeReq) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *CreateUeReq) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *CreateUeReq) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *CreateUeReq) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -1815,6 +1859,7 @@ type CreateUserReq struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -2059,6 +2104,11 @@ func (s *CreateUserReq) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *CreateUserReq) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *CreateUserReq) GetCoin() OptInt {
return s.Coin
@ -2329,6 +2379,11 @@ func (s *CreateUserReq) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *CreateUserReq) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *CreateUserReq) SetCoin(val OptInt) {
s.Coin = val
@ -2558,6 +2613,7 @@ type GroupUsersList struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -2793,6 +2849,11 @@ func (s *GroupUsersList) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *GroupUsersList) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *GroupUsersList) GetCoin() OptInt {
return s.Coin
@ -3038,6 +3099,11 @@ func (s *GroupUsersList) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *GroupUsersList) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *GroupUsersList) SetCoin(val OptInt) {
s.Coin = val
@ -3639,6 +3705,7 @@ type MaOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -3874,6 +3941,11 @@ func (s *MaOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *MaOwnerRead) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *MaOwnerRead) GetCoin() OptInt {
return s.Coin
@ -4119,6 +4191,11 @@ func (s *MaOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *MaOwnerRead) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *MaOwnerRead) SetCoin(val OptInt) {
s.Coin = val
@ -5414,6 +5491,7 @@ type SevOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -5649,6 +5727,11 @@ func (s *SevOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *SevOwnerRead) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *SevOwnerRead) GetCoin() OptInt {
return s.Coin
@ -5894,6 +5977,11 @@ func (s *SevOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *SevOwnerRead) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *SevOwnerRead) SetCoin(val OptInt) {
s.Coin = val
@ -6184,6 +6272,9 @@ type UeCreate struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
}
@ -6272,6 +6363,21 @@ func (s *UeCreate) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UeCreate) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UeCreate) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UeCreate) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *UeCreate) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -6362,6 +6468,21 @@ func (s *UeCreate) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UeCreate) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UeCreate) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UeCreate) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *UeCreate) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -6388,6 +6509,9 @@ type UeList struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
}
@ -6476,6 +6600,21 @@ func (s *UeList) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UeList) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UeList) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UeList) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *UeList) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -6566,6 +6705,21 @@ func (s *UeList) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UeList) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UeList) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UeList) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *UeList) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -6619,6 +6773,7 @@ type UeOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -6854,6 +7009,11 @@ func (s *UeOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UeOwnerRead) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UeOwnerRead) GetCoin() OptInt {
return s.Coin
@ -7099,6 +7259,11 @@ func (s *UeOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UeOwnerRead) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UeOwnerRead) SetCoin(val OptInt) {
s.Coin = val
@ -7135,6 +7300,9 @@ type UeRead struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
}
@ -7223,6 +7391,21 @@ func (s *UeRead) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UeRead) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UeRead) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UeRead) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *UeRead) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -7313,6 +7496,21 @@ func (s *UeRead) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UeRead) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UeRead) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UeRead) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *UeRead) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -7339,6 +7537,9 @@ type UeUpdate struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
}
@ -7427,6 +7628,21 @@ func (s *UeUpdate) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UeUpdate) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UeUpdate) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UeUpdate) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *UeUpdate) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -7517,6 +7733,21 @@ func (s *UeUpdate) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UeUpdate) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UeUpdate) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UeUpdate) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *UeUpdate) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -8038,6 +8269,9 @@ type UpdateUeReq struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
Owner OptInt `json:"owner"`
}
@ -8126,6 +8360,21 @@ func (s *UpdateUeReq) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UpdateUeReq) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UpdateUeReq) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UpdateUeReq) GetGameID() OptString {
return s.GameID
}
// GetOwner returns the value of Owner.
func (s *UpdateUeReq) GetOwner() OptInt {
return s.Owner
@ -8216,6 +8465,21 @@ func (s *UpdateUeReq) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UpdateUeReq) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UpdateUeReq) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UpdateUeReq) SetGameID(val OptString) {
s.GameID = val
}
// SetOwner sets the value of Owner.
func (s *UpdateUeReq) SetOwner(val OptInt) {
s.Owner = val
@ -8266,6 +8530,7 @@ type UpdateUserReq struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -8495,6 +8760,11 @@ func (s *UpdateUserReq) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UpdateUserReq) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UpdateUserReq) GetCoin() OptInt {
return s.Coin
@ -8750,6 +9020,11 @@ func (s *UpdateUserReq) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UpdateUserReq) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UpdateUserReq) SetCoin(val OptInt) {
s.Coin = val
@ -8936,6 +9211,7 @@ type UserCreate struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -9171,6 +9447,11 @@ func (s *UserCreate) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UserCreate) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UserCreate) GetCoin() OptInt {
return s.Coin
@ -9416,6 +9697,11 @@ func (s *UserCreate) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UserCreate) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UserCreate) SetCoin(val OptInt) {
s.Coin = val
@ -9481,6 +9767,7 @@ type UserList struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -9716,6 +10003,11 @@ func (s *UserList) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UserList) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UserList) GetCoin() OptInt {
return s.Coin
@ -9961,6 +10253,11 @@ func (s *UserList) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UserList) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UserList) SetCoin(val OptInt) {
s.Coin = val
@ -10270,6 +10567,7 @@ type UserRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -10505,6 +10803,11 @@ func (s *UserRead) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UserRead) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UserRead) GetCoin() OptInt {
return s.Coin
@ -10750,6 +11053,11 @@ func (s *UserRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UserRead) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UserRead) SetCoin(val OptInt) {
s.Coin = val
@ -10911,6 +11219,9 @@ type UserUeList struct {
LocationZ OptInt `json:"location_z"`
LocationN OptInt `json:"location_n"`
Author OptString `json:"author"`
GameLv OptString `json:"game_lv"`
GameExp OptString `json:"game_exp"`
GameID OptString `json:"game_id"`
CreatedAt OptDateTime `json:"created_at"`
}
@ -10999,6 +11310,21 @@ func (s *UserUeList) GetAuthor() OptString {
return s.Author
}
// GetGameLv returns the value of GameLv.
func (s *UserUeList) GetGameLv() OptString {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UserUeList) GetGameExp() OptString {
return s.GameExp
}
// GetGameID returns the value of GameID.
func (s *UserUeList) GetGameID() OptString {
return s.GameID
}
// GetCreatedAt returns the value of CreatedAt.
func (s *UserUeList) GetCreatedAt() OptDateTime {
return s.CreatedAt
@ -11089,6 +11415,21 @@ func (s *UserUeList) SetAuthor(val OptString) {
s.Author = val
}
// SetGameLv sets the value of GameLv.
func (s *UserUeList) SetGameLv(val OptString) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UserUeList) SetGameExp(val OptString) {
s.GameExp = val
}
// SetGameID sets the value of GameID.
func (s *UserUeList) SetGameID(val OptString) {
s.GameID = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *UserUeList) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
@ -11142,6 +11483,7 @@ type UserUpdate struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
GameExp OptInt `json:"game_exp"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
@ -11377,6 +11719,11 @@ func (s *UserUpdate) GetGameLv() OptInt {
return s.GameLv
}
// GetGameExp returns the value of GameExp.
func (s *UserUpdate) GetGameExp() OptInt {
return s.GameExp
}
// GetCoin returns the value of Coin.
func (s *UserUpdate) GetCoin() OptInt {
return s.Coin
@ -11622,6 +11969,11 @@ func (s *UserUpdate) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetGameExp sets the value of GameExp.
func (s *UserUpdate) SetGameExp(val OptInt) {
s.GameExp = val
}
// SetCoin sets the value of Coin.
func (s *UserUpdate) SetCoin(val OptInt) {
s.Coin = val

View File

@ -1165,6 +1165,16 @@ func (h *OgentHandler) CreateUe(ctx context.Context, req *CreateUeReq) (CreateUe
if v, ok := req.CreatedAt.Get(); ok {
b.SetCreatedAt(v)
}
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.GameID.Get(); ok {
b.SetGameID(v)
}
// Add all edges.
//b.SetOwnerID(req.Owner)
if req.Password == password {
@ -1284,6 +1294,15 @@ func (h *OgentHandler) UpdateUe(ctx context.Context, req *UpdateUeReq, params Up
if v, ok := req.Author.Get(); ok {
b.SetAuthor(v)
}
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.GameID.Get(); ok {
b.SetGameID(v)
}
// Add all edges.
//if v, ok := req.Owner.Get(); ok {
// b.SetOwnerID(v)
@ -1563,6 +1582,9 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}
@ -1772,6 +1794,9 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}

View File

@ -195,6 +195,7 @@ func NewCardOwnerRead(e *ent.User) *CardOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -382,6 +383,7 @@ func NewGroupUsersList(e *ent.User) *GroupUsersList {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -649,6 +651,7 @@ func NewMaOwnerRead(e *ent.User) *MaOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -872,6 +875,7 @@ func NewSevOwnerRead(e *ent.User) *SevOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -918,6 +922,9 @@ func NewUeCreate(e *ent.Ue) *UeCreate {
ret.LocationZ = NewOptInt(e.LocationZ)
ret.LocationN = NewOptInt(e.LocationN)
ret.Author = NewOptString(e.Author)
ret.GameLv = NewOptString(e.GameLv)
ret.GameExp = NewOptString(e.GameExp)
ret.GameID = NewOptString(e.GameID)
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
return &ret
}
@ -962,6 +969,9 @@ func NewUeList(e *ent.Ue) *UeList {
ret.LocationZ = NewOptInt(e.LocationZ)
ret.LocationN = NewOptInt(e.LocationN)
ret.Author = NewOptString(e.Author)
ret.GameLv = NewOptString(e.GameLv)
ret.GameExp = NewOptString(e.GameExp)
ret.GameID = NewOptString(e.GameID)
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
return &ret
}
@ -1006,6 +1016,9 @@ func NewUeRead(e *ent.Ue) *UeRead {
ret.LocationZ = NewOptInt(e.LocationZ)
ret.LocationN = NewOptInt(e.LocationN)
ret.Author = NewOptString(e.Author)
ret.GameLv = NewOptString(e.GameLv)
ret.GameExp = NewOptString(e.GameExp)
ret.GameID = NewOptString(e.GameID)
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
return &ret
}
@ -1050,6 +1063,9 @@ func NewUeUpdate(e *ent.Ue) *UeUpdate {
ret.LocationZ = NewOptInt(e.LocationZ)
ret.LocationN = NewOptInt(e.LocationN)
ret.Author = NewOptString(e.Author)
ret.GameLv = NewOptString(e.GameLv)
ret.GameExp = NewOptString(e.GameExp)
ret.GameID = NewOptString(e.GameID)
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
return &ret
}
@ -1123,6 +1139,7 @@ func NewUeOwnerRead(e *ent.User) *UeOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -1198,6 +1215,7 @@ func NewUserCreate(e *ent.User) *UserCreate {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -1273,6 +1291,7 @@ func NewUserList(e *ent.User) *UserList {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -1348,6 +1367,7 @@ func NewUserRead(e *ent.User) *UserRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -1423,6 +1443,7 @@ func NewUserUpdate(e *ent.User) *UserUpdate {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.GameExp = NewOptInt(e.GameExp)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
@ -1589,6 +1610,9 @@ func NewUserUeList(e *ent.Ue) *UserUeList {
ret.LocationZ = NewOptInt(e.LocationZ)
ret.LocationN = NewOptInt(e.LocationN)
ret.Author = NewOptString(e.Author)
ret.GameLv = NewOptString(e.GameLv)
ret.GameExp = NewOptString(e.GameExp)
ret.GameID = NewOptString(e.GameID)
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
return &ret
}

View File

@ -1617,6 +1617,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -1813,6 +1822,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"owner": {
"type": "integer"
}
@ -2114,6 +2132,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -2426,6 +2447,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -3117,6 +3141,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -3368,6 +3395,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -3925,6 +3955,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -4317,6 +4350,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -4393,6 +4429,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -4461,6 +4506,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -4524,6 +4578,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -4587,6 +4650,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -4650,6 +4722,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
@ -4809,6 +4890,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -4981,6 +5065,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -5172,6 +5259,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -5338,6 +5428,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -5504,6 +5597,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -5670,6 +5766,9 @@
"game_lv": {
"type": "integer"
},
"game_exp": {
"type": "integer"
},
"coin": {
"type": "integer"
},
@ -5895,6 +5994,15 @@
"author": {
"type": "string"
},
"game_lv": {
"type": "string"
},
"game_exp": {
"type": "string"
},
"game_id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"

View File

@ -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 = ueDescPassword.Validators[0].(func(string) error)
// ueDescCreatedAt is the schema descriptor for created_at field.
ueDescCreatedAt := ueFields[18].Descriptor()
ueDescCreatedAt := ueFields[21].Descriptor()
// ue.DefaultCreatedAt holds the default value on creation for the created_at field.
ue.DefaultCreatedAt = ueDescCreatedAt.Default.(func() time.Time)
userFields := schema.User{}.Fields()
@ -216,11 +216,11 @@ func init() {
// user.DefaultGameAccount holds the default value on creation for the game_account field.
user.DefaultGameAccount = userDescGameAccount.Default.(bool)
// userDescCoinOpen is the schema descriptor for coin_open field.
userDescCoinOpen := userFields[48].Descriptor()
userDescCoinOpen := userFields[49].Descriptor()
// user.DefaultCoinOpen holds the default value on creation for the coin_open field.
user.DefaultCoinOpen = userDescCoinOpen.Default.(bool)
// userDescCoinAt is the schema descriptor for coin_at field.
userDescCoinAt := userFields[49].Descriptor()
userDescCoinAt := userFields[50].Descriptor()
// user.DefaultCoinAt holds the default value on creation for the coin_at field.
user.DefaultCoinAt = userDescCoinAt.Default.(func() time.Time)
}

View File

@ -75,6 +75,15 @@ func (Ue) Fields() []ent.Field {
field.String("author").
Optional(),
field.String("game_lv").
Optional(),
field.String("game_exp").
Optional(),
field.String("game_id").
Optional(),
field.Time("created_at").
Immutable().
Optional().

View File

@ -218,6 +218,9 @@ func (User) Fields() []ent.Field {
field.Int("game_lv").
Optional(),
field.Int("game_exp").
Optional(),
field.Int("coin").
Optional(),

View File

@ -54,6 +54,12 @@ type Ue struct {
LocationN int `json:"location_n,omitempty"`
// Author holds the value of the "author" field.
Author string `json:"author,omitempty"`
// GameLv holds the value of the "game_lv" field.
GameLv string `json:"game_lv,omitempty"`
// GameExp holds the value of the "game_exp" field.
GameExp string `json:"game_exp,omitempty"`
// GameID holds the value of the "game_id" field.
GameID string `json:"game_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
@ -94,7 +100,7 @@ func (*Ue) scanValues(columns []string) ([]any, error) {
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:
values[i] = new(sql.NullInt64)
case ue.FieldPassword, ue.FieldMode, ue.FieldToken, ue.FieldAuthor:
case ue.FieldPassword, ue.FieldMode, ue.FieldToken, ue.FieldAuthor, ue.FieldGameLv, ue.FieldGameExp, ue.FieldGameID:
values[i] = new(sql.NullString)
case ue.FieldCreatedAt:
values[i] = new(sql.NullTime)
@ -229,6 +235,24 @@ func (u *Ue) assignValues(columns []string, values []any) error {
} else if value.Valid {
u.Author = value.String
}
case ue.FieldGameLv:
if value, ok := values[i].(*sql.NullString); !ok {
return fmt.Errorf("unexpected type %T for field game_lv", values[i])
} else if value.Valid {
u.GameLv = value.String
}
case ue.FieldGameExp:
if value, ok := values[i].(*sql.NullString); !ok {
return fmt.Errorf("unexpected type %T for field game_exp", values[i])
} else if value.Valid {
u.GameExp = value.String
}
case ue.FieldGameID:
if value, ok := values[i].(*sql.NullString); !ok {
return fmt.Errorf("unexpected type %T for field game_id", values[i])
} else if value.Valid {
u.GameID = value.String
}
case ue.FieldCreatedAt:
if value, ok := values[i].(*sql.NullTime); !ok {
return fmt.Errorf("unexpected type %T for field created_at", values[i])
@ -335,6 +359,15 @@ func (u *Ue) String() string {
builder.WriteString("author=")
builder.WriteString(u.Author)
builder.WriteString(", ")
builder.WriteString("game_lv=")
builder.WriteString(u.GameLv)
builder.WriteString(", ")
builder.WriteString("game_exp=")
builder.WriteString(u.GameExp)
builder.WriteString(", ")
builder.WriteString("game_id=")
builder.WriteString(u.GameID)
builder.WriteString(", ")
builder.WriteString("created_at=")
builder.WriteString(u.CreatedAt.Format(time.ANSIC))
builder.WriteByte(')')

View File

@ -50,6 +50,12 @@ const (
FieldLocationN = "location_n"
// FieldAuthor holds the string denoting the author field in the database.
FieldAuthor = "author"
// FieldGameLv holds the string denoting the game_lv field in the database.
FieldGameLv = "game_lv"
// FieldGameExp holds the string denoting the game_exp field in the database.
FieldGameExp = "game_exp"
// FieldGameID holds the string denoting the game_id field in the database.
FieldGameID = "game_id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// EdgeOwner holds the string denoting the owner edge name in mutations.
@ -86,6 +92,9 @@ var Columns = []string{
FieldLocationZ,
FieldLocationN,
FieldAuthor,
FieldGameLv,
FieldGameExp,
FieldGameID,
FieldCreatedAt,
}
@ -221,6 +230,21 @@ func ByAuthor(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAuthor, opts...).ToFunc()
}
// ByGameLv orders the results by the game_lv field.
func ByGameLv(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGameLv, opts...).ToFunc()
}
// ByGameExp orders the results by the game_exp field.
func ByGameExp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGameExp, opts...).ToFunc()
}
// ByGameID orders the results by the game_id field.
func ByGameID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGameID, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()

View File

@ -145,6 +145,21 @@ func Author(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldAuthor, v))
}
// GameLv applies equality check predicate on the "game_lv" field. It's identical to GameLvEQ.
func GameLv(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameLv, v))
}
// GameExp applies equality check predicate on the "game_exp" field. It's identical to GameExpEQ.
func GameExp(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameExp, v))
}
// GameID applies equality check predicate on the "game_id" field. It's identical to GameIDEQ.
func GameID(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameID, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))
@ -1050,6 +1065,231 @@ func AuthorContainsFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldContainsFold(FieldAuthor, v))
}
// GameLvEQ applies the EQ predicate on the "game_lv" field.
func GameLvEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameLv, v))
}
// GameLvNEQ applies the NEQ predicate on the "game_lv" field.
func GameLvNEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldNEQ(FieldGameLv, v))
}
// GameLvIn applies the In predicate on the "game_lv" field.
func GameLvIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldIn(FieldGameLv, vs...))
}
// GameLvNotIn applies the NotIn predicate on the "game_lv" field.
func GameLvNotIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldNotIn(FieldGameLv, vs...))
}
// GameLvGT applies the GT predicate on the "game_lv" field.
func GameLvGT(v string) predicate.Ue {
return predicate.Ue(sql.FieldGT(FieldGameLv, v))
}
// GameLvGTE applies the GTE predicate on the "game_lv" field.
func GameLvGTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldGTE(FieldGameLv, v))
}
// GameLvLT applies the LT predicate on the "game_lv" field.
func GameLvLT(v string) predicate.Ue {
return predicate.Ue(sql.FieldLT(FieldGameLv, v))
}
// GameLvLTE applies the LTE predicate on the "game_lv" field.
func GameLvLTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldLTE(FieldGameLv, v))
}
// GameLvContains applies the Contains predicate on the "game_lv" field.
func GameLvContains(v string) predicate.Ue {
return predicate.Ue(sql.FieldContains(FieldGameLv, v))
}
// GameLvHasPrefix applies the HasPrefix predicate on the "game_lv" field.
func GameLvHasPrefix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasPrefix(FieldGameLv, v))
}
// GameLvHasSuffix applies the HasSuffix predicate on the "game_lv" field.
func GameLvHasSuffix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasSuffix(FieldGameLv, v))
}
// GameLvIsNil applies the IsNil predicate on the "game_lv" field.
func GameLvIsNil() predicate.Ue {
return predicate.Ue(sql.FieldIsNull(FieldGameLv))
}
// GameLvNotNil applies the NotNil predicate on the "game_lv" field.
func GameLvNotNil() predicate.Ue {
return predicate.Ue(sql.FieldNotNull(FieldGameLv))
}
// GameLvEqualFold applies the EqualFold predicate on the "game_lv" field.
func GameLvEqualFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldEqualFold(FieldGameLv, v))
}
// GameLvContainsFold applies the ContainsFold predicate on the "game_lv" field.
func GameLvContainsFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldContainsFold(FieldGameLv, v))
}
// GameExpEQ applies the EQ predicate on the "game_exp" field.
func GameExpEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameExp, v))
}
// GameExpNEQ applies the NEQ predicate on the "game_exp" field.
func GameExpNEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldNEQ(FieldGameExp, v))
}
// GameExpIn applies the In predicate on the "game_exp" field.
func GameExpIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldIn(FieldGameExp, vs...))
}
// GameExpNotIn applies the NotIn predicate on the "game_exp" field.
func GameExpNotIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldNotIn(FieldGameExp, vs...))
}
// GameExpGT applies the GT predicate on the "game_exp" field.
func GameExpGT(v string) predicate.Ue {
return predicate.Ue(sql.FieldGT(FieldGameExp, v))
}
// GameExpGTE applies the GTE predicate on the "game_exp" field.
func GameExpGTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldGTE(FieldGameExp, v))
}
// GameExpLT applies the LT predicate on the "game_exp" field.
func GameExpLT(v string) predicate.Ue {
return predicate.Ue(sql.FieldLT(FieldGameExp, v))
}
// GameExpLTE applies the LTE predicate on the "game_exp" field.
func GameExpLTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldLTE(FieldGameExp, v))
}
// GameExpContains applies the Contains predicate on the "game_exp" field.
func GameExpContains(v string) predicate.Ue {
return predicate.Ue(sql.FieldContains(FieldGameExp, v))
}
// GameExpHasPrefix applies the HasPrefix predicate on the "game_exp" field.
func GameExpHasPrefix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasPrefix(FieldGameExp, v))
}
// GameExpHasSuffix applies the HasSuffix predicate on the "game_exp" field.
func GameExpHasSuffix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasSuffix(FieldGameExp, v))
}
// GameExpIsNil applies the IsNil predicate on the "game_exp" field.
func GameExpIsNil() predicate.Ue {
return predicate.Ue(sql.FieldIsNull(FieldGameExp))
}
// GameExpNotNil applies the NotNil predicate on the "game_exp" field.
func GameExpNotNil() predicate.Ue {
return predicate.Ue(sql.FieldNotNull(FieldGameExp))
}
// GameExpEqualFold applies the EqualFold predicate on the "game_exp" field.
func GameExpEqualFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldEqualFold(FieldGameExp, v))
}
// GameExpContainsFold applies the ContainsFold predicate on the "game_exp" field.
func GameExpContainsFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldContainsFold(FieldGameExp, v))
}
// GameIDEQ applies the EQ predicate on the "game_id" field.
func GameIDEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldGameID, v))
}
// GameIDNEQ applies the NEQ predicate on the "game_id" field.
func GameIDNEQ(v string) predicate.Ue {
return predicate.Ue(sql.FieldNEQ(FieldGameID, v))
}
// GameIDIn applies the In predicate on the "game_id" field.
func GameIDIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldIn(FieldGameID, vs...))
}
// GameIDNotIn applies the NotIn predicate on the "game_id" field.
func GameIDNotIn(vs ...string) predicate.Ue {
return predicate.Ue(sql.FieldNotIn(FieldGameID, vs...))
}
// GameIDGT applies the GT predicate on the "game_id" field.
func GameIDGT(v string) predicate.Ue {
return predicate.Ue(sql.FieldGT(FieldGameID, v))
}
// GameIDGTE applies the GTE predicate on the "game_id" field.
func GameIDGTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldGTE(FieldGameID, v))
}
// GameIDLT applies the LT predicate on the "game_id" field.
func GameIDLT(v string) predicate.Ue {
return predicate.Ue(sql.FieldLT(FieldGameID, v))
}
// GameIDLTE applies the LTE predicate on the "game_id" field.
func GameIDLTE(v string) predicate.Ue {
return predicate.Ue(sql.FieldLTE(FieldGameID, v))
}
// GameIDContains applies the Contains predicate on the "game_id" field.
func GameIDContains(v string) predicate.Ue {
return predicate.Ue(sql.FieldContains(FieldGameID, v))
}
// GameIDHasPrefix applies the HasPrefix predicate on the "game_id" field.
func GameIDHasPrefix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasPrefix(FieldGameID, v))
}
// GameIDHasSuffix applies the HasSuffix predicate on the "game_id" field.
func GameIDHasSuffix(v string) predicate.Ue {
return predicate.Ue(sql.FieldHasSuffix(FieldGameID, v))
}
// GameIDIsNil applies the IsNil predicate on the "game_id" field.
func GameIDIsNil() predicate.Ue {
return predicate.Ue(sql.FieldIsNull(FieldGameID))
}
// GameIDNotNil applies the NotNil predicate on the "game_id" field.
func GameIDNotNil() predicate.Ue {
return predicate.Ue(sql.FieldNotNull(FieldGameID))
}
// GameIDEqualFold applies the EqualFold predicate on the "game_id" field.
func GameIDEqualFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldEqualFold(FieldGameID, v))
}
// GameIDContainsFold applies the ContainsFold predicate on the "game_id" field.
func GameIDContainsFold(v string) predicate.Ue {
return predicate.Ue(sql.FieldContainsFold(FieldGameID, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Ue {
return predicate.Ue(sql.FieldEQ(FieldCreatedAt, v))

View File

@ -265,6 +265,48 @@ func (uc *UeCreate) SetNillableAuthor(s *string) *UeCreate {
return uc
}
// SetGameLv sets the "game_lv" field.
func (uc *UeCreate) SetGameLv(s string) *UeCreate {
uc.mutation.SetGameLv(s)
return uc
}
// SetNillableGameLv sets the "game_lv" field if the given value is not nil.
func (uc *UeCreate) SetNillableGameLv(s *string) *UeCreate {
if s != nil {
uc.SetGameLv(*s)
}
return uc
}
// SetGameExp sets the "game_exp" field.
func (uc *UeCreate) SetGameExp(s string) *UeCreate {
uc.mutation.SetGameExp(s)
return uc
}
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
func (uc *UeCreate) SetNillableGameExp(s *string) *UeCreate {
if s != nil {
uc.SetGameExp(*s)
}
return uc
}
// SetGameID sets the "game_id" field.
func (uc *UeCreate) SetGameID(s string) *UeCreate {
uc.mutation.SetGameID(s)
return uc
}
// SetNillableGameID sets the "game_id" field if the given value is not nil.
func (uc *UeCreate) SetNillableGameID(s *string) *UeCreate {
if s != nil {
uc.SetGameID(*s)
}
return uc
}
// SetCreatedAt sets the "created_at" field.
func (uc *UeCreate) SetCreatedAt(t time.Time) *UeCreate {
uc.mutation.SetCreatedAt(t)
@ -454,6 +496,18 @@ func (uc *UeCreate) createSpec() (*Ue, *sqlgraph.CreateSpec) {
_spec.SetField(ue.FieldAuthor, field.TypeString, value)
_node.Author = value
}
if value, ok := uc.mutation.GameLv(); ok {
_spec.SetField(ue.FieldGameLv, field.TypeString, value)
_node.GameLv = value
}
if value, ok := uc.mutation.GameExp(); ok {
_spec.SetField(ue.FieldGameExp, field.TypeString, value)
_node.GameExp = value
}
if value, ok := uc.mutation.GameID(); ok {
_spec.SetField(ue.FieldGameID, field.TypeString, value)
_node.GameID = value
}
if value, ok := uc.mutation.CreatedAt(); ok {
_spec.SetField(ue.FieldCreatedAt, field.TypeTime, value)
_node.CreatedAt = value

View File

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

View File

@ -111,6 +111,8 @@ type User struct {
GameAccount bool `json:"game_account,omitempty"`
// GameLv holds the value of the "game_lv" field.
GameLv int `json:"game_lv,omitempty"`
// GameExp holds the value of the "game_exp" field.
GameExp int `json:"game_exp,omitempty"`
// Coin holds the value of the "coin" field.
Coin int `json:"coin,omitempty"`
// CoinOpen holds the value of the "coin_open" field.
@ -182,7 +184,7 @@ func (*User) scanValues(columns []string) ([]any, error) {
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:
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.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.FieldCoin:
values[i] = new(sql.NullInt64)
case user.FieldUsername, user.FieldDid, user.FieldToken, user.FieldPassword, user.FieldTenCard, user.FieldTenDelete, user.FieldTenPost, user.FieldTenGet, user.FieldNext:
values[i] = new(sql.NullString)
@ -493,6 +495,12 @@ func (u *User) assignValues(columns []string, values []any) error {
} else if value.Valid {
u.GameLv = int(value.Int64)
}
case user.FieldGameExp:
if value, ok := values[i].(*sql.NullInt64); !ok {
return fmt.Errorf("unexpected type %T for field game_exp", values[i])
} else if value.Valid {
u.GameExp = int(value.Int64)
}
case user.FieldCoin:
if value, ok := values[i].(*sql.NullInt64); !ok {
return fmt.Errorf("unexpected type %T for field coin", values[i])
@ -713,6 +721,9 @@ func (u *User) String() string {
builder.WriteString("game_lv=")
builder.WriteString(fmt.Sprintf("%v", u.GameLv))
builder.WriteString(", ")
builder.WriteString("game_exp=")
builder.WriteString(fmt.Sprintf("%v", u.GameExp))
builder.WriteString(", ")
builder.WriteString("coin=")
builder.WriteString(fmt.Sprintf("%v", u.Coin))
builder.WriteString(", ")

View File

@ -108,6 +108,8 @@ const (
FieldGameAccount = "game_account"
// FieldGameLv holds the string denoting the game_lv field in the database.
FieldGameLv = "game_lv"
// FieldGameExp holds the string denoting the game_exp field in the database.
FieldGameExp = "game_exp"
// FieldCoin holds the string denoting the coin field in the database.
FieldCoin = "coin"
// FieldCoinOpen holds the string denoting the coin_open field in the database.
@ -204,6 +206,7 @@ var Columns = []string{
FieldGameEnd,
FieldGameAccount,
FieldGameLv,
FieldGameExp,
FieldCoin,
FieldCoinOpen,
FieldCoinAt,
@ -528,6 +531,11 @@ func ByGameLv(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGameLv, opts...).ToFunc()
}
// ByGameExp orders the results by the game_exp field.
func ByGameExp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGameExp, opts...).ToFunc()
}
// ByCoin orders the results by the coin field.
func ByCoin(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCoin, opts...).ToFunc()

View File

@ -290,6 +290,11 @@ func GameLv(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldGameLv, v))
}
// GameExp applies equality check predicate on the "game_exp" field. It's identical to GameExpEQ.
func GameExp(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldGameExp, v))
}
// Coin applies equality check predicate on the "coin" field. It's identical to CoinEQ.
func Coin(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldCoin, v))
@ -2440,6 +2445,56 @@ func GameLvNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldGameLv))
}
// GameExpEQ applies the EQ predicate on the "game_exp" field.
func GameExpEQ(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldGameExp, v))
}
// GameExpNEQ applies the NEQ predicate on the "game_exp" field.
func GameExpNEQ(v int) predicate.User {
return predicate.User(sql.FieldNEQ(FieldGameExp, v))
}
// GameExpIn applies the In predicate on the "game_exp" field.
func GameExpIn(vs ...int) predicate.User {
return predicate.User(sql.FieldIn(FieldGameExp, vs...))
}
// GameExpNotIn applies the NotIn predicate on the "game_exp" field.
func GameExpNotIn(vs ...int) predicate.User {
return predicate.User(sql.FieldNotIn(FieldGameExp, vs...))
}
// GameExpGT applies the GT predicate on the "game_exp" field.
func GameExpGT(v int) predicate.User {
return predicate.User(sql.FieldGT(FieldGameExp, v))
}
// GameExpGTE applies the GTE predicate on the "game_exp" field.
func GameExpGTE(v int) predicate.User {
return predicate.User(sql.FieldGTE(FieldGameExp, v))
}
// GameExpLT applies the LT predicate on the "game_exp" field.
func GameExpLT(v int) predicate.User {
return predicate.User(sql.FieldLT(FieldGameExp, v))
}
// GameExpLTE applies the LTE predicate on the "game_exp" field.
func GameExpLTE(v int) predicate.User {
return predicate.User(sql.FieldLTE(FieldGameExp, v))
}
// GameExpIsNil applies the IsNil predicate on the "game_exp" field.
func GameExpIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldGameExp))
}
// GameExpNotNil applies the NotNil predicate on the "game_exp" field.
func GameExpNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldGameExp))
}
// CoinEQ applies the EQ predicate on the "coin" field.
func CoinEQ(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldCoin, v))

View File

@ -666,6 +666,20 @@ func (uc *UserCreate) SetNillableGameLv(i *int) *UserCreate {
return uc
}
// SetGameExp sets the "game_exp" field.
func (uc *UserCreate) SetGameExp(i int) *UserCreate {
uc.mutation.SetGameExp(i)
return uc
}
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
func (uc *UserCreate) SetNillableGameExp(i *int) *UserCreate {
if i != nil {
uc.SetGameExp(*i)
}
return uc
}
// SetCoin sets the "coin" field.
func (uc *UserCreate) SetCoin(i int) *UserCreate {
uc.mutation.SetCoin(i)
@ -1133,6 +1147,10 @@ func (uc *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) {
_spec.SetField(user.FieldGameLv, field.TypeInt, value)
_node.GameLv = value
}
if value, ok := uc.mutation.GameExp(); ok {
_spec.SetField(user.FieldGameExp, field.TypeInt, value)
_node.GameExp = value
}
if value, ok := uc.mutation.Coin(); ok {
_spec.SetField(user.FieldCoin, field.TypeInt, value)
_node.Coin = value

View File

@ -1017,6 +1017,33 @@ func (uu *UserUpdate) ClearGameLv() *UserUpdate {
return uu
}
// SetGameExp sets the "game_exp" field.
func (uu *UserUpdate) SetGameExp(i int) *UserUpdate {
uu.mutation.ResetGameExp()
uu.mutation.SetGameExp(i)
return uu
}
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
func (uu *UserUpdate) SetNillableGameExp(i *int) *UserUpdate {
if i != nil {
uu.SetGameExp(*i)
}
return uu
}
// AddGameExp adds i to the "game_exp" field.
func (uu *UserUpdate) AddGameExp(i int) *UserUpdate {
uu.mutation.AddGameExp(i)
return uu
}
// ClearGameExp clears the value of the "game_exp" field.
func (uu *UserUpdate) ClearGameExp() *UserUpdate {
uu.mutation.ClearGameExp()
return uu
}
// SetCoin sets the "coin" field.
func (uu *UserUpdate) SetCoin(i int) *UserUpdate {
uu.mutation.ResetCoin()
@ -1581,6 +1608,15 @@ func (uu *UserUpdate) sqlSave(ctx context.Context) (n int, err error) {
if uu.mutation.GameLvCleared() {
_spec.ClearField(user.FieldGameLv, field.TypeInt)
}
if value, ok := uu.mutation.GameExp(); ok {
_spec.SetField(user.FieldGameExp, field.TypeInt, value)
}
if value, ok := uu.mutation.AddedGameExp(); ok {
_spec.AddField(user.FieldGameExp, field.TypeInt, value)
}
if uu.mutation.GameExpCleared() {
_spec.ClearField(user.FieldGameExp, field.TypeInt)
}
if value, ok := uu.mutation.Coin(); ok {
_spec.SetField(user.FieldCoin, field.TypeInt, value)
}
@ -2787,6 +2823,33 @@ func (uuo *UserUpdateOne) ClearGameLv() *UserUpdateOne {
return uuo
}
// SetGameExp sets the "game_exp" field.
func (uuo *UserUpdateOne) SetGameExp(i int) *UserUpdateOne {
uuo.mutation.ResetGameExp()
uuo.mutation.SetGameExp(i)
return uuo
}
// SetNillableGameExp sets the "game_exp" field if the given value is not nil.
func (uuo *UserUpdateOne) SetNillableGameExp(i *int) *UserUpdateOne {
if i != nil {
uuo.SetGameExp(*i)
}
return uuo
}
// AddGameExp adds i to the "game_exp" field.
func (uuo *UserUpdateOne) AddGameExp(i int) *UserUpdateOne {
uuo.mutation.AddGameExp(i)
return uuo
}
// ClearGameExp clears the value of the "game_exp" field.
func (uuo *UserUpdateOne) ClearGameExp() *UserUpdateOne {
uuo.mutation.ClearGameExp()
return uuo
}
// SetCoin sets the "coin" field.
func (uuo *UserUpdateOne) SetCoin(i int) *UserUpdateOne {
uuo.mutation.ResetCoin()
@ -3381,6 +3444,15 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error)
if uuo.mutation.GameLvCleared() {
_spec.ClearField(user.FieldGameLv, field.TypeInt)
}
if value, ok := uuo.mutation.GameExp(); ok {
_spec.SetField(user.FieldGameExp, field.TypeInt, value)
}
if value, ok := uuo.mutation.AddedGameExp(); ok {
_spec.AddField(user.FieldGameExp, field.TypeInt, value)
}
if uuo.mutation.GameExpCleared() {
_spec.ClearField(user.FieldGameExp, field.TypeInt)
}
if value, ok := uuo.mutation.Coin(); ok {
_spec.SetField(user.FieldCoin, field.TypeInt, value)
}

View File

@ -1165,6 +1165,16 @@ func (h *OgentHandler) CreateUe(ctx context.Context, req *CreateUeReq) (CreateUe
if v, ok := req.CreatedAt.Get(); ok {
b.SetCreatedAt(v)
}
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.GameID.Get(); ok {
b.SetGameID(v)
}
// Add all edges.
//b.SetOwnerID(req.Owner)
if req.Password == password {
@ -1284,6 +1294,15 @@ func (h *OgentHandler) UpdateUe(ctx context.Context, req *UpdateUeReq, params Up
if v, ok := req.Author.Get(); ok {
b.SetAuthor(v)
}
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.GameID.Get(); ok {
b.SetGameID(v)
}
// Add all edges.
//if v, ok := req.Owner.Get(); ok {
// b.SetOwnerID(v)
@ -1563,6 +1582,9 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}
@ -1772,6 +1794,9 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.GameExp.Get(); ok {
b.SetGameExp(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}