@adaptware/eagles-db 0.1.58 → 0.1.59
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 +136 -93
- package/client/index-browser.js +135 -92
- package/client/index.d.ts +34593 -30080
- package/client/index.js +138 -95
- package/client/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +268 -214
- package/client/wasm.js +135 -92
- package/package.json +1 -1
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,48 @@ 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
|
+
overallScore Int?
|
|
269
|
+
feedback Json?
|
|
270
|
+
status AssignmentStatus @default(AVAILABLE)
|
|
271
|
+
cancel_reason String?
|
|
272
|
+
solution_url String?
|
|
273
|
+
scheduled_start_time DateTime?
|
|
274
|
+
scheduled_end_time DateTime?
|
|
275
|
+
created_at DateTime @default(now())
|
|
276
|
+
updated_at DateTime @updatedAt
|
|
277
|
+
created_by String
|
|
278
|
+
updated_by String
|
|
279
|
+
is_active Boolean @default(true)
|
|
280
|
+
// Relations
|
|
281
|
+
candidate User? @relation("CandidateAssignments", fields: [candidate_id], references: [id], onDelete: Cascade)
|
|
282
|
+
assignment_library AssignmentLibrary @relation(fields: [assignment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
283
|
+
reviewer User? @relation("AssignmentReviewer", fields: [reviewer_id], references: [id], onDelete: SetNull)
|
|
284
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
285
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
286
|
+
application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
287
|
+
ongoing_evaluation OngoingEvaluation? @relation(fields: [ongoing_evaluation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
288
|
+
|
|
289
|
+
@@unique([candidate_id, ongoing_evaluation_id])
|
|
290
|
+
@@index([candidate_id])
|
|
291
|
+
@@index([reviewer_id])
|
|
292
|
+
@@index([job_description_id])
|
|
293
|
+
}
|
|
294
|
+
|
|
233
295
|
model AssignmentLibrary {
|
|
234
296
|
id String @id @default(uuid())
|
|
235
297
|
deadline Int
|
|
@@ -246,9 +308,9 @@ model AssignmentLibrary {
|
|
|
246
308
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
247
309
|
/// Back-relation: one-to-one from EvaluationPlan (FK lives on EvaluationPlan.assignment_library_id)
|
|
248
310
|
evaluationPlan EvaluationPlan[]
|
|
311
|
+
assignments Assignment[]
|
|
249
312
|
|
|
250
313
|
@@index([job_description_id])
|
|
251
|
-
@@index([created_at])
|
|
252
314
|
}
|
|
253
315
|
|
|
254
316
|
enum JobType {
|
|
@@ -423,7 +485,6 @@ model EvaluationPlan {
|
|
|
423
485
|
// Relations
|
|
424
486
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
|
|
425
487
|
questions Question[] // One evaluation plan → many questions
|
|
426
|
-
panelists Panelist[]
|
|
427
488
|
interviews Interview[]
|
|
428
489
|
applications Application[]
|
|
429
490
|
// New optional one-to-one relation with AssessmentLibrary
|
|
@@ -465,6 +526,7 @@ model FitCheck {
|
|
|
465
526
|
id String @id @default(uuid())
|
|
466
527
|
/// FK to organisations table
|
|
467
528
|
organisation_id String?
|
|
529
|
+
candidate_id String?
|
|
468
530
|
resume_id String
|
|
469
531
|
job_description_id String
|
|
470
532
|
|
|
@@ -502,6 +564,7 @@ model FitCheck {
|
|
|
502
564
|
updated_at DateTime @updatedAt
|
|
503
565
|
/// Relations
|
|
504
566
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
567
|
+
candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
505
568
|
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
506
569
|
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
507
570
|
application Application?
|
|
@@ -528,23 +591,97 @@ model Google {
|
|
|
528
591
|
is_active Boolean @default(true)
|
|
529
592
|
}
|
|
530
593
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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[]
|
|
594
|
+
enum IntegrationProvider {
|
|
595
|
+
NAUKRI
|
|
596
|
+
ZOHO_RECRUIT
|
|
597
|
+
}
|
|
546
598
|
|
|
547
|
-
|
|
599
|
+
enum IntegrationAuthType {
|
|
600
|
+
OAUTH2
|
|
601
|
+
API_KEY
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
enum SyncDirection {
|
|
605
|
+
PUSH
|
|
606
|
+
PULL
|
|
607
|
+
BIDIRECTIONAL
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
enum SyncEntityType {
|
|
611
|
+
CANDIDATE
|
|
612
|
+
JOB_OPENING
|
|
613
|
+
INTERVIEW
|
|
614
|
+
APPLICATION
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
enum SyncStatus {
|
|
618
|
+
SYNCED
|
|
619
|
+
PENDING
|
|
620
|
+
FAILED
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
model IntegrationCredential {
|
|
624
|
+
id String @id @default(uuid())
|
|
625
|
+
organisation_id String?
|
|
626
|
+
provider IntegrationProvider
|
|
627
|
+
auth_type IntegrationAuthType
|
|
628
|
+
access_token String?
|
|
629
|
+
refresh_token String?
|
|
630
|
+
token_expires_at DateTime?
|
|
631
|
+
api_key String?
|
|
632
|
+
api_secret String?
|
|
633
|
+
metadata Json @default("{}")
|
|
634
|
+
is_active Boolean @default(true)
|
|
635
|
+
|
|
636
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
637
|
+
|
|
638
|
+
created_at DateTime @default(now())
|
|
639
|
+
updated_at DateTime @updatedAt
|
|
640
|
+
created_by String
|
|
641
|
+
updated_by String
|
|
642
|
+
|
|
643
|
+
@@unique([organisation_id, provider])
|
|
644
|
+
@@index([provider])
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
model IntegrationJobSync {
|
|
648
|
+
id String @id @default(uuid())
|
|
649
|
+
job_description_id String
|
|
650
|
+
provider IntegrationProvider
|
|
651
|
+
external_id String?
|
|
652
|
+
sync_enabled Boolean @default(true)
|
|
653
|
+
last_synced_at DateTime?
|
|
654
|
+
sync_direction SyncDirection @default(PUSH)
|
|
655
|
+
metadata Json @default("{}")
|
|
656
|
+
|
|
657
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
|
|
658
|
+
|
|
659
|
+
created_at DateTime @default(now())
|
|
660
|
+
updated_at DateTime @updatedAt
|
|
661
|
+
|
|
662
|
+
@@unique([job_description_id, provider])
|
|
663
|
+
@@index([provider])
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
model ZohoSyncMapping {
|
|
667
|
+
id String @id @default(uuid())
|
|
668
|
+
organisation_id String
|
|
669
|
+
entity_type SyncEntityType
|
|
670
|
+
treadspace_id String
|
|
671
|
+
zoho_module String
|
|
672
|
+
zoho_record_id String
|
|
673
|
+
last_synced_at DateTime @default(now())
|
|
674
|
+
sync_status SyncStatus @default(PENDING)
|
|
675
|
+
error_message String?
|
|
676
|
+
|
|
677
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
678
|
+
|
|
679
|
+
created_at DateTime @default(now())
|
|
680
|
+
updated_at DateTime @updatedAt
|
|
681
|
+
|
|
682
|
+
@@unique([organisation_id, entity_type, treadspace_id])
|
|
683
|
+
@@index([zoho_record_id])
|
|
684
|
+
@@index([sync_status])
|
|
548
685
|
}
|
|
549
686
|
|
|
550
687
|
enum InterviewStatus {
|
|
@@ -565,88 +702,61 @@ enum InterviewFeedback {
|
|
|
565
702
|
}
|
|
566
703
|
|
|
567
704
|
model Interview {
|
|
568
|
-
id String
|
|
705
|
+
id String @id @default(uuid())
|
|
706
|
+
/// Foreign keys
|
|
707
|
+
organisation_id String
|
|
569
708
|
candidate_id String
|
|
570
709
|
interviewer_id String?
|
|
571
710
|
evaluation_plan_id String
|
|
572
711
|
application_id String?
|
|
573
712
|
resume_id String
|
|
574
713
|
job_description_id String
|
|
575
|
-
|
|
714
|
+
/// Data
|
|
576
715
|
room_name String?
|
|
577
716
|
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
717
|
scheduled_start_time DateTime?
|
|
582
718
|
scheduled_end_time DateTime?
|
|
583
719
|
actual_start_time DateTime?
|
|
584
720
|
actual_end_time DateTime?
|
|
585
721
|
recording_url String?
|
|
586
|
-
interview_status InterviewStatus
|
|
722
|
+
interview_status InterviewStatus @default(SCHEDULED)
|
|
587
723
|
google_event_id String?
|
|
588
|
-
|
|
589
|
-
|
|
724
|
+
/// Old Feedback fields will be deprecated soon
|
|
725
|
+
ai_interview_feedback InterviewFeedback?
|
|
726
|
+
interview_feedback InterviewFeedback?
|
|
727
|
+
overall_feedback String?
|
|
728
|
+
interview_rating Float? // Overall rating out of 100 based on evaluation
|
|
729
|
+
/// New Feedback fields
|
|
730
|
+
ai_feedback Json?
|
|
731
|
+
human_feedback Json?
|
|
732
|
+
interviewer_feedback Json?
|
|
733
|
+
section_feedback Json[]
|
|
734
|
+
/// Audit fields
|
|
735
|
+
created_at DateTime @default(now())
|
|
736
|
+
updated_at DateTime @updatedAt
|
|
590
737
|
created_by String
|
|
591
738
|
updated_by String
|
|
592
|
-
is_active Boolean
|
|
739
|
+
is_active Boolean @default(true)
|
|
593
740
|
// Relations
|
|
594
|
-
candidate User?
|
|
595
|
-
interviewer User?
|
|
596
|
-
organisation Organisation
|
|
597
|
-
job_description JobDescription
|
|
598
|
-
resume Resume
|
|
599
|
-
evaluation_plan EvaluationPlan?
|
|
600
|
-
application Application?
|
|
741
|
+
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
742
|
+
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
743
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
744
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
745
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
746
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
747
|
+
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
601
748
|
ongoing_evaluation OngoingEvaluation?
|
|
602
|
-
intermediateFeedbacks IntermediateFeedback[]
|
|
603
749
|
transcripts Transcript[]
|
|
604
750
|
suggestions Suggestion[]
|
|
605
|
-
overallFeedback OverallFeedback[]
|
|
606
751
|
feedback Feedback[]
|
|
607
752
|
interviewNotes InterviewNotes[]
|
|
608
753
|
|
|
609
754
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
610
|
-
@@index([application_id])
|
|
611
755
|
@@index([candidate_id])
|
|
612
756
|
@@index([interviewer_id])
|
|
613
757
|
@@index([job_description_id])
|
|
614
758
|
}
|
|
615
759
|
|
|
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
760
|
model InterviewNotes {
|
|
651
761
|
id String @id @default(uuid())
|
|
652
762
|
interview_id String
|
|
@@ -695,6 +805,7 @@ model JobDescription {
|
|
|
695
805
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
696
806
|
applications Application[]
|
|
697
807
|
interviews Interview[]
|
|
808
|
+
assignments Assignment[]
|
|
698
809
|
fit_check FitCheck[] // one-to-many link
|
|
699
810
|
job_description_data JobDescriptionData[] // one-to-many link
|
|
700
811
|
evaluationPlan EvaluationPlan[] // relation to evaluation methods
|
|
@@ -706,6 +817,7 @@ model JobDescription {
|
|
|
706
817
|
hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
707
818
|
recruiters User[]
|
|
708
819
|
transcripts Transcript[]
|
|
820
|
+
integration_job_syncs IntegrationJobSync[]
|
|
709
821
|
|
|
710
822
|
@@index([organisation_id])
|
|
711
823
|
@@index([hiring_manager_id])
|
|
@@ -725,7 +837,6 @@ model JobDescriptionData {
|
|
|
725
837
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
726
838
|
|
|
727
839
|
@@unique([job_description_id, key])
|
|
728
|
-
@@index([created_at])
|
|
729
840
|
}
|
|
730
841
|
|
|
731
842
|
model Message {
|
|
@@ -780,6 +891,7 @@ model OngoingEvaluation {
|
|
|
780
891
|
job_description_id String
|
|
781
892
|
evaluation_plan_id String
|
|
782
893
|
interview_id String? @unique
|
|
894
|
+
assignment_id String? @unique
|
|
783
895
|
status OngoingEvaluationStatus?
|
|
784
896
|
state OngoingEvaluationState? @default(NOT_STARTED)
|
|
785
897
|
round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
|
|
@@ -792,6 +904,7 @@ model OngoingEvaluation {
|
|
|
792
904
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
793
905
|
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
794
906
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
907
|
+
assignment Assignment?
|
|
795
908
|
created_at DateTime @default(now())
|
|
796
909
|
updated_at DateTime @updatedAt
|
|
797
910
|
created_by String
|
|
@@ -835,93 +948,33 @@ model Organisation {
|
|
|
835
948
|
address String
|
|
836
949
|
company_values Json[]
|
|
837
950
|
|
|
838
|
-
interviewers
|
|
839
|
-
created_at
|
|
840
|
-
updated_at
|
|
841
|
-
created_by
|
|
842
|
-
updated_by
|
|
843
|
-
is_active
|
|
844
|
-
alias
|
|
845
|
-
logo
|
|
846
|
-
applications
|
|
847
|
-
user_roles
|
|
848
|
-
job_descriptions
|
|
849
|
-
assessment_library
|
|
850
|
-
assignment_library
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
fit_check
|
|
854
|
-
resumes
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
951
|
+
interviewers User[]
|
|
952
|
+
created_at DateTime @default(now())
|
|
953
|
+
updated_at DateTime @updatedAt
|
|
954
|
+
created_by String
|
|
955
|
+
updated_by String
|
|
956
|
+
is_active Boolean @default(true)
|
|
957
|
+
alias String? @unique
|
|
958
|
+
logo String?
|
|
959
|
+
applications Application[]
|
|
960
|
+
user_roles UserRole[]
|
|
961
|
+
job_descriptions JobDescription[]
|
|
962
|
+
assessment_library AssessmentLibrary[]
|
|
963
|
+
assignment_library AssignmentLibrary[]
|
|
964
|
+
interviews Interview[]
|
|
965
|
+
assignments Assignment[]
|
|
966
|
+
fit_check FitCheck[] // one-to-many link
|
|
967
|
+
resumes Resume[] // one-to-many link
|
|
968
|
+
approvals Approval[] // one-to-many link
|
|
969
|
+
suggestions Suggestion[]
|
|
970
|
+
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
971
|
+
actions Action[]
|
|
972
|
+
integration_credentials IntegrationCredential[]
|
|
973
|
+
zoho_sync_mappings ZohoSyncMapping[]
|
|
860
974
|
|
|
861
975
|
@@index([name])
|
|
862
976
|
}
|
|
863
977
|
|
|
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
978
|
model Permission {
|
|
926
979
|
id String @id @default(uuid())
|
|
927
980
|
permissions String[] @default([])
|
|
@@ -1093,11 +1146,10 @@ model Suggestion {
|
|
|
1093
1146
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
1094
1147
|
|
|
1095
1148
|
@@index([interview_id])
|
|
1096
|
-
@@index([transcript_id])
|
|
1097
1149
|
}
|
|
1098
1150
|
|
|
1099
1151
|
model Transcript {
|
|
1100
|
-
id String
|
|
1152
|
+
id String @id @default(uuid())
|
|
1101
1153
|
interview_id String?
|
|
1102
1154
|
suggestion_id String?
|
|
1103
1155
|
intermediate_feedback_id String?
|
|
@@ -1106,17 +1158,16 @@ model Transcript {
|
|
|
1106
1158
|
candidate_timestamp DateTime?
|
|
1107
1159
|
interviewer String
|
|
1108
1160
|
candidate String
|
|
1109
|
-
order_no Int
|
|
1110
|
-
created_at DateTime
|
|
1111
|
-
updated_at DateTime
|
|
1161
|
+
order_no Int @default(autoincrement())
|
|
1162
|
+
created_at DateTime @default(now())
|
|
1163
|
+
updated_at DateTime @updatedAt
|
|
1112
1164
|
created_by String
|
|
1113
1165
|
updated_by String
|
|
1114
|
-
is_active Boolean
|
|
1166
|
+
is_active Boolean @default(true)
|
|
1115
1167
|
// Relations
|
|
1116
|
-
interview Interview?
|
|
1117
|
-
suggestion Suggestion?
|
|
1118
|
-
|
|
1119
|
-
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1168
|
+
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
|
|
1169
|
+
suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
|
|
1170
|
+
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1120
1171
|
|
|
1121
1172
|
@@unique([interview_id, order_no])
|
|
1122
1173
|
@@index([interview_id])
|
|
@@ -1154,7 +1205,6 @@ model User {
|
|
|
1154
1205
|
job_description JobDescription[]
|
|
1155
1206
|
hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
|
|
1156
1207
|
approvals Approval[]
|
|
1157
|
-
panelist Panelist?
|
|
1158
1208
|
sent_messages Message[] @relation("Sent Messages")
|
|
1159
1209
|
received_messages Message[] @relation("Received Messages")
|
|
1160
1210
|
profile_created Boolean
|
|
@@ -1165,12 +1215,16 @@ model User {
|
|
|
1165
1215
|
assessment_results Assessment[]
|
|
1166
1216
|
candidate_assessments Assessment[] @relation("CandidateAssessments")
|
|
1167
1217
|
reviewer_assessments Assessment[] @relation("ReviewerAssessments")
|
|
1218
|
+
candidate_assignments Assignment[] @relation("CandidateAssignments")
|
|
1219
|
+
reviewer_assignments Assignment[] @relation("AssignmentReviewer")
|
|
1168
1220
|
candidateResponses CandidateQuestionResponse[]
|
|
1169
1221
|
questions Question[]
|
|
1170
1222
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
1223
|
+
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
1171
1224
|
actions Action[]
|
|
1172
1225
|
calendly Calendly?
|
|
1173
1226
|
google Google?
|
|
1227
|
+
fitChecks FitCheck[]
|
|
1174
1228
|
|
|
1175
1229
|
name String?
|
|
1176
1230
|
phone String?
|