agent_test_task.py 1.1 KB

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