| 123456789101112131415161718192021 |
- from sqlalchemy import BigInteger, String
- from sqlalchemy.orm import Mapped, mapped_column
- from alien_database.base import Base, AuditMixin
- class ContractBundle(Base, AuditMixin):
- """合同包"""
- __tablename__ = "contract_bundle"
- id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True, comment="合同包唯一标识")
- subject_type: Mapped[str] = mapped_column(String(20), comment="签约主体类型(store/lawyer)")
- subject_id: Mapped[int] = mapped_column(BigInteger, comment="签约主体ID,关联门店/律师业务主键")
- subject_name: Mapped[str] = mapped_column(String(120), comment="签约主体名称")
- business_segment: Mapped[str] = mapped_column(String(100), comment="业务板块")
- contact_name: Mapped[str] = mapped_column(String(100), comment="联系人姓名")
- contact_phone: Mapped[str] = mapped_column(String(20), comment="联系人手机号")
- ord_id: Mapped[str] = mapped_column(String(40), comment="组织标识(统一社会信用代码)")
- bundle_type: Mapped[str] = mapped_column(String(50), comment="合同包类型(STORE_STANDARD/LAWYER_STANDARD)")
- status: Mapped[str] = mapped_column(String(20), default="未签署", comment="整体状态: 未签署/审核中/已签署")
- primary_document_id: Mapped[int | None] = mapped_column(BigInteger, nullable=True, comment="主合同文档ID")
|