Files
quyun-v2/backend/app/http/v1/dto/auth.go
2026-01-08 15:13:15 +08:00

55 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package dto
import "quyun/v2/pkg/consts"
type SendOTPForm struct {
// Phone 手机号(用于发送验证码)。
Phone string `json:"phone"`
}
type LoginForm struct {
// Phone 手机号(登录账号)。
Phone string `json:"phone"`
// OTP 短信验证码。
OTP string `json:"otp"`
}
type LoginResponse struct {
// Token 登录成功后的 JWT。
Token string `json:"token"`
// User 当前登录用户信息。
User *User `json:"user"`
}
type User struct {
// ID 用户ID。
ID int64 `json:"id"`
// Phone 绑定手机号。
Phone string `json:"phone"`
// Nickname 昵称。
Nickname string `json:"nickname"`
// Avatar 头像URL。
Avatar string `json:"avatar"`
// Gender 性别(枚举)。
Gender consts.Gender `json:"gender"`
// Bio 个人简介。
Bio string `json:"bio"`
// Birthday 生日YYYY-MM-DD
Birthday string `json:"birthday"`
// 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 城市名称。
City string `json:"city"`
}