steam_account_his.py 1.4 KB

12345678910111213141516171819202122232425
  1. """
  2. Steam账号历史记录模型
  3. """
  4. from sqlalchemy import Column, Integer, String, DateTime, SmallInteger, Text
  5. from app.database import Base
  6. class SteamAccountHis(Base):
  7. """Steam账号绑定表历史记录"""
  8. __tablename__ = "steam_accounts_his"
  9. his_id = Column(Integer, primary_key=True, autoincrement=True, comment="历史记录主键ID")
  10. id = Column(Integer, nullable=False, comment="原表主键ID")
  11. user_his_id = Column(Integer, primary_key=True, autoincrement=True, comment="历史记录主键ID")
  12. id = Column(Integer, nullable=False, comment="用户ID")
  13. steam_username = Column(String(100), nullable=False, comment="Steam用户名")
  14. steam_id = Column(String(50), comment="Steam ID")
  15. shared_secret = Column(Text, comment="Steam Guard共享密钥(加密存储)")
  16. identity_secret = Column(Text, comment="Steam Guard身份密钥(加密存储)")
  17. is_active = Column(SmallInteger, default=1, comment="是否启用")
  18. last_used_time = Column(DateTime, comment="最后使用时间")
  19. is_deleted = Column(SmallInteger, default=0, comment="是否删除:0-否,1-是")
  20. created_at = Column(DateTime, comment="绑定时间")
  21. updated_at = Column(DateTime, comment="更新时间")
  22. his_created_at = Column(DateTime, comment="历史记录创建时间")
  23. his_operation = Column(String(10), nullable=False, comment="操作类型:INSERT/UPDATE/DELETE")