client_app_version.py 1.7 KB

123456789101112131415161718192021222324252627282930
  1. """
  2. 客户端版本发布模型
  3. """
  4. from sqlalchemy import Column, Integer, String, Text, DateTime, SmallInteger
  5. from app.database import Base
  6. class ClientAppVersion(Base):
  7. """客户端版本发布表"""
  8. __tablename__ = "client_app_versions"
  9. id = Column(Integer, primary_key=True, index=True, comment="主键ID")
  10. platform = Column(String(20), nullable=False, default="windows", index=True, comment="平台")
  11. channel = Column(String(20), nullable=False, default="stable", index=True, comment="发布通道")
  12. version = Column(String(50), nullable=False, index=True, comment="版本号")
  13. build_number = Column(Integer, nullable=True, comment="构建号")
  14. release_title = Column(String(120), nullable=True, comment="发布标题")
  15. release_notes_html = Column(Text, nullable=True, comment="富文本更新日志")
  16. download_url = Column(String(500), nullable=True, comment="下载地址")
  17. download_hash = Column(String(128), nullable=True, comment="下载包hash")
  18. is_force_update = Column(SmallInteger, default=0, comment="是否强制更新")
  19. min_supported_version = Column(String(50), nullable=True, comment="最低支持版本")
  20. status = Column(String(20), nullable=False, default="draft", index=True, comment="状态")
  21. published_at = Column(DateTime, nullable=True, comment="发布时间")
  22. created_by = Column(String(64), nullable=True, comment="创建人")
  23. updated_by = Column(String(64), nullable=True, comment="更新人")
  24. is_deleted = Column(SmallInteger, default=0, index=True, comment="是否删除")
  25. created_at = Column(DateTime, comment="创建时间")
  26. updated_at = Column(DateTime, comment="更新时间")