agent_test_task.py 1.1 KB

12345678910111213141516171819
  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=False, comment="数据集ids")
  12. status = Column(Integer, default=0, nullable=False, comment="状态(0:未开始, 1:进行中, 2:已完成, 3:已取消)")
  13. create_time = Column(TIMESTAMP, nullable=True, server_default="CURRENT_TIMESTAMP", comment="创建时间")
  14. update_time = Column(TIMESTAMP, nullable=True, server_default="CURRENT_TIMESTAMP", onupdate="CURRENT_TIMESTAMP",
  15. comment="更新时间")