| 1234567891011121314151617181920 |
- """
- 每用户 Steam 账号绑定数量上限模型
- 每个用户一条记录,默认 3;管理员可为不同用户设置不同上限。
- """
- from app.utils.timezone import beijing_now_naive
- from sqlalchemy import Column, Integer, DateTime
- from app.database import Base
- class UserSteamAccountLimit(Base):
- """每用户 Steam 账号绑定数量上限表"""
- __tablename__ = "user_steam_account_limit"
- user_id = Column(Integer, primary_key=True, comment="用户ID")
- max_steam_accounts = Column(Integer, nullable=False, default=3, comment="该用户最多可绑定的 Steam 账号数")
- 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"<UserSteamAccountLimit(user_id={self.user_id}, max_steam_accounts={self.max_steam_accounts})>"
|