""" API Nonce历史记录模型 """ from datetime import datetime from app.utils.timezone import beijing_now_naive from sqlalchemy import Column, Integer, String, DateTime from app.database import Base from app.models.history_base import HistoryRecord class APINonceHis(HistoryRecord): """API Nonce历史记录表""" __tablename__ = "api_nonces_his" id = Column(Integer, primary_key=True, comment="原表主键ID") nonce = Column(String(128), nullable=False, comment="随机字符串") endpoint = Column(String(128), nullable=False, comment="接口路径") session_id = Column(String(64), nullable=True, comment="会话ID") created_at = Column(DateTime, default=beijing_now_naive, comment="创建时间") expires_at = Column(DateTime, nullable=False, comment="过期时间") def __repr__(self): return f""