""" Steam账号模型(精简版) 仅记录用户与Steam账号的绑定关系,密码/mafile/session 等存于客户端本地。 """ from app.utils.timezone import beijing_now_naive from sqlalchemy import Column, Integer, String, DateTime, Boolean from app.database import Base class SteamAccount(Base): """Steam账号绑定表""" __tablename__ = "steam_accounts" id = Column(Integer, primary_key=True, autoincrement=True, comment="主键ID") user_id = Column(Integer, nullable=False, comment="用户ID") steam_username = Column(String(100), nullable=False, comment="Steam用户名") steam_id = Column(String(64), nullable=True, comment="Steam ID(来自登录验证)") is_active = Column(Boolean, default=True, comment="是否启用") is_deleted = Column(Boolean, default=False, comment="是否删除: 0-否, 1-是") created_at = Column(DateTime, default=beijing_now_naive, comment="创建时间") updated_at = Column(DateTime, default=beijing_now_naive, onupdate=beijing_now_naive, comment="更新时间") def __repr__(self): return f""