This commit is contained in:
2025-12-09 18:55:28 +08:00
parent 8d00d67540
commit c23ab8338b
209 changed files with 5445 additions and 3963 deletions

View File

@@ -50,25 +50,25 @@ type (
}
// 列表项
RoleListItem {
Id int64 `json:"id"` // 角色ID
RoleName string `json:"role_name"` // 角色名称
RoleListItem {
Id string `json:"id"` // 角色ID
RoleName string `json:"role_name"` // 角色名称
RoleCode string `json:"role_code"` // 角色编码
Description string `json:"description"` // 角色描述
Status int64 `json:"status"` // 状态0-禁用1-启用
Sort int64 `json:"sort"` // 排序
CreateTime string `json:"create_time"` // 创建时间
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
}
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
}
// 详情请求
GetRoleDetailReq {
Id int64 `path:"id"` // 角色ID
}
GetRoleDetailReq {
Id string `path:"id"` // 角色ID
}
// 详情响应
GetRoleDetailResp {
Id int64 `json:"id"` // 角色ID
GetRoleDetailResp {
Id string `json:"id"` // 角色ID
RoleName string `json:"role_name"` // 角色名称
RoleCode string `json:"role_code"` // 角色编码
Description string `json:"description"` // 角色描述
@@ -76,34 +76,34 @@ type (
Sort int64 `json:"sort"` // 排序
CreateTime string `json:"create_time"` // 创建时间
UpdateTime string `json:"update_time"` // 更新时间
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
}
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
}
// 创建请求
CreateRoleReq {
CreateRoleReq {
RoleName string `json:"role_name"` // 角色名称
RoleCode string `json:"role_code"` // 角色编码
Description string `json:"description"` // 角色描述
Status int64 `json:"status,default=1"` // 状态0-禁用1-启用
Sort int64 `json:"sort,default=0"` // 排序
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
}
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
}
// 创建响应
CreateRoleResp {
Id int64 `json:"id"` // 角色ID
}
CreateRoleResp {
Id string `json:"id"` // 角色ID
}
// 更新请求
UpdateRoleReq {
Id int64 `path:"id"` // 角色ID
UpdateRoleReq {
Id string `path:"id"` // 角色ID
RoleName *string `json:"role_name,optional"` // 角色名称
RoleCode *string `json:"role_code,optional"` // 角色编码
Description *string `json:"description,optional"` // 角色描述
Status *int64 `json:"status,optional"` // 状态0-禁用1-启用
Sort *int64 `json:"sort,optional"` // 排序
MenuIds []int64 `json:"menu_ids,optional"` // 关联的菜单ID列表
}
MenuIds []string `json:"menu_ids,optional"` // 关联的菜单ID列表
}
// 更新响应
UpdateRoleResp {
@@ -111,12 +111,12 @@ type (
}
// 删除请求
DeleteRoleReq {
Id int64 `path:"id"` // 角色ID
}
DeleteRoleReq {
Id string `path:"id"` // 角色ID
}
// 删除响应
DeleteRoleResp {
Success bool `json:"success"` // 是否成功
}
)
)