1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- from typing import List, Optional
- from pydantic import BaseModel
- class DataManagementBase(BaseModel):
- # 数据名称
- name: str
- class DataManagementCreate(DataManagementBase):
- dag_uuid: str
- node_id: str
- out_pin: str
- class Config:
- schema_extra = {
- "example": {
- "name": "test",
- "dag_uuid": "test",
- "node_id": "test",
- "out_pin": "0",
- }
- }
- class DataManagement(DataManagementBase):
- id: int
- # 表格名称
- table_name: str
- # 创建人名称
- user_name: str
- # 创建人编号
- user_id: str
- # 项目编号
- project_id: str
- # 创建时间
- create_time: int
- class Config:
- orm_mode = True
- class DataManagementSelect(BaseModel):
- table_name: str
- page: Optional[int] = 0
- size: Optional[int] = 100
- class Config:
- schema_extra = {
- "example": {
- "table_name": "train",
- "page": 0,
- "size": 100
- }
- }
|