programme.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class Programme(BaseModel):
  4. __tablename__ = "programme"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 可视化编程名称
  7. name = Column(String, nullable=False)
  8. # 密码(暗文)
  9. password = Column(String, nullable=False)
  10. # 挂载目录
  11. workspace = Column(String, nullable=False)
  12. # api_url
  13. base_url = Column(String, nullable=False)
  14. # 使用镜像
  15. image = Column(String, nullable=False)
  16. # 路径
  17. path = Column(String, nullable=False)
  18. # xx名称
  19. release_name = Column(String, nullable=False)
  20. # 状态
  21. status = Column(Integer, nullable=False)
  22. # 创建时间
  23. create_time = Column(Integer, nullable=False)
  24. # 用户id
  25. user_id = Column(String, nullable=False)
  26. # 用户名称
  27. user_name = Column(String, nullable=False)
  28. # 项目id
  29. project_id = Column(String, nullable=False)
  30. # cpu资源
  31. cpu = Column(Integer, nullable=False)
  32. # 内存资源
  33. memory = Column(Integer, nullable=False)
  34. # 调度节点
  35. node_selector = Column(String, nullable=False)