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

@ -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...)