Datenmodell: Asset-Typen SOFTWARE und PROJECT mit Fachprofilen

Neue AssetType-Werte SOFTWARE und PROJECT plus 1:1-Profile:
- SoftwareProfile (Anbieter-Verknüpfung, Version/Patch-Stand, Freigabestatus
  BEANTRAGT/FREIGEGEBEN/GESPERRT, Freigeber, Kritikalität, Review)
- ProjectProfile (IS-Klassifizierung, ISB-Einbindung, Projektstatus)
Migration inkl. RLS-Policies; TENANT_MODELS und Dependency-Graph (Node-Typ +
Icons Package/FolderKanban) um beide Typen erweitert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-24 10:12:56 +02:00
co-authored by Claude Opus 4.8
parent 2ec0230f57
commit 0806030bd9
5 changed files with 167 additions and 0 deletions
+68
View File
@@ -211,6 +211,8 @@ enum AssetType {
LOCATION
SUPPLIER
IT_SERVICE
SOFTWARE
PROJECT
PERSON
DATA
}
@@ -260,6 +262,9 @@ model Asset {
supplierProfile SupplierProfile?
serviceProfile ITServiceProfile? @relation("serviceAsset")
serviceProvided ITServiceProfile[] @relation("serviceProvider")
softwareProfile SoftwareProfile? @relation("softwareAsset")
softwareProvided SoftwareProfile[] @relation("softwareProvider")
projectProfile ProjectProfile?
assessments SupplierAssessment[]
evidence SupplierEvidence[]
decisions ManagementDecision[]
@@ -581,6 +586,69 @@ model ITServiceProfile {
@@map("it_service_profiles")
}
// Software-Whitelist als Asset (analog IT-Service, R11/VA-16): eine freigegebene
// Software ist ein Asset(type SOFTWARE) mit optionalem Anbieter (Asset type SUPPLIER).
model SoftwareProfile {
id String @id @default(cuid())
tenantId String @map("tenant_id")
assetId String @unique @map("asset_id")
refNo Int @map("ref_no")
providerAssetId String? @map("provider_asset_id") // Asset(type SUPPLIER)
version String? // Version/Patch-Stand
approvalStatus SoftwareApprovalStatus @default(BEANTRAGT) @map("approval_status")
approvedBy String? @map("approved_by")
criticality Int @default(1)
nextReview DateTime? @map("next_review")
notes String?
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
createdBy String? @map("created_by")
asset Asset @relation("softwareAsset", fields: [assetId], references: [id], onDelete: Cascade)
provider Asset? @relation("softwareProvider", fields: [providerAssetId], references: [id])
@@unique([tenantId, refNo])
@@index([tenantId])
@@map("software_profiles")
}
enum SoftwareApprovalStatus {
BEANTRAGT // Freigabe beantragt
FREIGEGEBEN // freigegeben (Whitelist)
GESPERRT // gesperrt/untersagt
}
// Informationssicherheit in Projekten (R01/VA-19): ein Projekt ist ein Asset(type PROJECT)
// mit Kritikalität (C/I/A am Asset) und Risiko-Verknüpfung (RiskAsset).
model ProjectProfile {
id String @id @default(cuid())
tenantId String @map("tenant_id")
assetId String @unique @map("asset_id")
refNo Int @map("ref_no")
classification String? // IS-Klassifizierung
isbInvolved Boolean @default(false) @map("isb_involved")
status ProjectStatus @default(GEPLANT)
notes String?
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
createdBy String? @map("created_by")
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
@@unique([tenantId, refNo])
@@index([tenantId])
@@map("project_profiles")
}
enum ProjectStatus {
GEPLANT
LAUFEND
ABGESCHLOSSEN
ABGEBROCHEN
}
// Bewertung & Nachweise (6.1.1)
model SupplierAssessment {
id String @id @default(cuid())