| 12345678910111213141516171819202122 |
- """
- Steam账号历史记录模型(与 steam_accounts 表一致 + his 字段)
- """
- from app.utils.timezone import beijing_now_naive
- from sqlalchemy import Column, Integer, String, DateTime, Boolean
- from app.database import Base
- class SteamAccountHis(Base):
- """Steam账号绑定表历史记录"""
- __tablename__ = "steam_accounts_his"
- id = Column(Integer, primary_key=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="是否删除")
- created_at = Column(DateTime, default=beijing_now_naive, comment="创建时间")
- updated_at = Column(DateTime, default=beijing_now_naive, comment="更新时间")
- his_created_at = Column(DateTime, default=beijing_now_naive, comment="历史记录创建时间")
- his_operation = Column(String(10), nullable=False, comment="操作类型:INSERT/UPDATE/DELETE")
|