12345678910111213141516171819202122232425262728293031323334 |
- from typing import List, Optional
- from pydantic import BaseModel
- class JmHomeworkDatasourceRelationBase(BaseModel):
- # 类型
- type: str
- # 数据源id
- datasource_id: int
- # 节点uuid
- node_uuid: str
- # 表名
- table: str
- class JmHomeworkDatasourceRelationCreate(JmHomeworkDatasourceRelationBase):
- class Config:
- schema_extra = {
- "example": {
- "type": "input",
- "datasource_id": 1,
- "node_uuid": "77a6e831-bb62-42e1-be8d-97699db00e73",
- "table": "jm_homework_datasource_relation",
- }
- }
- class JmHomeworkDatasourceRelation(JmHomeworkDatasourceRelationBase):
- id: int
- # 作业id
- homework_id: int
- class Config:
- orm_mode = True
|