feat(db): add father/newborn customer ids on protocol parties

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-07 16:03:11 +08:00
1 parent 69e76b85ab
commit fc14c51348
3 files changed
+14 -1

No files matched your search

+2
View File
@@ -1451,6 +1451,8 @@ class BizProtocolPartyCustomer(Base):
id = Column(String(64), primary_key=True, comment="主键ID") id = Column(String(64), primary_key=True, comment="主键ID")
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID") collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
customer_id = Column(String(64), nullable=True, comment="客户ID") customer_id = Column(String(64), nullable=True, comment="客户ID")
father_customer_id = Column(String(64), nullable=True, comment="父亲客户ID")
newborn_customer_id = Column(String(64), nullable=True, comment="子女客户ID")
mother_name = Column(String(100), nullable=True, comment="母亲姓名") mother_name = Column(String(100), nullable=True, comment="母亲姓名")
mother_phone = Column(String(32), nullable=True, comment="母亲电话") mother_phone = Column(String(32), nullable=True, comment="母亲电话")
mother_id_card = Column(String(32), nullable=True, comment="母亲身份证号") mother_id_card = Column(String(32), nullable=True, comment="母亲身份证号")
+3 -1
View File
@@ -71,7 +71,9 @@ class BizResearchDonationParty(Base):
id = Column(String(64), primary_key=True, comment="主键ID") id = Column(String(64), primary_key=True, comment="主键ID")
research_donation_id = Column(String(64), nullable=False, comment="科研捐赠ID") research_donation_id = Column(String(64), nullable=False, comment="科研捐赠ID")
customer_id = Column(String(64), nullable=True, comment="客户ID") customer_id = Column(String(64), nullable=True, comment="母亲客户ID")
father_customer_id = Column(String(64), nullable=True, comment="父亲客户ID")
newborn_customer_id = Column(String(64), nullable=True, comment="子女客户ID")
mother_name = Column(String(100), nullable=True, comment="母亲姓名") mother_name = Column(String(100), nullable=True, comment="母亲姓名")
mother_phone = Column(String(32), nullable=True, comment="母亲电话") mother_phone = Column(String(32), nullable=True, comment="母亲电话")
mother_id_card = Column(String(32), nullable=True, comment="母亲身份证号") mother_id_card = Column(String(32), nullable=True, comment="母亲身份证号")
@@ -0,0 +1,9 @@
-- 采集协议当事人:父亲/子女客户 ID(母亲沿用 customer_id)
ALTER TABLE biz_protocol_party_customer
ADD COLUMN father_customer_id VARCHAR(64) DEFAULT NULL COMMENT '父亲客户ID' AFTER customer_id,
ADD COLUMN newborn_customer_id VARCHAR(64) DEFAULT NULL COMMENT '子女客户ID' AFTER father_customer_id;
-- 科研捐赠当事人:同上
ALTER TABLE biz_research_donation_party
ADD COLUMN father_customer_id VARCHAR(64) DEFAULT NULL COMMENT '父亲客户ID' AFTER customer_id,
ADD COLUMN newborn_customer_id VARCHAR(64) DEFAULT NULL COMMENT '子女客户ID' AFTER father_customer_id;