feat: add associated entities to anomalies

This commit is contained in:
Marcel Arndt
2025-06-26 09:04:53 +02:00
parent b31df96a44
commit d9b615fd47
38 changed files with 1094 additions and 133 deletions
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Anomaly" ADD COLUMN "associatedEntities" JSONB DEFAULT '{}';
@@ -508,7 +508,7 @@ model Employee {
}
model DyflexisEmployee {
id Int @id
id Int @id
firstname String
surname String
contractStart DateTime
@@ -580,18 +580,19 @@ model Trace {
}
model Anomaly {
id String @id
type String
description String
groupKey String
groupDescription String
workedOnBy String
sleepTimer Int
sleepSince DateTime?
solution SolutionTarget[] @relation()
resolvedAt DateTime?
manuallyResolved Boolean @default(false)
createdAt DateTime @default(now())
id String @id
type String
description String
groupKey String
groupDescription String
associatedEntities Json? @default("{}")
workedOnBy String
sleepTimer Int
sleepSince DateTime?
solution SolutionTarget[] @relation()
resolvedAt DateTime?
manuallyResolved Boolean @default(false)
createdAt DateTime @default(now())
}
model SolutionTarget {