agent_test_task.py 1.2 KB

1234567891011121314151617181920
  1. from sqlalchemy import Column, Integer, Text, BigInteger, String, SmallInteger, Boolean, TIMESTAMP
  2. from sqlalchemy.ext.declarative import declarative_base
  3. Base = declarative_base()
  4. class AgentTestTask(Base):
  5. __tablename__ = "agent_test_task"
  6. id = Column(BigInteger, primary_key=True, autoincrement=True, comment="主键id")
  7. agent_id = Column(BigInteger, nullable=False, comment="agent主键")
  8. module_id = Column(BigInteger, nullable=False, comment="model主键")
  9. create_user = Column(String(32), nullable=True, comment="创建用户")
  10. update_user = Column(String(32), nullable=True, comment="更新用户")
  11. dataset_ids = Column(Text, nullable=True, comment="数据集ids")
  12. evaluate_type = Column(Integer, nullable=False, default=0, comment="数据集ids")
  13. status = Column(Integer, nullable=True, comment="状态(0:未开始, 1:进行中, 2:已完成, 3:已取消)")
  14. create_time = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP", comment="创建时间")
  15. update_time = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP", onupdate="CURRENT_TIMESTAMP",
  16. comment="更新时间")