- service/dto/controller 各拆 18 文件,一表一文件;跨表编排留在 outfit_generation_task_service - controller 共享 struct(outfit/member)保 /outfit/*、/member/* 前缀,路由零漂移(28 路径 diff 为空) - 修复 4 个缺失 g.Meta handler:/user/profile、/avatar/get、/body-measurement/get、/hairstyle/list 从 ALL 收敛为 GET - 工具包并入 agent/ 单包(weather/imagegen/avatar/scoring),NewCache 泛化 NewTTLCache - 虎皮椒支付适配器内联 service/payment_order_service.go,member 服务拆 4 表文件 - 冒烟 21 路径全绿 + 客户端 dart analyze 零 error
48 lines
1.2 KiB
Go
48 lines
1.2 KiB
Go
package dto
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type LoginReq struct {
|
|
g.Meta `path:"/login" method:"post" tags:"用户" summary:"登录"`
|
|
Account string `v:"required" json:"account"`
|
|
Password string `v:"required" json:"password"`
|
|
}
|
|
|
|
type LoginRes struct {
|
|
Token string `json:"token"`
|
|
User *LoginUser `json:"user"`
|
|
}
|
|
|
|
type LoginUser struct {
|
|
Id int64 `json:"id"`
|
|
Role string `json:"role"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type ChangePasswordReq struct {
|
|
g.Meta `path:"/change-password" method:"post" tags:"用户" summary:"修改密码"`
|
|
OldPassword string `v:"required" json:"old_password"`
|
|
NewPassword string `v:"required|min-length:6" json:"new_password"`
|
|
}
|
|
|
|
type RegisterReq struct {
|
|
g.Meta `path:"/register" method:"post" tags:"用户" summary:"注册"`
|
|
Account string `v:"required" json:"account"`
|
|
Password string `v:"required|min-length:6" json:"password"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type ProfileReq struct {
|
|
g.Meta `path:"/profile" method:"get" tags:"用户" summary:"我的资料"`
|
|
}
|
|
|
|
type ProfileRes struct {
|
|
Id int64 `json:"id"`
|
|
Role string `json:"role"`
|
|
Name string `json:"name"`
|
|
Username string `json:"username"`
|
|
Phone string `json:"phone"`
|
|
}
|