jm_homework.py 961 B

1234567891011121314151617181920212223242526272829303132333435
  1. from operator import index
  2. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  3. from app.models.database import BaseModel
  4. class JmHomework(BaseModel):
  5. __tablename__ = 'jm_homework'
  6. id = Column(Integer, primary_key=True, index=True)
  7. # 作业名称
  8. name = Column(String)
  9. # 作业类型
  10. type = Column(String)
  11. # 作业分类
  12. tag = Column(String)
  13. # 执行镜像
  14. image_url = Column(String)
  15. # DAG_ID
  16. dag_uuid = Column(String)
  17. # DAG文件地址
  18. dag_url = Column(String)
  19. # 脚本文件
  20. script_file = Column(String)
  21. # 执行命令
  22. execute_command = Column(String)
  23. # 更新时间
  24. update_time = Column(Integer)
  25. # 创建时间
  26. create_time = Column(Integer)
  27. # 用户ID
  28. user_id = Column(String, nullable=False)
  29. # 项目ID
  30. project_id = Column(String, nullable=False)
  31. # 状态(0:已删除,1:未删除)
  32. status = Column(Integer, nullable=False)