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

50 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 LoginForm struct {
// Username 登录用户名。
Username string `json:"username"`
// Password 登录密码(加密传输)。
Password string `json:"password"`
}
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 性别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 城市名称。
City string `json:"city"`
}