chore: add dto field comments
This commit is contained in:
@@ -3,34 +3,52 @@ package dto
|
||||
import "quyun/v2/pkg/consts"
|
||||
|
||||
type SendOTPForm struct {
|
||||
// Phone 手机号(用于发送验证码)。
|
||||
Phone string `json:"phone"`
|
||||
}
|
||||
|
||||
type LoginForm struct {
|
||||
// Phone 手机号(用于验证码登录)。
|
||||
Phone string `json:"phone"`
|
||||
OTP string `json:"otp"`
|
||||
// OTP 短信验证码。
|
||||
OTP string `json:"otp"`
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
// Token 登录后签发的 JWT。
|
||||
Token string `json:"token"`
|
||||
User *User `json:"user"`
|
||||
// User 当前登录用户信息。
|
||||
User *User `json:"user"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int64 `json:"id"`
|
||||
Phone string `json:"phone"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Gender consts.Gender `json:"gender"`
|
||||
Bio string `json:"bio"`
|
||||
Birthday string `json:"birthday"` // YYYY-MM-DD
|
||||
Location *Location `json:"location"`
|
||||
Balance float64 `json:"balance"`
|
||||
Points int64 `json:"points"`
|
||||
IsRealNameVerified bool `json:"is_real_name_verified"`
|
||||
// ID 用户ID。
|
||||
ID int64 `json:"id"`
|
||||
// Phone 手机号。
|
||||
Phone string `json:"phone"`
|
||||
// Nickname 用户昵称。
|
||||
Nickname string `json:"nickname"`
|
||||
// Avatar 头像URL。
|
||||
Avatar string `json:"avatar"`
|
||||
// Gender 性别(male/female/secret)。
|
||||
Gender consts.Gender `json:"gender"`
|
||||
// Bio 用户简介。
|
||||
Bio string `json:"bio"`
|
||||
// Birthday 生日(YYYY-MM-DD)。
|
||||
Birthday string `json:"birthday"` // YYYY-MM-DD
|
||||
// Location 所在地(省/市)。
|
||||
Location *Location `json:"location"`
|
||||
// Balance 账户余额(元)。
|
||||
Balance float64 `json:"balance"`
|
||||
// Points 用户积分。
|
||||
Points int64 `json:"points"`
|
||||
// IsRealNameVerified 是否已实名认证。
|
||||
IsRealNameVerified bool `json:"is_real_name_verified"`
|
||||
}
|
||||
|
||||
type Location struct {
|
||||
// Province 省份名称。
|
||||
Province string `json:"province"`
|
||||
City string `json:"city"`
|
||||
// City 城市名称。
|
||||
City string `json:"city"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user