lawyer_contract.py 1.4 KB

12345678910111213141516171819202122232425
  1. from datetime import datetime
  2. from typing import Optional
  3. from sqlalchemy import String, DateTime, BigInteger
  4. from sqlalchemy.dialects.mysql import LONGTEXT
  5. from sqlalchemy.orm import Mapped, mapped_column
  6. from alien_database.base import Base, AuditMixin
  7. class LawyerContract(Base, AuditMixin):
  8. __tablename__ = "lawyer_contract"
  9. id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True, comment="主键")
  10. lawyer_id: Mapped[int] = mapped_column(BigInteger, comment="律所id")
  11. law_firm_name: Mapped[str] = mapped_column(String(100), comment="律所名称")
  12. business_segment: Mapped[str] = mapped_column(String(100), comment="业务板块")
  13. contact_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. contract_url: Mapped[str] = mapped_column(LONGTEXT, comment="合同URL")
  17. ord_id: Mapped[str] = mapped_column(LONGTEXT, comment="统一社会信用代码")
  18. signing_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="签署时间")
  19. effective_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="生效时间")
  20. expiry_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="到期时间")