|
|
@@ -3,20 +3,19 @@ from typing import Optional
|
|
|
from sqlalchemy import String, DateTime, BigInteger
|
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
|
|
+from alien_snowflake.generator import next_id
|
|
|
from alien_database.base import Base, AuditMixin
|
|
|
class ContractStore(Base, AuditMixin):
|
|
|
"""
|
|
|
店铺合同模型
|
|
|
"""
|
|
|
- __tablename__ = "contract_store"
|
|
|
-
|
|
|
- store_id: Mapped[int] = mapped_column(BigInteger, primary_key=True, comment="店铺id")
|
|
|
+ __tablename__ = "store_contract"
|
|
|
+ id: Mapped[int] = mapped_column(BigInteger, primary_key=True, default=next_id(), comment="主键")
|
|
|
+ store_id: Mapped[int] = mapped_column(BigInteger, comment="店铺id")
|
|
|
business_segment: Mapped[str] = mapped_column(String(100), comment="经营板块")
|
|
|
merchant_name: Mapped[str] = mapped_column(String(100), comment="商家姓名")
|
|
|
contact_phone: Mapped[str] = mapped_column(String(20), comment="联系电话")
|
|
|
signing_status: Mapped[str] = mapped_column(String(20), default="未签署", comment="签署状态(已签署,未签署,已到期)")
|
|
|
signing_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="签署时间")
|
|
|
effective_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="生效时间")
|
|
|
- expiry_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="到期时间")
|
|
|
-
|
|
|
-
|
|
|
+ expiry_time: Mapped[Optional[datetime]] = mapped_column(DateTime, nullable=True, comment="到期时间")
|