jm_job_info.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class JmJobInfo(BaseModel):
  4. __tablename__ = "jm_job_info"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 任务名称
  7. name = Column(String, nullable=False)
  8. # 任务类型
  9. type = Column(String, nullable=False)
  10. # 任务分类
  11. tag = Column(String, nullable=False)
  12. # 周期类型
  13. cron_type = Column(Integer, nullable=False)
  14. # 选择周期类型(0:时,1:日,2:周,3:月,4:cron)
  15. cron_select_type = Column(Integer)
  16. # 周期表达式
  17. cron_expression = Column(String)
  18. # api
  19. api = Column(String)
  20. # 图形信息
  21. json_str = Column(String)
  22. # 状态
  23. status = Column(Integer, nullable=False)
  24. # 是否被删除
  25. delete_status = Column(Integer, nullable=False)
  26. # 用户id
  27. user_id = Column(String, nullable=False)
  28. # 用户名称
  29. user_name = Column(String, nullable=False)
  30. # 项目id
  31. project_id = Column(String, nullable=False)
  32. # 创建时间
  33. create_time = Column(Integer)
  34. # 更新时间
  35. update_time = Column(Integer)