47 lines
1.4 KiB
Go
47 lines
1.4 KiB
Go
package dto
|
|
|
|
import "time"
|
|
|
|
type LiveClientLoginRequest struct {
|
|
Username string `json:"username" binding:"required"`
|
|
Password string `json:"password" binding:"required"`
|
|
}
|
|
|
|
type LiveClientRegisterRequest struct {
|
|
Username string `json:"username" binding:"required"`
|
|
Nickname string `json:"nickname"`
|
|
Password string `json:"password" binding:"required"`
|
|
ConfirmPassword string `json:"confirmPassword" binding:"required"`
|
|
}
|
|
|
|
type LiveClientProfileRequest struct {
|
|
Nickname string `json:"nickname"`
|
|
Avatar string `json:"avatar"`
|
|
}
|
|
|
|
type LiveClientPasswordRequest struct {
|
|
OldPassword string `json:"oldPassword" binding:"required"`
|
|
NewPassword string `json:"newPassword" binding:"required"`
|
|
ConfirmPassword string `json:"confirmPassword" binding:"required"`
|
|
}
|
|
|
|
type LiveClientAccountResponse struct {
|
|
UserID uint `json:"userId"`
|
|
Username string `json:"username"`
|
|
Nickname string `json:"nickname"`
|
|
Avatar string `json:"avatar"`
|
|
Enabled bool `json:"enabled"`
|
|
DiamondBalance int64 `json:"diamondBalance"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type LiveClientBalanceResponse struct {
|
|
DiamondBalance int64 `json:"diamondBalance"`
|
|
}
|
|
|
|
type LiveClientAuthResponse struct {
|
|
User *LiveClientAccountResponse `json:"user"`
|
|
Token string `json:"token"`
|
|
ExpiresAt int64 `json:"expiresAt"`
|
|
}
|