1. 需求确认
2. 结构的一些变更
This commit is contained in:
24
internal/model/common.go
Normal file
24
internal/model/common.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
// IDReq 通用 ID 路径参数请求
|
||||
type IDReq struct {
|
||||
ID uint `path:"id" description:"ID" required:"true"`
|
||||
}
|
||||
|
||||
// UpdateAccountParams 更新账号聚合参数 (用于文档生成)
|
||||
type UpdateAccountParams struct {
|
||||
IDReq
|
||||
UpdateAccountRequest
|
||||
}
|
||||
|
||||
// AssignRolesParams 分配角色聚合参数 (用于文档生成)
|
||||
type AssignRolesParams struct {
|
||||
IDReq
|
||||
AssignRolesRequest
|
||||
}
|
||||
|
||||
// RemoveRoleParams 移除角色聚合参数
|
||||
type RemoveRoleParams struct {
|
||||
AccountID uint `path:"account_id" description:"账号ID" required:"true"`
|
||||
RoleID uint `path:"role_id" description:"角色ID" required:"true"`
|
||||
}
|
||||
Reference in New Issue
Block a user