added contract history
This commit is contained in:
+14
@@ -566,11 +566,25 @@ model Contract {
|
||||
|
||||
tasks ContractTask[]
|
||||
assignedEmails CachedEmail[] // Zugeordnete E-Mails aus dem E-Mail-Client
|
||||
historyEntries ContractHistoryEntry[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// ==================== CONTRACT HISTORY ====================
|
||||
|
||||
model ContractHistoryEntry {
|
||||
id Int @id @default(autoincrement())
|
||||
contractId Int
|
||||
contract Contract @relation(fields: [contractId], references: [id], onDelete: Cascade)
|
||||
title String // Kurzbeschreibung (z.B. "Folgevertrag erstellt", "kWh auf 18000 erhöht")
|
||||
description String? @db.Text // Längere Beschreibung (optional)
|
||||
isAutomatic Boolean @default(false) // true = automatisch erstellt, false = manuell
|
||||
createdBy String // E-Mail des Erstellers
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
// ==================== CONTRACT TASKS ====================
|
||||
|
||||
enum ContractTaskStatus {
|
||||
|
||||
Reference in New Issue
Block a user