@adaptware/eagles-db 0.5.37 → 0.5.40

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-0fae5beb1aff3688f99d1ad980cc6f865eb79b0a0597d272d2787f77760a1ad8",
2
+ "name": "prisma-client-76d691dc6489ac84bc64dd7eb041b3d54190fc1007e25202634aa354a1400090",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -414,49 +414,53 @@ enum ApplicationOfferSubstatus {
414
414
 
415
415
  model Application {
416
416
  /// Primary key
417
- id String @id @default(uuid())
417
+ id String @id @default(uuid())
418
418
  /// Foreign keys
419
- organisation_id String
420
- candidate_id String
421
- resume_id String
422
- job_description_id String
423
- evaluation_plan_id String?
424
- recruiter_id String?
425
- source_id String?
419
+ organisation_id String
420
+ candidate_id String
421
+ resume_id String
422
+ job_description_id String
423
+ evaluation_plan_id String?
424
+ recruiter_id String?
425
+ source_id String?
426
426
  /// Data fields
427
- fit_check_score Float?
428
- applied_at DateTime @default(now())
429
- round_no Int @default(0)
430
- is_jaf_completed Boolean @default(false)
431
- proceed_to_next_round Boolean? @default(false)
432
- evaluationComment String?
427
+ fit_check_score Float?
428
+ applied_at DateTime @default(now())
429
+ round_no Int @default(0)
430
+ is_jaf_completed Boolean @default(false)
431
+ proceed_to_next_round Boolean? @default(false)
432
+ evaluationComment String?
433
433
  /// Candidate flag (orthogonal to ApplicationStatus). Latest actor/comment only.
434
- is_flagged Boolean @default(false)
435
- flag_comment String?
436
- flagged_at DateTime?
437
- flagged_by String?
438
- unflag_comment String?
439
- unflagged_at DateTime?
440
- unflagged_by String?
441
- fit_check_status FitCheckStatus?
442
- status ApplicationStatus @default(PENDING)
434
+ is_flagged Boolean @default(false)
435
+ flag_comment String?
436
+ flagged_at DateTime?
437
+ flagged_by String?
438
+ unflag_comment String?
439
+ unflagged_at DateTime?
440
+ unflagged_by String?
441
+ fit_check_status FitCheckStatus?
442
+ status ApplicationStatus @default(PENDING)
443
443
  /// Fine-grained offer-stage state. Meaningful only when status = OFFER (or was OFFER for a terminal-substatus that flipped to REJECTED / JOINED).
444
- offer_substatus ApplicationOfferSubstatus?
444
+ offer_substatus ApplicationOfferSubstatus?
445
445
  /// Audit fields
446
- created_at DateTime @default(now())
447
- updated_at DateTime @updatedAt
448
- created_by String
449
- updated_by String
450
- is_active Boolean @default(true)
446
+ created_at DateTime @default(now())
447
+ updated_at DateTime @updatedAt
448
+ created_by String
449
+ updated_by String
450
+ is_active Boolean @default(true)
451
+ fit_check_report_document_id String? @unique
452
+ fit_check_report_updated_flag Boolean @default(false)
453
+ fit_check_report_data Json? @default("{}")
454
+
451
455
  /// Relations
452
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
453
- candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
454
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
455
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
456
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
456
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
457
+ candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
458
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
459
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
460
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
457
461
  fit_check FitCheck?
458
- recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
459
- source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
462
+ recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
463
+ source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
460
464
  interviews Interview[]
461
465
  assignments Assignment[]
462
466
  ongoing_evaluations OngoingEvaluation[]
@@ -466,6 +470,7 @@ model Application {
466
470
  communication_messages CommunicationMessage[]
467
471
  job_application_responses JobApplicationResponse[]
468
472
  offer Offer?
473
+ fit_check_report_document Document? @relation("ApplicationFitCheckReportDocument", fields: [fit_check_report_document_id], references: [id], onDelete: SetNull)
469
474
 
470
475
  @@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
471
476
  @@index([candidate_id])
@@ -1401,6 +1406,7 @@ model Document {
1401
1406
  offer_letters OfferLetter[] @relation("OfferLetterPdf")
1402
1407
  offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
1403
1408
  offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
1409
+ application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
1404
1410
 
1405
1411
  // Indexes
1406
1412
  @@index([candidate_id])
@@ -2364,30 +2370,34 @@ enum JobApplicationFieldType {
2364
2370
 
2365
2371
  model JobApplicationField {
2366
2372
  /// Primary key (UUID)
2367
- id String @id @default(uuid())
2373
+ id String @id @default(uuid())
2368
2374
  /// Foreign keys
2369
- organisation_id String
2370
- template_id String
2375
+ organisation_id String
2376
+ template_id String
2371
2377
  /// Data fields
2372
- field_type JobApplicationFieldType
2373
- label String
2374
- description String?
2375
- is_mandatory Boolean @default(false)
2376
- is_draft Boolean @default(true)
2377
- options String[]
2378
+ field_type JobApplicationFieldType
2379
+ label String
2380
+ description String?
2381
+ is_mandatory Boolean @default(false)
2382
+ is_draft Boolean @default(true)
2383
+ options String[]
2378
2384
  /// Audit fields
2379
- is_active Boolean @default(true)
2380
- created_by String
2381
- updated_by String
2382
- created_at DateTime @default(now())
2383
- updated_at DateTime @updatedAt
2385
+ is_active Boolean @default(true)
2386
+ created_by String
2387
+ updated_by String
2388
+ created_at DateTime @default(now())
2389
+ updated_at DateTime @updatedAt
2390
+
2391
+ /// order of question
2392
+ order_no Int? //nullable for now to allow migration
2393
+
2384
2394
  /// Relations
2385
2395
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2386
2396
  job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2387
2397
  job_application_responses JobApplicationResponse[]
2388
2398
 
2389
2399
  /// Indexes
2390
- @@index([organisation_id, template_id])
2400
+ @@index([organisation_id, template_id, order_no])
2391
2401
  @@schema("public")
2392
2402
  }
2393
2403
 
@@ -2415,13 +2425,15 @@ model JobApplicationResponse {
2415
2425
  created_by String
2416
2426
  updated_by String
2417
2427
  is_active Boolean @default(true)
2428
+ order_no Int? //nullable for now to allow migration
2429
+
2418
2430
  /// Relations
2419
- application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2420
- field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
2421
- document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2431
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2432
+ field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
2433
+ document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2422
2434
 
2423
- /// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
2424
- @@index([application_id])
2435
+ // / Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
2436
+ @@index([application_id, is_active, order_no])
2425
2437
  @@index([job_application_field_id])
2426
2438
  @@schema("public")
2427
2439
  }