@trycompai/db 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schema.prisma +84 -9
- package/package.json +1 -1
package/dist/schema.prisma
CHANGED
|
@@ -186,6 +186,75 @@ enum PolicyStatus {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
// ===== automation-run.prisma =====
|
|
190
|
+
model EvidenceAutomationRun {
|
|
191
|
+
id String @id @default(dbgenerated("generate_prefixed_cuid('ear'::text)")) @map("id")
|
|
192
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
193
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
194
|
+
|
|
195
|
+
// Relations
|
|
196
|
+
evidenceAutomationId String @map("evidence_automation_id")
|
|
197
|
+
evidenceAutomation EvidenceAutomation @relation(fields: [evidenceAutomationId], references: [id], onDelete: Cascade)
|
|
198
|
+
|
|
199
|
+
// Run details
|
|
200
|
+
status EvidenceAutomationRunStatus @default(pending)
|
|
201
|
+
startedAt DateTime? @map("started_at")
|
|
202
|
+
completedAt DateTime? @map("completed_at")
|
|
203
|
+
|
|
204
|
+
// Results
|
|
205
|
+
success Boolean? @map("success")
|
|
206
|
+
error String? @map("error")
|
|
207
|
+
logs Json? @map("logs")
|
|
208
|
+
output Json? @map("output")
|
|
209
|
+
|
|
210
|
+
// Metadata
|
|
211
|
+
triggeredBy EvidenceAutomationTrigger @default(scheduled) @map("triggered_by")
|
|
212
|
+
runDuration Int? @map("run_duration") // in milliseconds
|
|
213
|
+
Task Task? @relation(fields: [taskId], references: [id])
|
|
214
|
+
taskId String?
|
|
215
|
+
|
|
216
|
+
@@index([evidenceAutomationId])
|
|
217
|
+
@@index([status])
|
|
218
|
+
@@index([createdAt])
|
|
219
|
+
@@map("evidence_automation_runs")
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
enum EvidenceAutomationRunStatus {
|
|
223
|
+
pending
|
|
224
|
+
running
|
|
225
|
+
completed
|
|
226
|
+
failed
|
|
227
|
+
cancelled
|
|
228
|
+
|
|
229
|
+
@@map("evidence_automation_run_status")
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
enum EvidenceAutomationTrigger {
|
|
233
|
+
manual
|
|
234
|
+
scheduled
|
|
235
|
+
api
|
|
236
|
+
|
|
237
|
+
@@map("evidence_automation_trigger")
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
// ===== automation.prisma =====
|
|
242
|
+
model EvidenceAutomation {
|
|
243
|
+
id String @id @default(dbgenerated("generate_prefixed_cuid('aut'::text)"))
|
|
244
|
+
name String
|
|
245
|
+
description String?
|
|
246
|
+
createdAt DateTime @default(now())
|
|
247
|
+
|
|
248
|
+
taskId String
|
|
249
|
+
task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
|
250
|
+
|
|
251
|
+
// Relations
|
|
252
|
+
runs EvidenceAutomationRun[]
|
|
253
|
+
|
|
254
|
+
@@index([taskId])
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
189
258
|
// ===== comment.prisma =====
|
|
190
259
|
model Comment {
|
|
191
260
|
id String @id @default(dbgenerated("generate_prefixed_cuid('cmt'::text)"))
|
|
@@ -573,6 +642,7 @@ enum RiskTreatmentType {
|
|
|
573
642
|
|
|
574
643
|
enum RiskCategory {
|
|
575
644
|
customer
|
|
645
|
+
fraud
|
|
576
646
|
governance
|
|
577
647
|
operations
|
|
578
648
|
other
|
|
@@ -736,15 +806,18 @@ model Task {
|
|
|
736
806
|
reviewDate DateTime?
|
|
737
807
|
|
|
738
808
|
// Relationships
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
809
|
+
assigneeId String?
|
|
810
|
+
assignee Member? @relation(fields: [assigneeId], references: [id])
|
|
811
|
+
organizationId String
|
|
812
|
+
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
|
813
|
+
taskTemplateId String?
|
|
814
|
+
taskTemplate FrameworkEditorTaskTemplate? @relation(fields: [taskTemplateId], references: [id])
|
|
815
|
+
controls Control[]
|
|
816
|
+
vendors Vendor[]
|
|
817
|
+
risks Risk[]
|
|
818
|
+
evidenceAutomations EvidenceAutomation[]
|
|
819
|
+
|
|
820
|
+
EvidenceAutomationRun EvidenceAutomationRun[]
|
|
748
821
|
}
|
|
749
822
|
|
|
750
823
|
enum TaskStatus {
|
|
@@ -782,6 +855,7 @@ model Trust {
|
|
|
782
855
|
soc2type2 Boolean @default(false)
|
|
783
856
|
iso27001 Boolean @default(false)
|
|
784
857
|
iso42001 Boolean @default(false)
|
|
858
|
+
nen7510 Boolean @default(false)
|
|
785
859
|
gdpr Boolean @default(false)
|
|
786
860
|
hipaa Boolean @default(false)
|
|
787
861
|
pci_dss Boolean @default(false)
|
|
@@ -791,6 +865,7 @@ model Trust {
|
|
|
791
865
|
soc2type2_status FrameworkStatus @default(started)
|
|
792
866
|
iso27001_status FrameworkStatus @default(started)
|
|
793
867
|
iso42001_status FrameworkStatus @default(started)
|
|
868
|
+
nen7510_status FrameworkStatus @default(started)
|
|
794
869
|
gdpr_status FrameworkStatus @default(started)
|
|
795
870
|
hipaa_status FrameworkStatus @default(started)
|
|
796
871
|
pci_dss_status FrameworkStatus @default(started)
|