jm_homework_datasource_relation.py 606 B

1234567891011121314151617181920
  1. from operator import index
  2. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  3. from app.models.database import BaseModel
  4. class JmHomeworkDatasourceRelation(BaseModel):
  5. __tablename__ = "jm_homework_datasource_relation"
  6. id = Column(Integer, primary_key=True, index=True)
  7. # 类型
  8. type = Column(String, nullable=False)
  9. # 数据源id
  10. datasource_id = Column(Integer, nullable=False)
  11. # 节点uuid
  12. node_uuid = Column(String, nullable=False)
  13. # 表名
  14. table = Column(String, nullable=False)
  15. # 作业id
  16. homework_id = Column(Integer, nullable=False)