feat(shop-role): 实现店铺角色继承功能和权限检查优化
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m39s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m39s
- 新增店铺角色管理 API 和数据模型 - 实现角色继承和权限检查逻辑 - 添加流程测试框架和集成测试 - 更新权限服务和账号管理逻辑 - 添加数据库迁移脚本 - 归档 OpenSpec 变更文档 Ultraworked with Sisyphus
This commit is contained in:
33
internal/model/dto/shop_role_dto.go
Normal file
33
internal/model/dto/shop_role_dto.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package dto
|
||||
|
||||
// AssignShopRolesRequest 分配店铺角色请求
|
||||
type AssignShopRolesRequest struct {
|
||||
ShopID uint `json:"-" params:"shop_id" path:"shop_id" validate:"required" description:"店铺ID"`
|
||||
RoleIDs []uint `json:"role_ids" validate:"required" description:"角色ID列表"`
|
||||
}
|
||||
|
||||
// GetShopRolesRequest 查询店铺角色请求
|
||||
type GetShopRolesRequest struct {
|
||||
ShopID uint `json:"-" params:"shop_id" path:"shop_id" validate:"required" description:"店铺ID"`
|
||||
}
|
||||
|
||||
// DeleteShopRoleRequest 删除店铺角色请求
|
||||
type DeleteShopRoleRequest struct {
|
||||
ShopID uint `json:"-" params:"shop_id" path:"shop_id" validate:"required" description:"店铺ID"`
|
||||
RoleID uint `json:"-" params:"role_id" path:"role_id" validate:"required" description:"角色ID"`
|
||||
}
|
||||
|
||||
// ShopRoleResponse 店铺-角色关联响应
|
||||
type ShopRoleResponse struct {
|
||||
ShopID uint `json:"shop_id" description:"店铺ID"`
|
||||
RoleID uint `json:"role_id" description:"角色ID"`
|
||||
RoleName string `json:"role_name" description:"角色名称"`
|
||||
RoleDesc string `json:"role_desc" description:"角色描述"`
|
||||
Status int `json:"status" description:"状态 (0:禁用, 1:启用)"`
|
||||
}
|
||||
|
||||
// ShopRolesResponse 店铺的角色列表响应
|
||||
type ShopRolesResponse struct {
|
||||
ShopID uint `json:"shop_id" description:"店铺ID"`
|
||||
Roles []*ShopRoleResponse `json:"roles" description:"角色列表"`
|
||||
}
|
||||
Reference in New Issue
Block a user