Keep previous import source and code when a person is re-imported from another source

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-05 20:54:23 +03:30
co-authored by Cursor
parent c8753a4c4e
commit 46dcf296d3
8 changed files with 103 additions and 11 deletions
+4
View File
@@ -441,6 +441,9 @@ model Person {
importSource String @default("manual")
/// شناسه در مبدأ (کد دیدار، کد مشتری ته‌حساب، …)
sourceRef String?
/// منبع و کد قبلی وقتی شخص از منبع دیگری دوباره وارد شده (مثلاً دیدار قبل از ته‌حساب)
previousImportSource String?
previousSourceRef String?
email String?
phone String?
mobile String?
@@ -488,6 +491,7 @@ model Person {
@@index([organizationId, lastName, firstName])
@@index([organizationId, importSource])
@@index([organizationId, sourceRef])
@@index([organizationId, previousSourceRef])
@@index([organizationId, loyaltyPoints])
@@index([companyId])
@@index([ownerId])