Add phase 1 client consultant referral and linkage

This commit is contained in:
A R R R Associates
2026-07-22 23:45:05 +05:30
parent 02a549bd05
commit 8f51d16c7d
10 changed files with 290 additions and 5 deletions
+5
View File
@@ -21,6 +21,11 @@ class Client(CommonBase):
branch_id: Mapped[int] = mapped_column(ForeignKey("branches.id"), nullable=False, index=True)
partner_id: Mapped[int | None] = mapped_column(ForeignKey("users.id"), nullable=True, index=True)
default_review_partner_user_id: Mapped[int | None] = mapped_column(ForeignKey("users.id"), nullable=True, index=True)
referred_by_consultant_id: Mapped[int | None] = mapped_column(ForeignKey("consultant_profiles.id", ondelete="SET NULL"), nullable=True, index=True)
referral_date: Mapped[date | None] = mapped_column(Date, nullable=True)
referral_reference: Mapped[str | None] = mapped_column(String(200), nullable=True)
referral_status: Mapped[str] = mapped_column(String(30), nullable=False, default="active", index=True)
communication_routing_mode: Mapped[str] = mapped_column(String(30), nullable=False, default="client_and_consultant", index=True)
engagement_mode: Mapped[str] = mapped_column(String(30), nullable=False, default="internal_managed", index=True)
client_code: Mapped[str] = mapped_column(String(50), nullable=False, index=True)
client_name: Mapped[str] = mapped_column(String(200), nullable=False, index=True)