feat: add tenant-scoped rule and permission management
This commit is contained in:
@@ -4,13 +4,22 @@ from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class EntryModuleAreaDTO(BaseModel):
|
||||
"""入口模块地区配置。"""
|
||||
"""入口模块历史地区配置,仅用于兼容旧请求。"""
|
||||
|
||||
area: str = Field(..., description="地区名称")
|
||||
enabled: bool = Field(True, description="是否启用")
|
||||
sort_order: int = Field(0, description="排序号")
|
||||
|
||||
|
||||
class EntryModuleTenantDTO(BaseModel):
|
||||
"""入口模块租户配置。"""
|
||||
|
||||
tenant_code: str = Field(..., description="租户编码")
|
||||
tenant_name: str | None = Field(None, description="租户名称")
|
||||
enabled: bool = Field(True, description="是否启用")
|
||||
sort_order: int = Field(0, description="排序号")
|
||||
|
||||
|
||||
class EntryModuleCreateDTO(BaseModel):
|
||||
"""创建入口模块请求。"""
|
||||
|
||||
@@ -18,7 +27,8 @@ class EntryModuleCreateDTO(BaseModel):
|
||||
description: str | None = Field(None, description="模块描述")
|
||||
path: str | None = Field(None, description="前端路由路径")
|
||||
route_path: str | None = Field(None, description="前端跳转路径")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="地区配置")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="历史地区配置(兼容字段,建议改用 tenants)")
|
||||
tenants: list[EntryModuleTenantDTO] | None = Field(None, description="租户配置")
|
||||
|
||||
|
||||
class EntryModuleUpdateDTO(BaseModel):
|
||||
@@ -28,4 +38,5 @@ class EntryModuleUpdateDTO(BaseModel):
|
||||
description: str | None = Field(None, description="模块描述")
|
||||
path: str | None = Field(None, description="前端路由路径")
|
||||
route_path: str | None = Field(None, description="前端跳转路径")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="地区配置")
|
||||
areas: list[EntryModuleAreaDTO] | None = Field(None, description="历史地区配置(兼容字段,建议改用 tenants)")
|
||||
tenants: list[EntryModuleTenantDTO] | None = Field(None, description="租户配置")
|
||||
|
||||
Reference in New Issue
Block a user