@adaptware/eagles-db 0.1.53 → 0.1.55
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/client/edge.js +68 -105
- package/client/index-browser.js +67 -104
- package/client/index.d.ts +24799 -26470
- package/client/index.js +70 -107
- package/client/{libquery_engine-darwin.dylib.node → libquery_engine-darwin-arm64.dylib.node} +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +156 -197
- package/client/wasm.js +67 -104
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/assessment.prisma +1 -2
- package/prisma/schema/evaluationPlan.prisma +0 -1
- package/prisma/schema/interview.prisma +26 -18
- package/prisma/schema/organisation.prisma +0 -2
- package/prisma/schema/transcript.prisma +8 -9
- package/prisma/schema/user.prisma +0 -1
- package/prisma/schema/intermediateFeedback.prisma +0 -18
- package/prisma/schema/interviewLibrary.prisma +0 -31
- package/prisma/schema/overallFeedback.prisma +0 -34
- package/prisma/schema/panelist.prisma +0 -24
package/client/{libquery_engine-darwin.dylib.node → libquery_engine-darwin-arm64.dylib.node}
RENAMED
|
Binary file
|
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -77,6 +77,29 @@ 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
|
+
|
|
80
103
|
// PENDING could be understood as unscreened
|
|
81
104
|
enum ApplicationStatus {
|
|
82
105
|
PENDING
|
|
@@ -86,20 +109,19 @@ enum ApplicationStatus {
|
|
|
86
109
|
}
|
|
87
110
|
|
|
88
111
|
model Application {
|
|
89
|
-
id
|
|
90
|
-
candidate_id
|
|
91
|
-
resume_id
|
|
92
|
-
organisation_id
|
|
93
|
-
job_description_id
|
|
94
|
-
status
|
|
95
|
-
fit_check_score
|
|
96
|
-
fit_check_status
|
|
97
|
-
applied_at
|
|
98
|
-
evaluation_plan_id
|
|
99
|
-
evaluation_plan
|
|
100
|
-
fit_check_id
|
|
101
|
-
round_no
|
|
102
|
-
|
|
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)
|
|
103
125
|
// Relations
|
|
104
126
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
105
127
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
@@ -107,19 +129,19 @@ model Application {
|
|
|
107
129
|
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
108
130
|
fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
109
131
|
interviews Interview[]
|
|
132
|
+
assignments Assignment[]
|
|
110
133
|
ongoing_evaluations OngoingEvaluation[]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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)
|
|
117
141
|
|
|
118
142
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
119
143
|
@@index([candidate_id])
|
|
120
144
|
@@index([job_description_id])
|
|
121
|
-
@@index([organisation_id])
|
|
122
|
-
@@index([resume_id])
|
|
123
145
|
}
|
|
124
146
|
|
|
125
147
|
model Approval {
|
|
@@ -149,32 +171,31 @@ enum AssessmentStatus {
|
|
|
149
171
|
}
|
|
150
172
|
|
|
151
173
|
model Assessment {
|
|
152
|
-
id
|
|
153
|
-
|
|
154
|
-
candidate_id
|
|
155
|
-
reviewer_id
|
|
156
|
-
score
|
|
157
|
-
feedback
|
|
158
|
-
scheduled_start_time
|
|
159
|
-
assessment_status
|
|
160
|
-
created_at
|
|
161
|
-
updated_at
|
|
162
|
-
created_by
|
|
163
|
-
updated_by
|
|
164
|
-
is_active
|
|
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)
|
|
165
187
|
// Relations
|
|
166
|
-
|
|
167
|
-
candidate
|
|
168
|
-
reviewer
|
|
169
|
-
questions
|
|
170
|
-
candidateResponse
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
@@
|
|
177
|
-
@@index([assessment_id])
|
|
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])
|
|
178
199
|
@@index([candidate_id])
|
|
179
200
|
}
|
|
180
201
|
|
|
@@ -209,7 +230,6 @@ model AssessmentLibrary {
|
|
|
209
230
|
evaluation_Plans EvaluationPlan[]
|
|
210
231
|
|
|
211
232
|
@@index([organisation_id])
|
|
212
|
-
@@index([created_at])
|
|
213
233
|
}
|
|
214
234
|
|
|
215
235
|
/**
|
|
@@ -230,6 +250,49 @@ model AssessmentQuestion {
|
|
|
230
250
|
@@id([assessment_id, question_id])
|
|
231
251
|
}
|
|
232
252
|
|
|
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
|
+
|
|
233
296
|
model AssignmentLibrary {
|
|
234
297
|
id String @id @default(uuid())
|
|
235
298
|
deadline Int
|
|
@@ -246,9 +309,9 @@ model AssignmentLibrary {
|
|
|
246
309
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
247
310
|
/// Back-relation: one-to-one from EvaluationPlan (FK lives on EvaluationPlan.assignment_library_id)
|
|
248
311
|
evaluationPlan EvaluationPlan[]
|
|
312
|
+
assignments Assignment[]
|
|
249
313
|
|
|
250
314
|
@@index([job_description_id])
|
|
251
|
-
@@index([created_at])
|
|
252
315
|
}
|
|
253
316
|
|
|
254
317
|
enum JobType {
|
|
@@ -423,7 +486,6 @@ model EvaluationPlan {
|
|
|
423
486
|
// Relations
|
|
424
487
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
|
|
425
488
|
questions Question[] // One evaluation plan → many questions
|
|
426
|
-
panelists Panelist[]
|
|
427
489
|
interviews Interview[]
|
|
428
490
|
applications Application[]
|
|
429
491
|
// New optional one-to-one relation with AssessmentLibrary
|
|
@@ -465,6 +527,7 @@ model FitCheck {
|
|
|
465
527
|
id String @id @default(uuid())
|
|
466
528
|
/// FK to organisations table
|
|
467
529
|
organisation_id String?
|
|
530
|
+
candidate_id String?
|
|
468
531
|
resume_id String
|
|
469
532
|
job_description_id String
|
|
470
533
|
|
|
@@ -502,6 +565,7 @@ model FitCheck {
|
|
|
502
565
|
updated_at DateTime @updatedAt
|
|
503
566
|
/// Relations
|
|
504
567
|
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)
|
|
505
569
|
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
506
570
|
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
507
571
|
application Application?
|
|
@@ -528,25 +592,6 @@ model Google {
|
|
|
528
592
|
is_active Boolean @default(true)
|
|
529
593
|
}
|
|
530
594
|
|
|
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
|
-
|
|
550
595
|
enum InterviewStatus {
|
|
551
596
|
INTERVIEW_REQUESTED
|
|
552
597
|
SCHEDULED
|
|
@@ -565,88 +610,61 @@ enum InterviewFeedback {
|
|
|
565
610
|
}
|
|
566
611
|
|
|
567
612
|
model Interview {
|
|
568
|
-
id String
|
|
613
|
+
id String @id @default(uuid())
|
|
614
|
+
/// Foreign keys
|
|
615
|
+
organisation_id String
|
|
569
616
|
candidate_id String
|
|
570
617
|
interviewer_id String?
|
|
571
618
|
evaluation_plan_id String
|
|
572
619
|
application_id String?
|
|
573
620
|
resume_id String
|
|
574
621
|
job_description_id String
|
|
575
|
-
|
|
622
|
+
/// Data
|
|
576
623
|
room_name String?
|
|
577
624
|
interview_summary String[]
|
|
578
|
-
ai_interview_feedback InterviewFeedback?
|
|
579
|
-
interview_feedback InterviewFeedback?
|
|
580
|
-
interview_rating Float? // Overall rating out of 100 based on evaluation
|
|
581
625
|
scheduled_start_time DateTime?
|
|
582
626
|
scheduled_end_time DateTime?
|
|
583
627
|
actual_start_time DateTime?
|
|
584
628
|
actual_end_time DateTime?
|
|
585
629
|
recording_url String?
|
|
586
|
-
interview_status InterviewStatus
|
|
630
|
+
interview_status InterviewStatus @default(SCHEDULED)
|
|
587
631
|
google_event_id String?
|
|
588
|
-
|
|
589
|
-
|
|
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
|
|
590
645
|
created_by String
|
|
591
646
|
updated_by String
|
|
592
|
-
is_active Boolean
|
|
647
|
+
is_active Boolean @default(true)
|
|
593
648
|
// Relations
|
|
594
|
-
candidate User?
|
|
595
|
-
interviewer User?
|
|
596
|
-
organisation Organisation
|
|
597
|
-
job_description JobDescription
|
|
598
|
-
resume Resume
|
|
599
|
-
evaluation_plan EvaluationPlan?
|
|
600
|
-
application Application?
|
|
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)
|
|
601
656
|
ongoing_evaluation OngoingEvaluation?
|
|
602
|
-
intermediateFeedbacks IntermediateFeedback[]
|
|
603
657
|
transcripts Transcript[]
|
|
604
658
|
suggestions Suggestion[]
|
|
605
|
-
overallFeedback OverallFeedback[]
|
|
606
659
|
feedback Feedback[]
|
|
607
660
|
interviewNotes InterviewNotes[]
|
|
608
661
|
|
|
609
662
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
610
|
-
@@index([application_id])
|
|
611
663
|
@@index([candidate_id])
|
|
612
664
|
@@index([interviewer_id])
|
|
613
665
|
@@index([job_description_id])
|
|
614
666
|
}
|
|
615
667
|
|
|
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
|
-
|
|
650
668
|
model InterviewNotes {
|
|
651
669
|
id String @id @default(uuid())
|
|
652
670
|
interview_id String
|
|
@@ -695,6 +713,7 @@ model JobDescription {
|
|
|
695
713
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
696
714
|
applications Application[]
|
|
697
715
|
interviews Interview[]
|
|
716
|
+
assignments Assignment[]
|
|
698
717
|
fit_check FitCheck[] // one-to-many link
|
|
699
718
|
job_description_data JobDescriptionData[] // one-to-many link
|
|
700
719
|
evaluationPlan EvaluationPlan[] // relation to evaluation methods
|
|
@@ -725,7 +744,6 @@ model JobDescriptionData {
|
|
|
725
744
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
726
745
|
|
|
727
746
|
@@unique([job_description_id, key])
|
|
728
|
-
@@index([created_at])
|
|
729
747
|
}
|
|
730
748
|
|
|
731
749
|
model Message {
|
|
@@ -780,6 +798,7 @@ model OngoingEvaluation {
|
|
|
780
798
|
job_description_id String
|
|
781
799
|
evaluation_plan_id String
|
|
782
800
|
interview_id String? @unique
|
|
801
|
+
assignment_id String? @unique
|
|
783
802
|
status OngoingEvaluationStatus?
|
|
784
803
|
state OngoingEvaluationState? @default(NOT_STARTED)
|
|
785
804
|
round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
|
|
@@ -792,6 +811,7 @@ model OngoingEvaluation {
|
|
|
792
811
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
793
812
|
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
794
813
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
814
|
+
assignment Assignment?
|
|
795
815
|
created_at DateTime @default(now())
|
|
796
816
|
updated_at DateTime @updatedAt
|
|
797
817
|
created_by String
|
|
@@ -848,11 +868,10 @@ model Organisation {
|
|
|
848
868
|
job_descriptions JobDescription[]
|
|
849
869
|
assessment_library AssessmentLibrary[]
|
|
850
870
|
assignment_library AssignmentLibrary[]
|
|
851
|
-
interview_library InterviewLibrary[]
|
|
852
871
|
interviews Interview[]
|
|
872
|
+
assignments Assignment[]
|
|
853
873
|
fit_check FitCheck[] // one-to-many link
|
|
854
874
|
resumes Resume[] // one-to-many link
|
|
855
|
-
panelists Panelist[] // one-to-many link
|
|
856
875
|
approvals Approval[] // one-to-many link
|
|
857
876
|
suggestions Suggestion[]
|
|
858
877
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
@@ -861,67 +880,6 @@ model Organisation {
|
|
|
861
880
|
@@index([name])
|
|
862
881
|
}
|
|
863
882
|
|
|
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
|
-
|
|
925
883
|
model Permission {
|
|
926
884
|
id String @id @default(uuid())
|
|
927
885
|
permissions String[] @default([])
|
|
@@ -1093,11 +1051,10 @@ model Suggestion {
|
|
|
1093
1051
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
1094
1052
|
|
|
1095
1053
|
@@index([interview_id])
|
|
1096
|
-
@@index([transcript_id])
|
|
1097
1054
|
}
|
|
1098
1055
|
|
|
1099
1056
|
model Transcript {
|
|
1100
|
-
id String
|
|
1057
|
+
id String @id @default(uuid())
|
|
1101
1058
|
interview_id String?
|
|
1102
1059
|
suggestion_id String?
|
|
1103
1060
|
intermediate_feedback_id String?
|
|
@@ -1106,17 +1063,16 @@ model Transcript {
|
|
|
1106
1063
|
candidate_timestamp DateTime?
|
|
1107
1064
|
interviewer String
|
|
1108
1065
|
candidate String
|
|
1109
|
-
order_no Int
|
|
1110
|
-
created_at DateTime
|
|
1111
|
-
updated_at DateTime
|
|
1066
|
+
order_no Int @default(autoincrement())
|
|
1067
|
+
created_at DateTime @default(now())
|
|
1068
|
+
updated_at DateTime @updatedAt
|
|
1112
1069
|
created_by String
|
|
1113
1070
|
updated_by String
|
|
1114
|
-
is_active Boolean
|
|
1071
|
+
is_active Boolean @default(true)
|
|
1115
1072
|
// Relations
|
|
1116
|
-
interview Interview?
|
|
1117
|
-
suggestion Suggestion?
|
|
1118
|
-
|
|
1119
|
-
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
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)
|
|
1120
1076
|
|
|
1121
1077
|
@@unique([interview_id, order_no])
|
|
1122
1078
|
@@index([interview_id])
|
|
@@ -1154,7 +1110,6 @@ model User {
|
|
|
1154
1110
|
job_description JobDescription[]
|
|
1155
1111
|
hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
|
|
1156
1112
|
approvals Approval[]
|
|
1157
|
-
panelist Panelist?
|
|
1158
1113
|
sent_messages Message[] @relation("Sent Messages")
|
|
1159
1114
|
received_messages Message[] @relation("Received Messages")
|
|
1160
1115
|
profile_created Boolean
|
|
@@ -1165,12 +1120,16 @@ model User {
|
|
|
1165
1120
|
assessment_results Assessment[]
|
|
1166
1121
|
candidate_assessments Assessment[] @relation("CandidateAssessments")
|
|
1167
1122
|
reviewer_assessments Assessment[] @relation("ReviewerAssessments")
|
|
1123
|
+
candidate_assignments Assignment[] @relation("CandidateAssignments")
|
|
1124
|
+
reviewer_assignments Assignment[] @relation("AssignmentReviewer")
|
|
1168
1125
|
candidateResponses CandidateQuestionResponse[]
|
|
1169
1126
|
questions Question[]
|
|
1170
1127
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
1128
|
+
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
1171
1129
|
actions Action[]
|
|
1172
1130
|
calendly Calendly?
|
|
1173
1131
|
google Google?
|
|
1132
|
+
fitChecks FitCheck[]
|
|
1174
1133
|
|
|
1175
1134
|
name String?
|
|
1176
1135
|
phone String?
|