@adaptware/eagles-db 0.6.3 → 0.6.6

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-db1234d0157131c2946806471e92bfc81687b8c6cdebc98ad1f3994ad413a64b",
2
+ "name": "prisma-client-a95f32abf6c5a366a1c9e576f60929cad1ae5477837fd6844ab4fc4ab8247fa5",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1330,39 +1330,27 @@ model ConsentDocument {
1330
1330
  }
1331
1331
 
1332
1332
  model ConsentDocumentVersion {
1333
- id String @id @default(uuid())
1333
+ id String @id @default(uuid())
1334
1334
  document_id String
1335
- document ConsentDocument @relation(fields: [document_id], references: [id], onDelete: Cascade)
1335
+ document ConsentDocument @relation(fields: [document_id], references: [id], onDelete: Cascade)
1336
1336
  version_number Int
1337
1337
  content_hash String
1338
- locale String @default("en")
1339
- /// Legacy inline body; new versions use S3 template fields
1340
- content String? @db.Text
1338
+ locale String @default("en")
1341
1339
  template_version_label String?
1342
1340
  s3_bucket String?
1343
- /// Legacy single key; prefer s3_archive_key + s3_active_key
1344
- s3_key String?
1345
- s3_region String?
1346
1341
  /// Immutable snapshot path (audit binding)
1347
1342
  s3_archive_key String?
1348
1343
  /// Read-optimized current copy under active/
1349
1344
  s3_active_key String?
1350
- /// Decision 6 — immutable archive row in shared Document catalog
1345
+ /// Optional immutable archive row in shared Document catalog (org ingest)
1351
1346
  s3_document_id String?
1352
- s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
1353
- status ConsentCatalogVersionStatus @default(PUBLISHED)
1347
+ s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
1348
+ status ConsentCatalogVersionStatus @default(PUBLISHED)
1354
1349
  published_at DateTime?
1355
- published_by_id String?
1356
- published_by User? @relation("ConsentVersionPublishedBy", fields: [published_by_id], references: [id], onDelete: SetNull)
1357
- approval_notes String? @db.Text
1358
- supersedes_version_id String?
1359
- supersedes_version ConsentDocumentVersion? @relation("ConsentVersionSupersedes", fields: [supersedes_version_id], references: [id], onDelete: SetNull)
1360
- superseded_by ConsentDocumentVersion[] @relation("ConsentVersionSupersedes")
1361
- created_at DateTime @default(now())
1350
+ created_at DateTime @default(now())
1362
1351
  checkboxes ConsentCheckboxDefinition[]
1363
1352
  consent_records ConsentRecord[]
1364
1353
  system_consent_epochs SystemConsentEpoch[]
1365
- version_approvals ConsentDocumentVersionApproval[]
1366
1354
 
1367
1355
  @@unique([document_id, version_number])
1368
1356
  @@index([document_id, published_at(sort: Desc)])
@@ -1370,20 +1358,6 @@ model ConsentDocumentVersion {
1370
1358
  @@schema("public")
1371
1359
  }
1372
1360
 
1373
- model ConsentDocumentVersionApproval {
1374
- id String @id @default(uuid())
1375
- document_version_id String
1376
- document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Cascade)
1377
- action String
1378
- actor_user_id String?
1379
- actor_user User? @relation("ConsentVersionApprovalActor", fields: [actor_user_id], references: [id], onDelete: SetNull)
1380
- notes String? @db.Text
1381
- created_at DateTime @default(now())
1382
-
1383
- @@index([document_version_id, created_at(sort: Desc)])
1384
- @@schema("public")
1385
- }
1386
-
1387
1361
  model ConsentCheckboxDefinition {
1388
1362
  id String @id @default(uuid())
1389
1363
  document_version_id String
@@ -1414,9 +1388,6 @@ model ConsentRecord {
1414
1388
  ip_address String?
1415
1389
  user_agent String?
1416
1390
  decline_reason String?
1417
- /// Copy of version s3_archive_key (or legacy s3_key) at grant time
1418
- storage_snapshot_key String?
1419
- content_hash_at_grant String?
1420
1391
  created_at DateTime @default(now())
1421
1392
 
1422
1393
  @@index([user_id, consent_type, created_at(sort: Desc)])
@@ -1424,7 +1395,8 @@ model ConsentRecord {
1424
1395
  @@schema("public")
1425
1396
  }
1426
1397
 
1427
- /// Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
1398
+ // Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
1399
+ // epoch_at is the effective instant for platform re-consent (can differ from created_at when policy changes are backdated).
1428
1400
  model SystemConsentEpoch {
1429
1401
  id String @id @default(uuid())
1430
1402
  consent_type ConsentType
@@ -4866,13 +4838,11 @@ model User {
4866
4838
  employee_number Int?
4867
4839
  employee_code String? @unique
4868
4840
 
4869
- department_members DepartmentMember[] @relation("DepartmentMemberships")
4870
- assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
4871
- consent_records ConsentRecord[]
4872
- consent_versions_published ConsentDocumentVersion[] @relation("ConsentVersionPublishedBy")
4873
- consent_version_approval_actions ConsentDocumentVersionApproval[] @relation("ConsentVersionApprovalActor")
4874
- erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
4875
- erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
4841
+ department_members DepartmentMember[] @relation("DepartmentMemberships")
4842
+ assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
4843
+ consent_records ConsentRecord[]
4844
+ erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
4845
+ erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
4876
4846
 
4877
4847
  @@index([role_id])
4878
4848
  @@index([permission_id])