improvement: attachment selection for lab dispatch added. attachment preview added to cases feature.

This commit is contained in:
2026-07-07 18:43:10 +03:30
parent b2d40b3e97
commit 86b1e3afff
25 changed files with 767 additions and 84 deletions

View File

@@ -179,6 +179,7 @@ model TreatmentDetailAttachment {
storagePath String
detail TreatmentDetail? @relation(fields: [detailId], references: [id], onDelete: Cascade)
labCaseLinks LabCaseAttachment[]
createdAt DateTime @default(now())
@@ -201,11 +202,24 @@ model LabCase {
tasks LabCaseTask[]
toothProsthesis LabCaseToothProsthesis[]
comments LabCaseComment[]
attachments LabCaseAttachment[]
@@index([treatmentId, sortOrder])
@@map("lab_cases")
}
model LabCaseAttachment {
labCaseId String
attachmentId String
labCase LabCase @relation(fields: [labCaseId], references: [id], onDelete: Cascade)
attachment TreatmentDetailAttachment @relation(fields: [attachmentId], references: [id], onDelete: Cascade)
@@id([labCaseId, attachmentId])
@@index([attachmentId])
@@map("lab_case_attachments")
}
model LabCaseDetail {
labCaseId String
treatmentDetailId String @unique