Files
junhong_cmp_fiber/internal/model/dto/auth_dto.go
邹进 260fec7114
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
fix: 第1批 M1、M4~M6 登录密码统一规则与三类导出补列
- 七个设置登录密码入口统一 8~12 位、四类字符至少三类(1001/1016),修改密码与建店铺返回字段级提示
- 订单导出末列“操作人”、IoT 卡导出末列“套餐到期时间”、设备导出流量标 MB 并新增“设备合计(GB)”
- 历史导出任务按冻结表头识别新旧尾列,行宽不变
- OpenSpec Change fix-august-iteration-export-and-password-hints:10/12,5.3 前端同步与 5.4 测试部署导出验证待完成
2026-10-11 23:41:40 +09:00

54 lines
2.4 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
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"`
}
// MenuNode 菜单节点(树形结构)
type MenuNode struct {
ID uint `json:"id" description:"权限ID"`
PermCode string `json:"perm_code" description:"权限码"`
Name string `json:"name" description:"菜单名称"`
URL string `json:"url" description:"路由路径"`
Sort int `json:"sort" description:"排序值"`
Children []MenuNode `json:"children" description:"子菜单"`
}
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" description:"所有权限码(向后兼容)"`
Menus []MenuNode `json:"menus" description:"菜单树"`
Buttons []string `json:"buttons" description:"按钮权限码"`
}
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" required:"true" description:"旧密码"`
NewPassword string `json:"new_password" validate:"required,min=8,max=12" required:"true" minLength:"8" maxLength:"12" description:"新密码(8~12 位,大写字母、小写字母、数字、特殊符号至少三类)"`
}