software_his.py 1.1 KB

12345678910111213141516171819202122
  1. """
  2. 软件历史记录模型
  3. """
  4. from sqlalchemy import Column, Integer, String, DateTime, Numeric, SmallInteger, Text
  5. from app.database import Base
  6. class SoftwareHis(Base):
  7. """软件表历史记录"""
  8. __tablename__ = "software_his"
  9. his_id = Column(Integer, primary_key=True, autoincrement=True, comment="历史记录主键ID")
  10. id = Column(Integer, nullable=False, comment="原表主键ID")
  11. code = Column(String(50), nullable=False, comment="软件特征码")
  12. name = Column(String(100), nullable=False, comment="软件名称")
  13. description = Column(Text, comment="软件描述")
  14. daily_price = Column(Numeric(10, 2), nullable=False, default=0.00, comment="每天收费基数")
  15. is_active = Column(SmallInteger, default=1, comment="是否启用")
  16. is_deleted = Column(SmallInteger, default=0, comment="是否删除:0-否,1-是")
  17. created_at = Column(DateTime, comment="创建时间")
  18. updated_at = Column(DateTime, comment="更新时间")
  19. his_created_at = Column(DateTime, comment="历史记录创建时间")
  20. his_operation = Column(String(10), nullable=False, comment="操作类型:INSERT/UPDATE/DELETE")