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