contract_store.py 1.1 KB

12345678910111213141516171819202122
  1. from datetime import datetime
  2. from typing import Optional
  3. from sqlalchemy import String, DateTime, BigInteger
  4. from sqlalchemy.orm import Mapped, mapped_column
  5. from alien_database.base import Base, AuditMixin
  6. class ContractStore(Base, AuditMixin):
  7. """
  8. 店铺合同模型
  9. """
  10. __tablename__ = "contract_store"
  11. store_id: Mapped[int] = mapped_column(BigInteger, primary_key=True, comment="店铺id")
  12. business_segment: Mapped[str] = mapped_column(String(100), comment="经营板块")
  13. merchant_name: Mapped[str] = mapped_column(String(100), comment="商家姓名")
  14. contact_phone: Mapped[str] = mapped_column(String(20), comment="联系电话")
  15. signing_status: Mapped[str] = mapped_column(String(20), default="未签署", comment="签署状态(已签署,未签署,已到期)")
  16. signing_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="签署时间")
  17. effective_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="生效时间")
  18. expiry_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="到期时间")