""" 密钥轮换配置模型 """ from sqlalchemy import Column, Integer, DateTime, SmallInteger from app.database import Base class KeyRotationConfig(Base): """密钥轮换配置表""" __tablename__ = "key_rotation_config" id = Column(Integer, primary_key=True, index=True, comment="主键ID") rotation_days = Column(Integer, default=10, comment="密钥轮换周期(天)") is_auto_rotate = Column(SmallInteger, default=1, comment="是否自动轮换") last_rotation_time = Column(DateTime, comment="最后轮换时间") next_rotation_time = Column(DateTime, comment="下次轮换时间") is_deleted = Column(SmallInteger, default=0, index=True, comment="是否删除:0-否,1-是") updated_at = Column(DateTime, comment="更新时间")