1
0
This commit is contained in:
2024-02-22 04:08:34 +09:00
parent d62d7b61d0
commit bd3b582150
16 changed files with 1650 additions and 33 deletions

View File

@ -765,9 +765,27 @@ func (s *CardOwnerRead) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfCardOwnerRead = [46]string{
var jsonFieldsNameOfCardOwnerRead = [49]string{
0: "id",
1: "username",
2: "did",
@ -814,6 +832,9 @@ var jsonFieldsNameOfCardOwnerRead = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes CardOwnerRead from json.
@ -821,7 +842,7 @@ func (s *CardOwnerRead) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode CardOwnerRead to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -1289,6 +1310,36 @@ func (s *CardOwnerRead) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -1298,13 +1349,14 @@ func (s *CardOwnerRead) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -2944,6 +2996,24 @@ func (s *CreateUserReq) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
{
if s.Card != nil {
e.FieldStart("card")
@ -2966,7 +3036,7 @@ func (s *CreateUserReq) encodeFields(e *jx.Encoder) {
}
}
var jsonFieldsNameOfCreateUserReq = [49]string{
var jsonFieldsNameOfCreateUserReq = [52]string{
0: "username",
1: "did",
2: "member",
@ -3014,8 +3084,11 @@ var jsonFieldsNameOfCreateUserReq = [49]string{
44: "game_end",
45: "game_account",
46: "game_lv",
47: "card",
48: "ue",
47: "coin",
48: "coin_open",
49: "coin_at",
50: "card",
51: "ue",
}
// Decode decodes CreateUserReq from json.
@ -3501,6 +3574,36 @@ func (s *CreateUserReq) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
case "card":
if err := func() error {
s.Card = make([]int, 0)
@ -4344,9 +4447,27 @@ func (s *GroupUsersList) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfGroupUsersList = [46]string{
var jsonFieldsNameOfGroupUsersList = [49]string{
0: "id",
1: "username",
2: "did",
@ -4393,6 +4514,9 @@ var jsonFieldsNameOfGroupUsersList = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes GroupUsersList from json.
@ -4400,7 +4524,7 @@ func (s *GroupUsersList) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GroupUsersList to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -4868,6 +4992,36 @@ func (s *GroupUsersList) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -4877,13 +5031,14 @@ func (s *GroupUsersList) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -7014,9 +7169,27 @@ func (s *UeOwnerRead) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfUeOwnerRead = [46]string{
var jsonFieldsNameOfUeOwnerRead = [49]string{
0: "id",
1: "username",
2: "did",
@ -7063,6 +7236,9 @@ var jsonFieldsNameOfUeOwnerRead = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes UeOwnerRead from json.
@ -7070,7 +7246,7 @@ func (s *UeOwnerRead) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode UeOwnerRead to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -7538,6 +7714,36 @@ func (s *UeOwnerRead) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -7547,13 +7753,14 @@ func (s *UeOwnerRead) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -9292,6 +9499,24 @@ func (s *UpdateUserReq) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
{
if s.Card != nil {
e.FieldStart("card")
@ -9314,7 +9539,7 @@ func (s *UpdateUserReq) encodeFields(e *jx.Encoder) {
}
}
var jsonFieldsNameOfUpdateUserReq = [46]string{
var jsonFieldsNameOfUpdateUserReq = [49]string{
0: "did",
1: "member",
2: "book",
@ -9359,8 +9584,11 @@ var jsonFieldsNameOfUpdateUserReq = [46]string{
41: "game_end",
42: "game_account",
43: "game_lv",
44: "card",
45: "ue",
44: "coin",
45: "coin_open",
46: "coin_at",
47: "card",
48: "ue",
}
// Decode decodes UpdateUserReq from json.
@ -9811,6 +10039,36 @@ func (s *UpdateUserReq) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
case "card":
if err := func() error {
s.Card = make([]int, 0)
@ -10390,9 +10648,27 @@ func (s *UserCreate) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfUserCreate = [46]string{
var jsonFieldsNameOfUserCreate = [49]string{
0: "id",
1: "username",
2: "did",
@ -10439,6 +10715,9 @@ var jsonFieldsNameOfUserCreate = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes UserCreate from json.
@ -10446,7 +10725,7 @@ func (s *UserCreate) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode UserCreate to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -10914,6 +11193,36 @@ func (s *UserCreate) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -10923,13 +11232,14 @@ func (s *UserCreate) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -11258,9 +11568,27 @@ func (s *UserList) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfUserList = [46]string{
var jsonFieldsNameOfUserList = [49]string{
0: "id",
1: "username",
2: "did",
@ -11307,6 +11635,9 @@ var jsonFieldsNameOfUserList = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes UserList from json.
@ -11314,7 +11645,7 @@ func (s *UserList) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode UserList to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -11782,6 +12113,36 @@ func (s *UserList) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -11791,13 +12152,14 @@ func (s *UserList) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -12126,9 +12488,27 @@ func (s *UserRead) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfUserRead = [46]string{
var jsonFieldsNameOfUserRead = [49]string{
0: "id",
1: "username",
2: "did",
@ -12175,6 +12555,9 @@ var jsonFieldsNameOfUserRead = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes UserRead from json.
@ -12182,7 +12565,7 @@ func (s *UserRead) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode UserRead to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -12650,6 +13033,36 @@ func (s *UserRead) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -12659,13 +13072,14 @@ func (s *UserRead) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.
@ -13382,9 +13796,27 @@ func (s *UserUpdate) encodeFields(e *jx.Encoder) {
s.GameLv.Encode(e)
}
}
{
if s.Coin.Set {
e.FieldStart("coin")
s.Coin.Encode(e)
}
}
{
if s.CoinOpen.Set {
e.FieldStart("coin_open")
s.CoinOpen.Encode(e)
}
}
{
if s.CoinAt.Set {
e.FieldStart("coin_at")
s.CoinAt.Encode(e, json.EncodeDateTime)
}
}
}
var jsonFieldsNameOfUserUpdate = [46]string{
var jsonFieldsNameOfUserUpdate = [49]string{
0: "id",
1: "username",
2: "did",
@ -13431,6 +13863,9 @@ var jsonFieldsNameOfUserUpdate = [46]string{
43: "game_end",
44: "game_account",
45: "game_lv",
46: "coin",
47: "coin_open",
48: "coin_at",
}
// Decode decodes UserUpdate from json.
@ -13438,7 +13873,7 @@ func (s *UserUpdate) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode UserUpdate to nil")
}
var requiredBitSet [6]uint8
var requiredBitSet [7]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
@ -13906,6 +14341,36 @@ func (s *UserUpdate) Decode(d *jx.Decoder) error {
}(); err != nil {
return errors.Wrap(err, "decode field \"game_lv\"")
}
case "coin":
if err := func() error {
s.Coin.Reset()
if err := s.Coin.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin\"")
}
case "coin_open":
if err := func() error {
s.CoinOpen.Reset()
if err := s.CoinOpen.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_open\"")
}
case "coin_at":
if err := func() error {
s.CoinAt.Reset()
if err := s.CoinAt.Decode(d, json.DecodeDateTime); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"coin_at\"")
}
default:
return d.Skip()
}
@ -13915,13 +14380,14 @@ func (s *UserUpdate) Decode(d *jx.Decoder) error {
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [6]uint8{
for i, mask := range [7]uint8{
0b00000011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR.

View File

@ -264,6 +264,9 @@ type CardOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -496,6 +499,21 @@ func (s *CardOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *CardOwnerRead) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *CardOwnerRead) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *CardOwnerRead) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *CardOwnerRead) SetID(val int) {
s.ID = val
@ -726,6 +744,21 @@ func (s *CardOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *CardOwnerRead) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *CardOwnerRead) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *CardOwnerRead) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
func (*CardOwnerRead) readCardOwnerRes() {}
// Ref: #/components/schemas/CardRead
@ -1369,6 +1402,9 @@ type CreateUserReq struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
Card []int `json:"card"`
Ue []int `json:"ue"`
}
@ -1608,6 +1644,21 @@ func (s *CreateUserReq) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *CreateUserReq) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *CreateUserReq) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *CreateUserReq) GetCoinAt() OptDateTime {
return s.CoinAt
}
// GetCard returns the value of Card.
func (s *CreateUserReq) GetCard() []int {
return s.Card
@ -1853,6 +1904,21 @@ func (s *CreateUserReq) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *CreateUserReq) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *CreateUserReq) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *CreateUserReq) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
// SetCard sets the value of Card.
func (s *CreateUserReq) SetCard(val []int) {
s.Card = val
@ -2047,6 +2113,9 @@ type GroupUsersList struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -2279,6 +2348,21 @@ func (s *GroupUsersList) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *GroupUsersList) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *GroupUsersList) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *GroupUsersList) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *GroupUsersList) SetID(val int) {
s.ID = val
@ -2509,6 +2593,21 @@ func (s *GroupUsersList) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *GroupUsersList) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *GroupUsersList) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *GroupUsersList) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
type ListCardOKApplicationJSON []CardList
func (*ListCardOKApplicationJSON) listCardRes() {}
@ -3419,6 +3518,9 @@ type UeOwnerRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -3651,6 +3753,21 @@ func (s *UeOwnerRead) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UeOwnerRead) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UeOwnerRead) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UeOwnerRead) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *UeOwnerRead) SetID(val int) {
s.ID = val
@ -3881,6 +3998,21 @@ func (s *UeOwnerRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UeOwnerRead) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UeOwnerRead) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UeOwnerRead) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
func (*UeOwnerRead) readUeOwnerRes() {}
// Ref: #/components/schemas/UeRead
@ -4664,6 +4796,9 @@ type UpdateUserReq struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
Card []int `json:"card"`
Ue []int `json:"ue"`
}
@ -4888,6 +5023,21 @@ func (s *UpdateUserReq) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UpdateUserReq) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UpdateUserReq) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UpdateUserReq) GetCoinAt() OptDateTime {
return s.CoinAt
}
// GetCard returns the value of Card.
func (s *UpdateUserReq) GetCard() []int {
return s.Card
@ -5118,6 +5268,21 @@ func (s *UpdateUserReq) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UpdateUserReq) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UpdateUserReq) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UpdateUserReq) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
// SetCard sets the value of Card.
func (s *UpdateUserReq) SetCard(val []int) {
s.Card = val
@ -5279,6 +5444,9 @@ type UserCreate struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -5511,6 +5679,21 @@ func (s *UserCreate) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UserCreate) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UserCreate) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UserCreate) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *UserCreate) SetID(val int) {
s.ID = val
@ -5741,6 +5924,21 @@ func (s *UserCreate) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UserCreate) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UserCreate) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UserCreate) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
func (*UserCreate) createUserRes() {}
// Ref: #/components/schemas/UserList
@ -5791,6 +5989,9 @@ type UserList struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -6023,6 +6224,21 @@ func (s *UserList) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UserList) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UserList) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UserList) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *UserList) SetID(val int) {
s.ID = val
@ -6253,6 +6469,21 @@ func (s *UserList) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UserList) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UserList) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UserList) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
// Ref: #/components/schemas/UserRead
type UserRead struct {
ID int `json:"id"`
@ -6301,6 +6532,9 @@ type UserRead struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -6533,6 +6767,21 @@ func (s *UserRead) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UserRead) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UserRead) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UserRead) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *UserRead) SetID(val int) {
s.ID = val
@ -6763,6 +7012,21 @@ func (s *UserRead) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UserRead) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UserRead) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UserRead) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
func (*UserRead) readUserRes() {}
// Ref: #/components/schemas/User_UeList
@ -7015,6 +7279,9 @@ type UserUpdate struct {
GameEnd OptBool `json:"game_end"`
GameAccount OptBool `json:"game_account"`
GameLv OptInt `json:"game_lv"`
Coin OptInt `json:"coin"`
CoinOpen OptBool `json:"coin_open"`
CoinAt OptDateTime `json:"coin_at"`
}
// GetID returns the value of ID.
@ -7247,6 +7514,21 @@ func (s *UserUpdate) GetGameLv() OptInt {
return s.GameLv
}
// GetCoin returns the value of Coin.
func (s *UserUpdate) GetCoin() OptInt {
return s.Coin
}
// GetCoinOpen returns the value of CoinOpen.
func (s *UserUpdate) GetCoinOpen() OptBool {
return s.CoinOpen
}
// GetCoinAt returns the value of CoinAt.
func (s *UserUpdate) GetCoinAt() OptDateTime {
return s.CoinAt
}
// SetID sets the value of ID.
func (s *UserUpdate) SetID(val int) {
s.ID = val
@ -7477,4 +7759,19 @@ func (s *UserUpdate) SetGameLv(val OptInt) {
s.GameLv = val
}
// SetCoin sets the value of Coin.
func (s *UserUpdate) SetCoin(val OptInt) {
s.Coin = val
}
// SetCoinOpen sets the value of CoinOpen.
func (s *UserUpdate) SetCoinOpen(val OptBool) {
s.CoinOpen = val
}
// SetCoinAt sets the value of CoinAt.
func (s *UserUpdate) SetCoinAt(val OptDateTime) {
s.CoinAt = val
}
func (*UserUpdate) updateUserRes() {}

View File

@ -939,6 +939,15 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}
if v, ok := req.CoinOpen.Get(); ok {
b.SetCoinOpen(v)
}
if v, ok := req.CoinAt.Get(); ok {
b.SetCoinAt(v)
}
// Add all fields.
//b.SetUsername(req.Username)
@ -1142,6 +1151,15 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
if v, ok := req.GameLv.Get(); ok {
b.SetGameLv(v)
}
if v, ok := req.Coin.Get(); ok {
b.SetCoin(v)
}
if v, ok := req.CoinOpen.Get(); ok {
b.SetCoinOpen(v)
}
if v, ok := req.CoinAt.Get(); ok {
b.SetCoinAt(v)
}
// Add all edges.
if req.Card != nil {
b.ClearCard().AddCardIDs(req.Card...)

View File

@ -195,6 +195,9 @@ func NewCardOwnerRead(e *ent.User) *CardOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -379,6 +382,9 @@ func NewGroupUsersList(e *ent.User) *GroupUsersList {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -627,6 +633,9 @@ func NewUeOwnerRead(e *ent.User) *UeOwnerRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -699,6 +708,9 @@ func NewUserCreate(e *ent.User) *UserCreate {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -771,6 +783,9 @@ func NewUserList(e *ent.User) *UserList {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -843,6 +858,9 @@ func NewUserRead(e *ent.User) *UserRead {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}
@ -915,6 +933,9 @@ func NewUserUpdate(e *ent.User) *UserUpdate {
ret.GameEnd = NewOptBool(e.GameEnd)
ret.GameAccount = NewOptBool(e.GameAccount)
ret.GameLv = NewOptInt(e.GameLv)
ret.Coin = NewOptInt(e.Coin)
ret.CoinOpen = NewOptBool(e.CoinOpen)
ret.CoinAt = NewOptDateTime(e.CoinAt)
return &ret
}