You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
syntax = "v1"
|
|
|
|
// ========== 类型定义 ==========
|
|
type (
|
|
// 获取个人信息响应
|
|
GetProfileResponse {
|
|
Id int64 `json:"id"` // 用户ID
|
|
Username string `json:"username"` // 用户名
|
|
Email string `json:"email"` // 邮箱
|
|
Phone string `json:"phone"` // 手机号
|
|
Avatar string `json:"avatar"` // 头像URL
|
|
Bio string `json:"bio"` // 个人简介
|
|
Status int `json:"status"` // 状态 1-正常 2-禁用
|
|
CreatedAt string `json:"createdAt"` // 创建时间
|
|
UpdatedAt string `json:"updatedAt"` // 更新时间
|
|
}
|
|
// 更新个人资料请求
|
|
UpdateProfileRequest {
|
|
Username string `json:"username,optional" validate:"min=3,max=32"` // 用户名
|
|
Phone string `json:"phone,optional"` // 手机号
|
|
Avatar string `json:"avatar,optional"` // 头像URL
|
|
Bio string `json:"bio,optional"` // 个人简介
|
|
}
|
|
// 修改密码请求
|
|
ChangePasswordRequest {
|
|
OldPassword string `json:"oldPassword" validate:"required,min=6,max=32"` // 旧密码
|
|
NewPassword string `json:"newPassword" validate:"required,min=6,max=32"` // 新密码
|
|
}
|
|
)
|
|
|