47 lines
2.2 KiB
Python
47 lines
2.2 KiB
Python
"""入口模块管理 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 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):
|
|
"""创建入口模块请求。"""
|
|
|
|
name: str = Field(..., description="模块名称")
|
|
description: str | None = Field(None, description="模块描述")
|
|
path: str | None = Field(None, description="前端路由路径")
|
|
route_path: str | None = Field(None, description="前端跳转路径")
|
|
menu_profile: str | None = Field(None, description="菜单模板:document_review/contract/govdoc/custom")
|
|
features: list[str] | None = Field(None, description="启用功能编码列表")
|
|
areas: list[EntryModuleAreaDTO] | None = Field(None, description="历史地区配置(兼容字段,建议改用 tenants)")
|
|
tenants: list[EntryModuleTenantDTO] | 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="前端路由路径")
|
|
route_path: str | None = Field(None, description="前端跳转路径")
|
|
menu_profile: str | None = Field(None, description="菜单模板:document_review/contract/govdoc/custom")
|
|
features: list[str] | None = Field(None, description="启用功能编码列表")
|
|
areas: list[EntryModuleAreaDTO] | None = Field(None, description="历史地区配置(兼容字段,建议改用 tenants)")
|
|
tenants: list[EntryModuleTenantDTO] | None = Field(None, description="租户配置")
|