Align companies with the Didar export: new fields, Didar-format Excel import/export, and people linked to companies by Didar code
This commit is contained in:
@@ -398,12 +398,28 @@ model Company {
|
||||
organizationId String
|
||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
name String
|
||||
/// کد داخلی شرکت (مثل «کد شرکت» در دیدار)
|
||||
code String?
|
||||
/// منبع ورود: manual | didar | tahesab | excel | other
|
||||
importSource String @default("manual")
|
||||
/// شناسه در مبدأ (مثلاً کد دیدار شرکت)
|
||||
sourceRef String?
|
||||
nationalId String?
|
||||
economicCode String?
|
||||
registrationNumber String?
|
||||
phone String?
|
||||
otherPhones String?
|
||||
fax String?
|
||||
email String?
|
||||
otherEmails String?
|
||||
website String?
|
||||
province String?
|
||||
city String?
|
||||
postalCode String?
|
||||
address String?
|
||||
groupName String?
|
||||
notes String?
|
||||
registeredAt DateTime?
|
||||
tags String[] @default([])
|
||||
customFields Json @default("{}")
|
||||
people Person[]
|
||||
@@ -423,6 +439,8 @@ model Company {
|
||||
@@index([organizationId, name])
|
||||
@@index([organizationId, email])
|
||||
@@index([organizationId, phone])
|
||||
@@index([organizationId, sourceRef])
|
||||
@@index([organizationId, code])
|
||||
@@index([ownerId])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user