@adaptware/eagles-db 0.5.14 → 0.5.15

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-393b9015a389480de4b4326009d31364fe528d899490600060e94339e71fd3f9",
2
+ "name": "prisma-client-114a2161c4deac38799bfa89e0f4a4c173c88b0306c595eb71d6e430088a352d",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -386,39 +386,48 @@ enum ApplicationStatus {
386
386
  }
387
387
 
388
388
  model Application {
389
+ /// Primary key
389
390
  id String @id @default(uuid())
391
+ /// Foreign keys
392
+ organisation_id String
390
393
  candidate_id String
391
394
  resume_id String
392
- organisation_id String
393
395
  job_description_id String
394
- fit_check_score Float?
395
- applied_at DateTime @default(now())
396
396
  evaluation_plan_id String?
397
- fit_check_id String? @unique
398
397
  recruiter_id String?
399
398
  source_id String?
399
+ /// Data fields
400
+ fit_check_score Float?
401
+ applied_at DateTime @default(now())
400
402
  round_no Int @default(0)
401
403
  is_jaf_completed Boolean @default(false)
402
404
  proceed_to_next_round Boolean? @default(false)
403
- //Screening fields
404
- on_notice_period Boolean @default(false)
405
- expected_joining_date DateTime?
406
- current_ctc String?
407
- expected_ctc String?
408
- notice_period Int?
409
- preferred_location String?
410
405
  evaluationComment String?
411
- // Relations
406
+ /// Candidate flag (orthogonal to ApplicationStatus). Latest actor/comment only.
407
+ is_flagged Boolean @default(false)
408
+ flag_comment String?
409
+ flagged_at DateTime?
410
+ flagged_by String?
411
+ unflag_comment String?
412
+ unflagged_at DateTime?
413
+ unflagged_by String?
412
414
  fit_check_status FitCheckStatus?
413
415
  status ApplicationStatus @default(PENDING)
414
416
  /// Mirror of Offer.status for list filters and combined status chips
415
417
  offer_status OfferStatus?
418
+ /// Audit fields
419
+ created_at DateTime @default(now())
420
+ updated_at DateTime @updatedAt
421
+ created_by String
422
+ updated_by String
423
+ is_active Boolean @default(true)
424
+ /// Relations
416
425
  evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
417
426
  candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
418
427
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
419
428
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
420
429
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
421
- fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
430
+ fit_check FitCheck?
422
431
  recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
423
432
  source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
424
433
  interviews Interview[]
@@ -430,17 +439,15 @@ model Application {
430
439
  communication_messages CommunicationMessage[]
431
440
  job_application_responses JobApplicationResponse[]
432
441
  offer Offer?
433
- // Audit fields
434
- created_at DateTime @default(now())
435
- updated_at DateTime @updatedAt
436
- created_by String
437
- updated_by String
438
- is_active Boolean @default(true)
439
442
 
440
443
  @@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
441
444
  @@index([candidate_id])
442
445
  @@index([job_description_id])
443
446
  @@index([source_id])
447
+ @@index([organisation_id, is_flagged])
448
+ @@index([job_description_id, is_flagged])
449
+ @@index([organisation_id, is_active, status])
450
+ @@index([job_description_id, is_active, status])
444
451
  @@schema("public")
445
452
  }
446
453
 
@@ -1154,6 +1161,45 @@ model CommunicationMessage {
1154
1161
  @@schema("public")
1155
1162
  }
1156
1163
 
1164
+ enum CompetencyCategory {
1165
+ TECHNICAL
1166
+ BEHAVIOURAL
1167
+ AI
1168
+
1169
+ @@schema("public")
1170
+ }
1171
+
1172
+ model CompetencyDictionary {
1173
+ /// Primary key
1174
+ id String @id @default(uuid())
1175
+ /// Foreign keys
1176
+ organisation_id String?
1177
+ /// Data fields
1178
+ category CompetencyCategory
1179
+ industry String
1180
+ name String
1181
+ description String?
1182
+ /// Proficiency ladder definitions (competency-specific text)
1183
+ level1 String?
1184
+ level2 String?
1185
+ level3 String?
1186
+ level4 String?
1187
+ level5 String?
1188
+ metadata Json?
1189
+ /// Audit fields
1190
+ created_by String
1191
+ updated_by String
1192
+ created_at DateTime @default(now())
1193
+ updated_at DateTime @updatedAt
1194
+ is_active Boolean @default(true)
1195
+ /// Relations
1196
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1197
+
1198
+ @@index([organisation_id])
1199
+ @@index([organisation_id, category])
1200
+ @@schema("public")
1201
+ }
1202
+
1157
1203
  model ContactUs {
1158
1204
  id String @id @default(uuid())
1159
1205
  name String
@@ -1482,51 +1528,33 @@ enum FitCheckStatus {
1482
1528
 
1483
1529
  model FitCheck {
1484
1530
  /// Primary key (UUID)
1485
- id String @id @default(uuid())
1531
+ id String @id @default(uuid())
1486
1532
  /// FK to organisations table
1487
- organisation_id String?
1488
- candidate_id String?
1489
- resume_id String
1490
- job_description_id String
1491
-
1492
- /// Old Fields will be deprecated soon
1493
- skills_match String[]
1494
- responsibilities_match String[]
1495
- responsibilities_score Float?
1496
- experience_match String[]
1497
- experience_score Float?
1498
- organisation_value_score Float?
1499
- organisation_value_match String[]
1500
- qualifications_match String[]
1501
- qualifications_score Float?
1502
- fit Json[]
1503
- fit_check_status FitCheckStatus?
1504
- // Fields to be used now
1505
- skills_analysis Json?
1506
- overall_analysis Json?
1507
- skills_score Float?
1508
- overall_score Float
1509
- short_match_analysis Json[]
1510
- fit_comparison Json?
1511
- recommendation Json?
1512
- // New Fields needs to be changed now
1513
- candidate_analysis Json[]
1514
- technical_analysis Json[]
1515
- competency_analysis Json[]
1516
-
1533
+ organisation_id String?
1534
+ candidate_id String?
1535
+ resume_id String
1536
+ job_description_id String
1537
+ /// Owning application (inverted from Application.fit_check_id)
1538
+ application_id String? @unique
1539
+ skills_analysis Json?
1540
+ overall_analysis Json?
1541
+ overall_score Float
1542
+ short_match_analysis Json[]
1543
+ fit_comparison Json?
1544
+ recommendation Json?
1545
+ competencies_analysis Json?
1517
1546
  /// Audit fields
1518
- created_by String
1519
- updated_by String
1520
- is_active Boolean @default(true)
1521
- /// Timestamps
1522
- created_at DateTime @default(now())
1523
- updated_at DateTime @updatedAt
1547
+ created_by String
1548
+ updated_by String
1549
+ is_active Boolean @default(true)
1550
+ created_at DateTime @default(now())
1551
+ updated_at DateTime @updatedAt
1524
1552
  /// Relations
1525
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1526
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1527
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1528
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1529
- application Application?
1553
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1554
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1555
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1556
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1557
+ application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1530
1558
 
1531
1559
  /// Ensure one FitCheck per (resume_id, job_description_id) pair
1532
1560
  @@unique([resume_id, job_description_id])
@@ -1978,6 +2006,8 @@ model Interview {
1978
2006
  @@index([candidate_id])
1979
2007
  @@index([interviewer_id])
1980
2008
  @@index([job_description_id])
2009
+ @@index([organisation_id, interview_status])
2010
+ @@index([interview_status, scheduled_start_time])
1981
2011
  @@schema("public")
1982
2012
  }
1983
2013
 
@@ -2459,6 +2489,7 @@ model JobDescription {
2459
2489
  @@index([job_profile_id])
2460
2490
  @@index([hiring_plan_line_id])
2461
2491
  @@index([department_id])
2492
+ @@index([organisation_id, status])
2462
2493
  @@schema("public")
2463
2494
  }
2464
2495
 
@@ -3078,6 +3109,8 @@ model OngoingEvaluation {
3078
3109
  @@unique([application_id, evaluation_plan_id])
3079
3110
  @@index([application_id])
3080
3111
  @@index([evaluation_plan_id])
3112
+ @@index([application_id, is_active, state])
3113
+ @@index([job_description_id, state, round_status])
3081
3114
  @@schema("public")
3082
3115
  }
3083
3116
 
@@ -3241,6 +3274,7 @@ model Organisation {
3241
3274
  departments Department[]
3242
3275
  hiring_plans HiringPlan[]
3243
3276
  employees Employee[]
3277
+ competency_dictionaries CompetencyDictionary[]
3244
3278
 
3245
3279
  @@index([name])
3246
3280
  @@schema("public")