Prepojenie na externu DB, projekt-zakazky

This commit is contained in:
2026-02-03 11:20:17 +01:00
parent e4f63a135e
commit cbdd952bc1
37 changed files with 2641 additions and 149 deletions

View File

@@ -64,6 +64,7 @@ model User {
rmaStatusChanges RMAStatusHistory[]
rmaComments RMAComment[]
taskComments Comment[]
taskAttachments TaskAttachment[] @relation("TaskAttachmentUploader")
createdCustomers Customer[]
@@ -377,6 +378,7 @@ model Task {
reminders Reminder[]
comments Comment[]
tags TaskTag[]
attachments TaskAttachment[]
@@index([projectId])
@@index([parentId])
@@ -410,6 +412,24 @@ model TaskTag {
@@id([taskId, tagId])
}
model TaskAttachment {
id String @id @default(cuid())
taskId String
task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)
filename String
filepath String
mimetype String
size Int
uploadedById String
uploadedBy User @relation("TaskAttachmentUploader", fields: [uploadedById], references: [id])
uploadedAt DateTime @default(now())
@@index([taskId])
}
model Reminder {
id String @id @default(cuid())
taskId String