feat: add rbac-backed settings modules
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""入口模块管理 DTO。"""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class EntryModuleAreaDTO(BaseModel):
|
||||
"""入口模块地区配置。"""
|
||||
|
||||
area: str = Field(..., description="地区名称")
|
||||
enabled: bool = Field(True, description="是否启用")
|
||||
sort_order: int = Field(0, description="排序号")
|
||||
|
||||
|
||||
class EntryModuleCreateDTO(BaseModel):
|
||||
"""创建入口模块请求。"""
|
||||
|
||||
name: str = Field(..., description="模块名称")
|
||||
description: str | None = Field(None, description="模块描述")
|
||||
path: str | None = Field(None, description="前端路由路径")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="地区配置")
|
||||
|
||||
|
||||
class EntryModuleUpdateDTO(BaseModel):
|
||||
"""更新入口模块请求。"""
|
||||
|
||||
name: str | None = Field(None, description="模块名称")
|
||||
description: str | None = Field(None, description="模块描述")
|
||||
path: str | None = Field(None, description="前端路由路径")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="地区配置")
|
||||
Reference in New Issue
Block a user