from operator import index from sqlalchemy import Boolean, Column, ForeignKey, Integer, String from app.models.database import BaseModel class JmHomeworkDatasourceRelation(BaseModel): __tablename__ = "jm_homework_datasource_relation" id = Column(Integer, primary_key=True, index=True) # 类型 type = Column(String, nullable=False) # 数据源id datasource_id = Column(Integer, nullable=False) # 节点uuid node_uuid = Column(String, nullable=False) # 表名 table = Column(String, nullable=False) # 作业id homework_id = Column(Integer, nullable=False)