feat: pre-launch fixes - renewal date, task suppression, active policies, contacts, N/A enforcement, completion prompts, task groups, client notes, parent/subsidiary linking
This commit is contained in:
parent
0ac872a4da
commit
9dd30de358
14 changed files with 791 additions and 29 deletions
|
|
@ -122,6 +122,7 @@ model Client {
|
|||
designationId String? @map("designation_id")
|
||||
designation2Id String? @map("designation2_id")
|
||||
claimsAdvocateId String? @map("claims_advocate_id")
|
||||
parentClientId String? @map("parent_client_id")
|
||||
notes String? @db.Text
|
||||
customFields Json @default("{}") @map("custom_fields")
|
||||
lastSyncedAt DateTime? @map("last_synced_at")
|
||||
|
|
@ -131,18 +132,39 @@ model Client {
|
|||
designation Designation? @relation("ClientDesignation1", fields: [designationId], references: [id])
|
||||
designation2 Designation? @relation("ClientDesignation2", fields: [designation2Id], references: [id])
|
||||
claimsAdvocate User? @relation("ClientAdvocate", fields: [claimsAdvocateId], references: [id])
|
||||
parentClient Client? @relation("ClientParent", fields: [parentClientId], references: [id])
|
||||
subsidiaries Client[] @relation("ClientParent")
|
||||
policies Policy[]
|
||||
tasks Task[]
|
||||
policyGroups PolicyGroup[]
|
||||
members ClientMember[]
|
||||
contacts ClientContact[]
|
||||
|
||||
@@index([name])
|
||||
@@index([designationId])
|
||||
@@index([designation2Id])
|
||||
@@index([claimsAdvocateId])
|
||||
@@index([parentClientId])
|
||||
@@map("clients")
|
||||
}
|
||||
|
||||
model ClientContact {
|
||||
id String @id @default(cuid())
|
||||
clientId String @map("client_id")
|
||||
label String
|
||||
name String
|
||||
phone String?
|
||||
email String?
|
||||
notes String? @db.Text
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
client Client @relation(fields: [clientId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([clientId])
|
||||
@@map("client_contacts")
|
||||
}
|
||||
|
||||
model ClientMember {
|
||||
id String @id @default(cuid())
|
||||
clientId String @map("client_id")
|
||||
|
|
@ -258,6 +280,7 @@ model TaskTemplate {
|
|||
timing TaskTiming
|
||||
daysOffset Int @map("days_offset")
|
||||
defaultPriority TaskPriority @map("default_priority")
|
||||
taskGroup String? @map("task_group")
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
displayOrder Int? @map("display_order")
|
||||
designationId String? @map("designation_id")
|
||||
|
|
@ -294,6 +317,9 @@ model Task {
|
|||
isAdHoc Boolean @default(false) @map("is_ad_hoc")
|
||||
naReason String? @map("na_reason") @db.Text
|
||||
cancelledReason String? @map("cancelled_reason") @db.Text
|
||||
taskGroup String? @map("task_group")
|
||||
imageRightFiled Boolean? @map("image_right_filed")
|
||||
reminderDate DateTime? @map("reminder_date")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue