recharge_record_his.py 1.2 KB

1234567891011121314151617181920212223
  1. """
  2. 充值记录历史记录模型
  3. """
  4. from sqlalchemy import Column, Integer, String, DateTime, Numeric, SmallInteger
  5. from app.database import Base
  6. class RechargeRecordHis(Base):
  7. """充值记录表历史记录"""
  8. __tablename__ = "recharge_records_his"
  9. his_id = Column(Integer, primary_key=True, autoincrement=True, comment="历史记录主键ID")
  10. id = Column(Integer, nullable=False, comment="原表主键ID")
  11. user_id = Column(Integer, nullable=False, comment="用户ID")
  12. card_id = Column(Integer, comment="使用的卡密ID")
  13. software_code = Column(String(50), nullable=False, comment="软件特征码")
  14. days = Column(Integer, nullable=False, comment="充值天数")
  15. amount = Column(Numeric(10, 2), comment="充值金额")
  16. expire_time_before = Column(DateTime, comment="充值前到期时间")
  17. expire_time_after = Column(DateTime, comment="充值后到期时间")
  18. is_deleted = Column(SmallInteger, default=0, comment="是否删除:0-否,1-是")
  19. created_at = Column(DateTime, comment="充值时间")
  20. his_created_at = Column(DateTime, comment="历史记录创建时间")
  21. his_operation = Column(String(10), nullable=False, comment="操作类型:INSERT/UPDATE/DELETE")