You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

79 lines
2.7 KiB

from pydantic import BaseModel
from typing import Union, Optional, List
from datetime import datetime
from module_admin.annotation.pydantic_annotation import as_query
from pydantic import BaseModel, ConfigDict, Field
from pydantic.alias_generators import to_camel
class CrudMetaSecurityModel(BaseModel):
is_success: bool
message: str
class MetaSecurityRowModel(BaseModel):
"""
数据源行控制表对应Pydantic模型
"""
model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)
rowId: Optional[str] = None
create_by: Optional[str] = None
create_time: Optional[datetime] = None
update_by: Optional[str] = None
update_time: Optional[datetime] = None
dbRName: Optional[str] = None
dbRID: Optional[int] = None
dbSName: Optional[str] = None
dbTName: Optional[str] = None
dbCName: Optional[str] = None
ctrl_type: Optional[str] = None # control type (e.g., '0', '1', '2')
obj_type: Optional[str] = None # object type (e.g., '0', '1')
obj_value: Optional[object] = None
isStop: Optional[bool] = None
ctrl_value: Optional[str] = None
ctrl_table: Optional[str] = None
ctrl_col: Optional[str] = None
ctrl_system: Optional[str] = None
class MetaSecurityColModel(BaseModel):
"""
数据源控制表对应Pydantic模型
"""
model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)
colId: Optional[str] = None
create_by: Optional[str] = None
create_time: Optional[datetime] = None
update_by: Optional[str] = None
update_time: Optional[datetime] = None
dbRName: Optional[str] = None
dbRID: Optional[int] = None
dbSName: Optional[str] = None
dbTName: Optional[str] = None
dbCName: Optional[str] = None
ctrl_type: Optional[str] = None # control type (e.g., '0', '1')
obj_type: Optional[str] = None # object type (e.g., '0', '1')
obj_value: Optional[object] = None
isStop: Optional[bool] = None
@as_query
class MetaSecurityRowPageQueryModel(MetaSecurityRowModel):
"""
元数据任务分页查询模型
"""
page_num: int = Field(default=1, description='当前页码')
page_size: int = Field(default=10, description='每页记录数')
@as_query
class MetaSecurityColPageQueryModel(MetaSecurityColModel):
"""
元数据任务分页查询模型
"""
page_num: int = Field(default=1, description='当前页码')
page_size: int = Field(default=10, description='每页记录数')
class DeleteMetaSecurityModel(BaseModel):
"""
删除参数配置模型
"""
model_config = ConfigDict(alias_generator=to_camel)
metaSecurity_ids: str = Field(description='需要删除的参数主键')