@adaptware/eagles-db 0.1.55 → 0.1.56

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-74c9ed33e236c22233bde6f599fd809f94b070a5ba66f532b7c9bc497b9e02c4",
2
+ "name": "prisma-client-a3d9b695d947951ed70e866b5fe5fe9438d58ee410e3c62d37e70587ea2ee8f9",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -77,29 +77,6 @@ model Action {
77
77
  @@index([due_date])
78
78
  }
79
79
 
80
- enum ActivityActorType {
81
- USER
82
- AI
83
- SYSTEM
84
- }
85
-
86
- model ActivityLog {
87
- id String @id @default(uuid())
88
- application_id String
89
- actor_id String?
90
- actor_type ActivityActorType @default(USER)
91
- message String
92
- timestamp DateTime @default(now())
93
- metadata Json?
94
- created_at DateTime @default(now())
95
- is_active Boolean @default(true)
96
- // Relations
97
- actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
98
- application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
99
-
100
- @@index([application_id])
101
- }
102
-
103
80
  // PENDING could be understood as unscreened
104
81
  enum ApplicationStatus {
105
82
  PENDING
@@ -109,19 +86,20 @@ enum ApplicationStatus {
109
86
  }
110
87
 
111
88
  model Application {
112
- id String @id @default(uuid())
113
- candidate_id String
114
- resume_id String
115
- organisation_id String
116
- job_description_id String
117
- status ApplicationStatus @default(PENDING)
118
- fit_check_score Float?
119
- fit_check_status FitCheckStatus?
120
- applied_at DateTime @default(now())
121
- evaluation_plan_id String?
122
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
123
- fit_check_id String? @unique
124
- round_no Int @default(0)
89
+ id String @id @default(uuid())
90
+ candidate_id String
91
+ resume_id String
92
+ organisation_id String
93
+ job_description_id String
94
+ status ApplicationStatus @default(PENDING)
95
+ fit_check_score Float?
96
+ fit_check_status FitCheckStatus?
97
+ applied_at DateTime @default(now())
98
+ evaluation_plan_id String?
99
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
100
+ fit_check_id String? @unique
101
+ round_no Int @default(0)
102
+
125
103
  // Relations
126
104
  candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
127
105
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
@@ -129,19 +107,19 @@ model Application {
129
107
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
130
108
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
131
109
  interviews Interview[]
132
- assignments Assignment[]
133
110
  ongoing_evaluations OngoingEvaluation[]
134
- activity_logs ActivityLog[]
135
- // Audit fields
136
- created_at DateTime @default(now())
137
- updated_at DateTime @updatedAt
138
- created_by String
139
- updated_by String
140
- is_active Boolean @default(true)
111
+
112
+ created_at DateTime @default(now())
113
+ updated_at DateTime @updatedAt
114
+ created_by String
115
+ updated_by String
116
+ is_active Boolean @default(true)
141
117
 
142
118
  @@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
143
119
  @@index([candidate_id])
144
120
  @@index([job_description_id])
121
+ @@index([organisation_id])
122
+ @@index([resume_id])
145
123
  }
146
124
 
147
125
  model Approval {
@@ -171,31 +149,32 @@ enum AssessmentStatus {
171
149
  }
172
150
 
173
151
  model Assessment {
174
- id String @id @default(uuid())
175
- assessment_library_id String
176
- candidate_id String
177
- reviewer_id String?
178
- score Float?
179
- feedback String?
180
- scheduled_start_time DateTime? @default(now()) // Start Time to start the assessment
181
- assessment_status AssessmentStatus @default(SCHEDULED)
182
- created_at DateTime @default(now())
183
- updated_at DateTime @updatedAt
184
- created_by String
185
- updated_by String
186
- is_active Boolean @default(true)
152
+ id String @id @default(uuid())
153
+ assessment_id String
154
+ candidate_id String
155
+ reviewer_id String?
156
+ score Float?
157
+ feedback String?
158
+ scheduled_start_time DateTime? @default(now()) // Start Time to start the assessment
159
+ assessment_status AssessmentStatus @default(SCHEDULED)
160
+ created_at DateTime @default(now())
161
+ updated_at DateTime @updatedAt
162
+ created_by String
163
+ updated_by String
164
+ is_active Boolean @default(true)
187
165
  // Relations
188
- assessment_library AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
189
- candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
190
- reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
191
- questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
192
- candidateResponse CandidateQuestionResponse[]
193
- panelistId String?
194
- User User? @relation(fields: [userId], references: [id])
195
- userId String?
196
-
197
- @@unique([assessment_library_id, candidate_id])
198
- @@index([assessment_library_id])
166
+ assessment_libarary AssessmentLibrary @relation(fields: [assessment_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
167
+ candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
168
+ reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
169
+ questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
170
+ candidateResponse CandidateQuestionResponse[]
171
+ Panelist Panelist? @relation(fields: [panelistId], references: [id])
172
+ panelistId String?
173
+ User User? @relation(fields: [userId], references: [id])
174
+ userId String?
175
+
176
+ @@unique([assessment_id, candidate_id])
177
+ @@index([assessment_id])
199
178
  @@index([candidate_id])
200
179
  }
201
180
 
@@ -230,6 +209,7 @@ model AssessmentLibrary {
230
209
  evaluation_Plans EvaluationPlan[]
231
210
 
232
211
  @@index([organisation_id])
212
+ @@index([created_at])
233
213
  }
234
214
 
235
215
  /**
@@ -250,49 +230,6 @@ model AssessmentQuestion {
250
230
  @@id([assessment_id, question_id])
251
231
  }
252
232
 
253
- enum AssignmentStatus {
254
- AVAILABLE
255
- SCHEDULED
256
- CANCELLED
257
- }
258
-
259
- model Assignment {
260
- id String @id @default(uuid())
261
- candidate_id String
262
- assignment_library_id String
263
- reviewer_id String?
264
- application_id String?
265
- job_description_id String
266
- organisation_id String
267
- ongoing_evaluation_id String? @unique
268
- score Int?
269
- ai_result String?
270
- ai_reasoning String?
271
- status AssignmentStatus @default(AVAILABLE)
272
- cancel_reason String?
273
- solution_url String?
274
- scheduled_start_time DateTime?
275
- scheduled_end_time DateTime?
276
- created_at DateTime @default(now())
277
- updated_at DateTime @updatedAt
278
- created_by String
279
- updated_by String
280
- is_active Boolean @default(true)
281
- // Relations
282
- candidate User? @relation("CandidateAssignments", fields: [candidate_id], references: [id], onDelete: Cascade)
283
- assignment_library AssignmentLibrary @relation(fields: [assignment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
284
- reviewer User? @relation("AssignmentReviewer", fields: [reviewer_id], references: [id], onDelete: SetNull)
285
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
286
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
287
- application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
288
- ongoing_evaluation OngoingEvaluation? @relation(fields: [ongoing_evaluation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
289
-
290
- @@unique([candidate_id, ongoing_evaluation_id])
291
- @@index([candidate_id])
292
- @@index([reviewer_id])
293
- @@index([job_description_id])
294
- }
295
-
296
233
  model AssignmentLibrary {
297
234
  id String @id @default(uuid())
298
235
  deadline Int
@@ -309,9 +246,9 @@ model AssignmentLibrary {
309
246
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
310
247
  /// Back-relation: one-to-one from EvaluationPlan (FK lives on EvaluationPlan.assignment_library_id)
311
248
  evaluationPlan EvaluationPlan[]
312
- assignments Assignment[]
313
249
 
314
250
  @@index([job_description_id])
251
+ @@index([created_at])
315
252
  }
316
253
 
317
254
  enum JobType {
@@ -486,6 +423,7 @@ model EvaluationPlan {
486
423
  // Relations
487
424
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
488
425
  questions Question[] // One evaluation plan → many questions
426
+ panelists Panelist[]
489
427
  interviews Interview[]
490
428
  applications Application[]
491
429
  // New optional one-to-one relation with AssessmentLibrary
@@ -527,7 +465,6 @@ model FitCheck {
527
465
  id String @id @default(uuid())
528
466
  /// FK to organisations table
529
467
  organisation_id String?
530
- candidate_id String?
531
468
  resume_id String
532
469
  job_description_id String
533
470
 
@@ -565,7 +502,6 @@ model FitCheck {
565
502
  updated_at DateTime @updatedAt
566
503
  /// Relations
567
504
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
568
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
569
505
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
570
506
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
571
507
  application Application?
@@ -592,6 +528,25 @@ model Google {
592
528
  is_active Boolean @default(true)
593
529
  }
594
530
 
531
+ model IntermediateFeedback {
532
+ id String @id @default(uuid())
533
+ interview_id String
534
+ overall_feedback_id String?
535
+ intermediate_feedback Json
536
+ order_no Int @default(autoincrement())
537
+ created_at DateTime @default(now())
538
+ updated_at DateTime @updatedAt
539
+ created_by String
540
+ updated_by String
541
+ is_active Boolean @default(true)
542
+ // Relations
543
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
544
+ OverallFeedback OverallFeedback? @relation(fields: [overall_feedback_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
545
+ transcripts Transcript[]
546
+
547
+ @@index([interview_id])
548
+ }
549
+
595
550
  enum InterviewStatus {
596
551
  INTERVIEW_REQUESTED
597
552
  SCHEDULED
@@ -610,61 +565,88 @@ enum InterviewFeedback {
610
565
  }
611
566
 
612
567
  model Interview {
613
- id String @id @default(uuid())
614
- /// Foreign keys
615
- organisation_id String
568
+ id String @id @default(uuid())
616
569
  candidate_id String
617
570
  interviewer_id String?
618
571
  evaluation_plan_id String
619
572
  application_id String?
620
573
  resume_id String
621
574
  job_description_id String
622
- /// Data
575
+ organisation_id String
623
576
  room_name String?
624
577
  interview_summary String[]
578
+ ai_interview_feedback InterviewFeedback?
579
+ interview_feedback InterviewFeedback?
580
+ interview_rating Float? // Overall rating out of 100 based on evaluation
625
581
  scheduled_start_time DateTime?
626
582
  scheduled_end_time DateTime?
627
583
  actual_start_time DateTime?
628
584
  actual_end_time DateTime?
629
585
  recording_url String?
630
- interview_status InterviewStatus @default(SCHEDULED)
586
+ interview_status InterviewStatus @default(SCHEDULED)
631
587
  google_event_id String?
632
- /// Old Feedback fields will be deprecated soon
633
- ai_interview_feedback InterviewFeedback?
634
- interview_feedback InterviewFeedback?
635
- overall_feedback String?
636
- interview_rating Float? // Overall rating out of 100 based on evaluation
637
- /// New Feedback fields
638
- ai_feedback Json?
639
- human_feedback Json?
640
- interviewer_feedback Json?
641
- section_feedback Json[]
642
- /// Audit fields
643
- created_at DateTime @default(now())
644
- updated_at DateTime @updatedAt
588
+ created_at DateTime @default(now())
589
+ updated_at DateTime @updatedAt
645
590
  created_by String
646
591
  updated_by String
647
- is_active Boolean @default(true)
592
+ is_active Boolean @default(true)
648
593
  // Relations
649
- candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
650
- interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
651
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
652
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
653
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
654
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
655
- application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
594
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
595
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
596
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
597
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
598
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
599
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
600
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
656
601
  ongoing_evaluation OngoingEvaluation?
602
+ intermediateFeedbacks IntermediateFeedback[]
657
603
  transcripts Transcript[]
658
604
  suggestions Suggestion[]
605
+ overallFeedback OverallFeedback[]
659
606
  feedback Feedback[]
660
607
  interviewNotes InterviewNotes[]
661
608
 
662
609
  @@unique([interviewer_id, candidate_id, evaluation_plan_id])
610
+ @@index([application_id])
663
611
  @@index([candidate_id])
664
612
  @@index([interviewer_id])
665
613
  @@index([job_description_id])
666
614
  }
667
615
 
616
+ /// Defines the category or purpose of the interview, suitable for any job role.
617
+ enum InterviewCategory {
618
+ SCREENING // Initial screening interview
619
+ TECHNICAL // Skill or role-specific interview
620
+ BEHAVIORAL // Behavioral or situational round
621
+ CASE_STUDY // Case-based or analytical round
622
+ MANAGERIAL // Leadership or management-focused
623
+ CULTURAL_FIT // Checks alignment with company culture
624
+ FINAL_DISCUSSION // Final HR or offer discussion
625
+ GENERAL // Generic or flexible-purpose interview
626
+ }
627
+
628
+ /// Represents a reusable interview template applicable to any job type.
629
+ model InterviewLibrary {
630
+ id String @id @default(uuid())
631
+ title String
632
+ description String
633
+ organisation_id String
634
+ category InterviewCategory
635
+ evaluation_type EvaluationType
636
+ duration Float
637
+ passing_marks Float
638
+ is_active Boolean @default(true)
639
+ created_by String
640
+ updated_by String
641
+ created_at DateTime @default(now())
642
+ updated_at DateTime @updatedAt
643
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
644
+
645
+ @@index([organisation_id])
646
+ @@index([category])
647
+ @@index([created_at])
648
+ }
649
+
668
650
  model InterviewNotes {
669
651
  id String @id @default(uuid())
670
652
  interview_id String
@@ -713,7 +695,6 @@ model JobDescription {
713
695
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
714
696
  applications Application[]
715
697
  interviews Interview[]
716
- assignments Assignment[]
717
698
  fit_check FitCheck[] // one-to-many link
718
699
  job_description_data JobDescriptionData[] // one-to-many link
719
700
  evaluationPlan EvaluationPlan[] // relation to evaluation methods
@@ -744,6 +725,7 @@ model JobDescriptionData {
744
725
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
745
726
 
746
727
  @@unique([job_description_id, key])
728
+ @@index([created_at])
747
729
  }
748
730
 
749
731
  model Message {
@@ -798,7 +780,6 @@ model OngoingEvaluation {
798
780
  job_description_id String
799
781
  evaluation_plan_id String
800
782
  interview_id String? @unique
801
- assignment_id String? @unique
802
783
  status OngoingEvaluationStatus?
803
784
  state OngoingEvaluationState? @default(NOT_STARTED)
804
785
  round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
@@ -811,7 +792,6 @@ model OngoingEvaluation {
811
792
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
812
793
  evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
813
794
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
814
- assignment Assignment?
815
795
  created_at DateTime @default(now())
816
796
  updated_at DateTime @updatedAt
817
797
  created_by String
@@ -868,10 +848,11 @@ model Organisation {
868
848
  job_descriptions JobDescription[]
869
849
  assessment_library AssessmentLibrary[]
870
850
  assignment_library AssignmentLibrary[]
851
+ interview_library InterviewLibrary[]
871
852
  interviews Interview[]
872
- assignments Assignment[]
873
853
  fit_check FitCheck[] // one-to-many link
874
854
  resumes Resume[] // one-to-many link
855
+ panelists Panelist[] // one-to-many link
875
856
  approvals Approval[] // one-to-many link
876
857
  suggestions Suggestion[]
877
858
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
@@ -880,6 +861,67 @@ model Organisation {
880
861
  @@index([name])
881
862
  }
882
863
 
864
+ enum FeedbackType {
865
+ HUMAN
866
+ AI
867
+ }
868
+
869
+ enum OverallRecommendation {
870
+ StrongHire
871
+ Hire
872
+ LeaningHire
873
+ NoHire
874
+ StrongNoHire
875
+ }
876
+
877
+ model OverallFeedback {
878
+ id String @id @default(uuid())
879
+ interview_id String
880
+ interviewer_id String? // 👈 optional field
881
+ feedback_type FeedbackType
882
+ overall_score Float
883
+ overall_recommendation OverallRecommendation
884
+ overall_feedback Json
885
+ created_at DateTime @default(now())
886
+ updated_at DateTime @updatedAt
887
+ created_by String
888
+ updated_by String
889
+ is_active Boolean @default(true)
890
+ // Relations
891
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
892
+ interviewer Panelist? @relation(fields: [interviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
893
+ intermediateFeedbacks IntermediateFeedback[] // 👈 one-to-many relation added here
894
+
895
+ @@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
896
+ @@index([interview_id])
897
+ @@index([interviewer_id])
898
+ }
899
+
900
+ model Panelist {
901
+ id String @id @default(uuid())
902
+ name String
903
+ designation String
904
+ experience String // e.g. "10+", keeping as String for flexibility
905
+ expertise String // e.g. "Product Strategy, Figma..."
906
+ suited_interview String // e.g. "Consulting, Customer understanding..."
907
+ industry String // e.g. "Healthcare, Fintech"
908
+ special_areas String? // Optional field
909
+ organisation_id String
910
+ user_id String @unique
911
+
912
+ user User @relation(fields: [user_id], references: [id])
913
+ organisation Organisation @relation(fields: [organisation_id], references: [id])
914
+ evaluationPlans EvaluationPlan[]
915
+ overallFeedbacks OverallFeedback[]
916
+ created_at DateTime @default(now())
917
+ updated_at DateTime @updatedAt
918
+ created_by String
919
+ updated_by String
920
+ is_active Boolean @default(true)
921
+
922
+ assessments Assessment[]
923
+ }
924
+
883
925
  model Permission {
884
926
  id String @id @default(uuid())
885
927
  permissions String[] @default([])
@@ -1051,10 +1093,11 @@ model Suggestion {
1051
1093
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
1052
1094
 
1053
1095
  @@index([interview_id])
1096
+ @@index([transcript_id])
1054
1097
  }
1055
1098
 
1056
1099
  model Transcript {
1057
- id String @id @default(uuid())
1100
+ id String @id @default(uuid())
1058
1101
  interview_id String?
1059
1102
  suggestion_id String?
1060
1103
  intermediate_feedback_id String?
@@ -1063,16 +1106,17 @@ model Transcript {
1063
1106
  candidate_timestamp DateTime?
1064
1107
  interviewer String
1065
1108
  candidate String
1066
- order_no Int @default(autoincrement())
1067
- created_at DateTime @default(now())
1068
- updated_at DateTime @updatedAt
1109
+ order_no Int @default(autoincrement())
1110
+ created_at DateTime @default(now())
1111
+ updated_at DateTime @updatedAt
1069
1112
  created_by String
1070
1113
  updated_by String
1071
- is_active Boolean @default(true)
1114
+ is_active Boolean @default(true)
1072
1115
  // Relations
1073
- interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
1074
- suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
1075
- job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1116
+ interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
1117
+ suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
1118
+ intermediate_feedback IntermediateFeedback? @relation(fields: [intermediate_feedback_id], references: [id], onDelete: SetNull)
1119
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1076
1120
 
1077
1121
  @@unique([interview_id, order_no])
1078
1122
  @@index([interview_id])
@@ -1110,6 +1154,7 @@ model User {
1110
1154
  job_description JobDescription[]
1111
1155
  hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
1112
1156
  approvals Approval[]
1157
+ panelist Panelist?
1113
1158
  sent_messages Message[] @relation("Sent Messages")
1114
1159
  received_messages Message[] @relation("Received Messages")
1115
1160
  profile_created Boolean
@@ -1120,16 +1165,12 @@ model User {
1120
1165
  assessment_results Assessment[]
1121
1166
  candidate_assessments Assessment[] @relation("CandidateAssessments")
1122
1167
  reviewer_assessments Assessment[] @relation("ReviewerAssessments")
1123
- candidate_assignments Assignment[] @relation("CandidateAssignments")
1124
- reviewer_assignments Assignment[] @relation("AssignmentReviewer")
1125
1168
  candidateResponses CandidateQuestionResponse[]
1126
1169
  questions Question[]
1127
1170
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
1128
- actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
1129
1171
  actions Action[]
1130
1172
  calendly Calendly?
1131
1173
  google Google?
1132
- fitChecks FitCheck[]
1133
1174
 
1134
1175
  name String?
1135
1176
  phone String?