All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m22s
- 移动 17 个 DTO 文件到 internal/model/dto/ 目录 - 更新所有 DTO 文件的 package 声明从 model 改为 dto - 更新所有引用文件的 import 和类型引用 - Handler 层:admin 和 h5 所有处理器 - Service 层:所有业务服务 - Routes 层:所有路由定义 - Tests 层:单元测试和集成测试 - 清理未使用的 import 语句 - 验证:项目构建成功,测试编译通过,LSP 无错误
42 lines
1.6 KiB
Go
42 lines
1.6 KiB
Go
package dto
|
|
|
|
type LoginRequest struct {
|
|
Username string `json:"username" validate:"required"`
|
|
Password string `json:"password" validate:"required"`
|
|
Device string `json:"device" validate:"omitempty,oneof=web h5 mobile"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
AccessToken string `json:"access_token"`
|
|
RefreshToken string `json:"refresh_token"`
|
|
ExpiresIn int64 `json:"expires_in"`
|
|
User UserInfo `json:"user"`
|
|
Permissions []string `json:"permissions"`
|
|
}
|
|
|
|
type UserInfo struct {
|
|
ID uint `json:"id" description:"用户ID"`
|
|
Username string `json:"username" description:"用户名"`
|
|
Phone string `json:"phone" description:"手机号"`
|
|
UserType int `json:"user_type" description:"用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)"`
|
|
UserTypeName string `json:"user_type_name" description:"用户类型名称"`
|
|
ShopID uint `json:"shop_id,omitempty" description:"店铺ID"`
|
|
ShopName string `json:"shop_name,omitempty" description:"店铺名称"`
|
|
EnterpriseID uint `json:"enterprise_id,omitempty" description:"企业ID"`
|
|
EnterpriseName string `json:"enterprise_name,omitempty" description:"企业名称"`
|
|
}
|
|
|
|
type RefreshTokenRequest struct {
|
|
RefreshToken string `json:"refresh_token" validate:"required"`
|
|
}
|
|
|
|
type RefreshTokenResponse struct {
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn int64 `json:"expires_in"`
|
|
}
|
|
|
|
type ChangePasswordRequest struct {
|
|
OldPassword string `json:"old_password" validate:"required"`
|
|
NewPassword string `json:"new_password" validate:"required,min=8,max=32"`
|
|
}
|