@adaptware/eagles-db 0.1.60 → 0.1.66
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 +51 -18
- package/client/index-browser.js +48 -15
- package/client/index.d.ts +23485 -17875
- package/client/index.js +51 -18
- package/client/package.json +1 -1
- package/client/schema.prisma +83 -16
- package/client/wasm.js +48 -15
- package/package.json +1 -1
- package/prisma/schema/CandidateQuestionResponse.prisma +4 -1
- package/prisma/schema/assessment.prisma +11 -15
- package/prisma/schema/integration.prisma +1 -0
- package/prisma/schema/interview.prisma +1 -0
- package/prisma/schema/jobDescription.prisma +3 -0
- package/prisma/schema/jobProfile.prisma +56 -0
- package/prisma/schema/ongoingEvaluation.prisma +2 -0
- package/prisma/schema/organisation.prisma +25 -23
- package/prisma/schema/user.prisma +2 -0
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
model CandidateQuestionResponse {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
3
4
|
question_id String
|
|
4
5
|
candidate_id String
|
|
5
6
|
assessment_id String
|
|
7
|
+
//data
|
|
6
8
|
response String
|
|
7
9
|
score Float?
|
|
10
|
+
/// Audit fields
|
|
8
11
|
created_by String
|
|
9
12
|
updated_by String
|
|
10
13
|
created_at DateTime @default(now())
|
|
@@ -15,8 +18,8 @@ model CandidateQuestionResponse {
|
|
|
15
18
|
assessment Assessment @relation(fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
16
19
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
17
20
|
|
|
21
|
+
@@unique([assessment_id, question_id, candidate_id])
|
|
18
22
|
@@index([candidate_id])
|
|
19
|
-
@@index([question_id])
|
|
20
23
|
@@index([assessment_id])
|
|
21
24
|
}
|
|
22
25
|
|
|
@@ -159,26 +162,21 @@ model Approval {
|
|
|
159
162
|
organisation Organisation @relation(fields: [organisaton_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
enum AssessmentStatus {
|
|
163
|
-
SCHEDULED // Assessment has been created and scheduled
|
|
164
|
-
IN_PROGRESS // Candidate is currently giving the assessment
|
|
165
|
-
COMPLETED // Assessment completed by candidate
|
|
166
|
-
CANCELLED // Assessment cancelled by admin or system
|
|
167
|
-
RESCHEDULED // Assessment rescheduled to a new time
|
|
168
|
-
NO_SHOW // Candidate failed to take the assessment
|
|
169
|
-
EVALUATION_PENDING // Waiting for manual/AI review of answers
|
|
170
|
-
EVALUATED // Final evaluation completed and locked
|
|
171
|
-
}
|
|
172
|
-
|
|
173
165
|
model Assessment {
|
|
174
166
|
id String @id @default(uuid())
|
|
167
|
+
//foreign keys
|
|
168
|
+
organisation_id String?
|
|
175
169
|
assessment_library_id String
|
|
176
170
|
candidate_id String
|
|
177
171
|
reviewer_id String?
|
|
172
|
+
//data
|
|
178
173
|
score Float?
|
|
179
|
-
feedback
|
|
180
|
-
scheduled_start_time DateTime?
|
|
181
|
-
|
|
174
|
+
feedback Json?
|
|
175
|
+
scheduled_start_time DateTime?
|
|
176
|
+
scheduled_end_time DateTime?
|
|
177
|
+
actual_start_time DateTime?
|
|
178
|
+
actual_end_time DateTime?
|
|
179
|
+
/// Audit fields
|
|
182
180
|
created_at DateTime @default(now())
|
|
183
181
|
updated_at DateTime @updatedAt
|
|
184
182
|
created_by String
|
|
@@ -190,9 +188,10 @@ model Assessment {
|
|
|
190
188
|
reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
191
189
|
questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
|
|
192
190
|
candidateResponse CandidateQuestionResponse[]
|
|
193
|
-
|
|
191
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
194
192
|
User User? @relation(fields: [userId], references: [id])
|
|
195
193
|
userId String?
|
|
194
|
+
ongoingEvaluation OngoingEvaluation?
|
|
196
195
|
|
|
197
196
|
@@unique([assessment_library_id, candidate_id])
|
|
198
197
|
@@index([assessment_library_id])
|
|
@@ -594,6 +593,7 @@ model Google {
|
|
|
594
593
|
enum IntegrationProvider {
|
|
595
594
|
NAUKRI
|
|
596
595
|
ZOHO_RECRUIT
|
|
596
|
+
LINKEDIN
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
enum IntegrationAuthType {
|
|
@@ -732,6 +732,7 @@ model Interview {
|
|
|
732
732
|
interviewer_feedback Json?
|
|
733
733
|
section_feedback Json[]
|
|
734
734
|
interview_preparation Json?
|
|
735
|
+
final_feedback Json?
|
|
735
736
|
/// Audit fields
|
|
736
737
|
created_at DateTime @default(now())
|
|
737
738
|
updated_at DateTime @updatedAt
|
|
@@ -803,6 +804,8 @@ model JobDescription {
|
|
|
803
804
|
updated_by String
|
|
804
805
|
is_active Boolean @default(true)
|
|
805
806
|
openings Int @default(1)
|
|
807
|
+
job_profile_id String?
|
|
808
|
+
job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
806
809
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
807
810
|
applications Application[]
|
|
808
811
|
interviews Interview[]
|
|
@@ -822,6 +825,7 @@ model JobDescription {
|
|
|
822
825
|
|
|
823
826
|
@@index([organisation_id])
|
|
824
827
|
@@index([hiring_manager_id])
|
|
828
|
+
@@index([job_profile_id])
|
|
825
829
|
}
|
|
826
830
|
|
|
827
831
|
model JobDescriptionData {
|
|
@@ -840,6 +844,63 @@ model JobDescriptionData {
|
|
|
840
844
|
@@unique([job_description_id, key])
|
|
841
845
|
}
|
|
842
846
|
|
|
847
|
+
enum JobProfileStatus {
|
|
848
|
+
DRAFT
|
|
849
|
+
INTAKE_SENT
|
|
850
|
+
INTAKE_IN_PROGRESS
|
|
851
|
+
COMPLETE
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
model JobProfile {
|
|
855
|
+
id String @id @default(uuid())
|
|
856
|
+
organisation_id String
|
|
857
|
+
created_by String
|
|
858
|
+
assigned_to String?
|
|
859
|
+
status JobProfileStatus @default(DRAFT)
|
|
860
|
+
|
|
861
|
+
// Basics
|
|
862
|
+
title String?
|
|
863
|
+
role_type String?
|
|
864
|
+
work_arrangement String?
|
|
865
|
+
location String?
|
|
866
|
+
experience_min String?
|
|
867
|
+
reporting String?
|
|
868
|
+
comp_range String?
|
|
869
|
+
comp_benchmark String?
|
|
870
|
+
|
|
871
|
+
// Requirements (structured from AI conversation)
|
|
872
|
+
responsibilities Json?
|
|
873
|
+
deliverables Json?
|
|
874
|
+
must_have_skills Json?
|
|
875
|
+
nice_to_have_skills Json?
|
|
876
|
+
dealbreakers Json?
|
|
877
|
+
culture Json?
|
|
878
|
+
success_metrics Json?
|
|
879
|
+
|
|
880
|
+
// Competencies
|
|
881
|
+
competencies Json?
|
|
882
|
+
|
|
883
|
+
// Conversation state
|
|
884
|
+
conversation_history Json?
|
|
885
|
+
current_phase String?
|
|
886
|
+
orion_execution_id String?
|
|
887
|
+
|
|
888
|
+
// Audit
|
|
889
|
+
created_at DateTime @default(now())
|
|
890
|
+
updated_at DateTime @updatedAt
|
|
891
|
+
is_active Boolean @default(true)
|
|
892
|
+
|
|
893
|
+
// Relations
|
|
894
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
895
|
+
creator User @relation("ProfileCreator", fields: [created_by], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
896
|
+
assignee User? @relation("ProfileAssignee", fields: [assigned_to], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
897
|
+
job_descriptions JobDescription[]
|
|
898
|
+
|
|
899
|
+
@@index([organisation_id])
|
|
900
|
+
@@index([assigned_to])
|
|
901
|
+
@@index([created_by])
|
|
902
|
+
}
|
|
903
|
+
|
|
843
904
|
model Message {
|
|
844
905
|
id String @id @default(uuid())
|
|
845
906
|
sender_id String
|
|
@@ -893,6 +954,7 @@ model OngoingEvaluation {
|
|
|
893
954
|
evaluation_plan_id String
|
|
894
955
|
interview_id String? @unique
|
|
895
956
|
assignment_id String? @unique
|
|
957
|
+
assessment_id String? @unique
|
|
896
958
|
status OngoingEvaluationStatus?
|
|
897
959
|
state OngoingEvaluationState? @default(NOT_STARTED)
|
|
898
960
|
round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
|
|
@@ -906,6 +968,7 @@ model OngoingEvaluation {
|
|
|
906
968
|
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
907
969
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
908
970
|
assignment Assignment?
|
|
971
|
+
assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
909
972
|
created_at DateTime @default(now())
|
|
910
973
|
updated_at DateTime @updatedAt
|
|
911
974
|
created_by String
|
|
@@ -960,6 +1023,7 @@ model Organisation {
|
|
|
960
1023
|
applications Application[]
|
|
961
1024
|
user_roles UserRole[]
|
|
962
1025
|
job_descriptions JobDescription[]
|
|
1026
|
+
job_profiles JobProfile[]
|
|
963
1027
|
assessment_library AssessmentLibrary[]
|
|
964
1028
|
assignment_library AssignmentLibrary[]
|
|
965
1029
|
interviews Interview[]
|
|
@@ -972,6 +1036,7 @@ model Organisation {
|
|
|
972
1036
|
actions Action[]
|
|
973
1037
|
integration_credentials IntegrationCredential[]
|
|
974
1038
|
zoho_sync_mappings ZohoSyncMapping[]
|
|
1039
|
+
assessments Assessment[]
|
|
975
1040
|
|
|
976
1041
|
@@index([name])
|
|
977
1042
|
}
|
|
@@ -1226,6 +1291,8 @@ model User {
|
|
|
1226
1291
|
calendly Calendly?
|
|
1227
1292
|
google Google?
|
|
1228
1293
|
fitChecks FitCheck[]
|
|
1294
|
+
created_job_profiles JobProfile[] @relation("ProfileCreator")
|
|
1295
|
+
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
1229
1296
|
|
|
1230
1297
|
name String?
|
|
1231
1298
|
phone String?
|
package/client/wasm.js
CHANGED
|
@@ -209,19 +209,21 @@ exports.Prisma.ApprovalScalarFieldEnum = {
|
|
|
209
209
|
|
|
210
210
|
exports.Prisma.AssessmentScalarFieldEnum = {
|
|
211
211
|
id: 'id',
|
|
212
|
+
organisation_id: 'organisation_id',
|
|
212
213
|
assessment_library_id: 'assessment_library_id',
|
|
213
214
|
candidate_id: 'candidate_id',
|
|
214
215
|
reviewer_id: 'reviewer_id',
|
|
215
216
|
score: 'score',
|
|
216
217
|
feedback: 'feedback',
|
|
217
218
|
scheduled_start_time: 'scheduled_start_time',
|
|
218
|
-
|
|
219
|
+
scheduled_end_time: 'scheduled_end_time',
|
|
220
|
+
actual_start_time: 'actual_start_time',
|
|
221
|
+
actual_end_time: 'actual_end_time',
|
|
219
222
|
created_at: 'created_at',
|
|
220
223
|
updated_at: 'updated_at',
|
|
221
224
|
created_by: 'created_by',
|
|
222
225
|
updated_by: 'updated_by',
|
|
223
226
|
is_active: 'is_active',
|
|
224
|
-
panelistId: 'panelistId',
|
|
225
227
|
userId: 'userId'
|
|
226
228
|
};
|
|
227
229
|
|
|
@@ -515,6 +517,7 @@ exports.Prisma.InterviewScalarFieldEnum = {
|
|
|
515
517
|
interviewer_feedback: 'interviewer_feedback',
|
|
516
518
|
section_feedback: 'section_feedback',
|
|
517
519
|
interview_preparation: 'interview_preparation',
|
|
520
|
+
final_feedback: 'final_feedback',
|
|
518
521
|
created_at: 'created_at',
|
|
519
522
|
updated_at: 'updated_at',
|
|
520
523
|
created_by: 'created_by',
|
|
@@ -552,7 +555,8 @@ exports.Prisma.JobDescriptionScalarFieldEnum = {
|
|
|
552
555
|
created_by: 'created_by',
|
|
553
556
|
updated_by: 'updated_by',
|
|
554
557
|
is_active: 'is_active',
|
|
555
|
-
openings: 'openings'
|
|
558
|
+
openings: 'openings',
|
|
559
|
+
job_profile_id: 'job_profile_id'
|
|
556
560
|
};
|
|
557
561
|
|
|
558
562
|
exports.Prisma.JobDescriptionDataScalarFieldEnum = {
|
|
@@ -567,6 +571,36 @@ exports.Prisma.JobDescriptionDataScalarFieldEnum = {
|
|
|
567
571
|
is_active: 'is_active'
|
|
568
572
|
};
|
|
569
573
|
|
|
574
|
+
exports.Prisma.JobProfileScalarFieldEnum = {
|
|
575
|
+
id: 'id',
|
|
576
|
+
organisation_id: 'organisation_id',
|
|
577
|
+
created_by: 'created_by',
|
|
578
|
+
assigned_to: 'assigned_to',
|
|
579
|
+
status: 'status',
|
|
580
|
+
title: 'title',
|
|
581
|
+
role_type: 'role_type',
|
|
582
|
+
work_arrangement: 'work_arrangement',
|
|
583
|
+
location: 'location',
|
|
584
|
+
experience_min: 'experience_min',
|
|
585
|
+
reporting: 'reporting',
|
|
586
|
+
comp_range: 'comp_range',
|
|
587
|
+
comp_benchmark: 'comp_benchmark',
|
|
588
|
+
responsibilities: 'responsibilities',
|
|
589
|
+
deliverables: 'deliverables',
|
|
590
|
+
must_have_skills: 'must_have_skills',
|
|
591
|
+
nice_to_have_skills: 'nice_to_have_skills',
|
|
592
|
+
dealbreakers: 'dealbreakers',
|
|
593
|
+
culture: 'culture',
|
|
594
|
+
success_metrics: 'success_metrics',
|
|
595
|
+
competencies: 'competencies',
|
|
596
|
+
conversation_history: 'conversation_history',
|
|
597
|
+
current_phase: 'current_phase',
|
|
598
|
+
orion_execution_id: 'orion_execution_id',
|
|
599
|
+
created_at: 'created_at',
|
|
600
|
+
updated_at: 'updated_at',
|
|
601
|
+
is_active: 'is_active'
|
|
602
|
+
};
|
|
603
|
+
|
|
570
604
|
exports.Prisma.MessageScalarFieldEnum = {
|
|
571
605
|
id: 'id',
|
|
572
606
|
sender_id: 'sender_id',
|
|
@@ -589,6 +623,7 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
|
|
|
589
623
|
evaluation_plan_id: 'evaluation_plan_id',
|
|
590
624
|
interview_id: 'interview_id',
|
|
591
625
|
assignment_id: 'assignment_id',
|
|
626
|
+
assessment_id: 'assessment_id',
|
|
592
627
|
status: 'status',
|
|
593
628
|
state: 'state',
|
|
594
629
|
round_status: 'round_status',
|
|
@@ -848,17 +883,6 @@ exports.FitCheckStatus = exports.$Enums.FitCheckStatus = {
|
|
|
848
883
|
NOT_RECOMMENDED: 'NOT_RECOMMENDED'
|
|
849
884
|
};
|
|
850
885
|
|
|
851
|
-
exports.AssessmentStatus = exports.$Enums.AssessmentStatus = {
|
|
852
|
-
SCHEDULED: 'SCHEDULED',
|
|
853
|
-
IN_PROGRESS: 'IN_PROGRESS',
|
|
854
|
-
COMPLETED: 'COMPLETED',
|
|
855
|
-
CANCELLED: 'CANCELLED',
|
|
856
|
-
RESCHEDULED: 'RESCHEDULED',
|
|
857
|
-
NO_SHOW: 'NO_SHOW',
|
|
858
|
-
EVALUATION_PENDING: 'EVALUATION_PENDING',
|
|
859
|
-
EVALUATED: 'EVALUATED'
|
|
860
|
-
};
|
|
861
|
-
|
|
862
886
|
exports.AssessmentCategory = exports.$Enums.AssessmentCategory = {
|
|
863
887
|
MCQ: 'MCQ',
|
|
864
888
|
COMPETENCY: 'COMPETENCY',
|
|
@@ -922,7 +946,8 @@ exports.EvaluationPlanType = exports.$Enums.EvaluationPlanType = {
|
|
|
922
946
|
|
|
923
947
|
exports.IntegrationProvider = exports.$Enums.IntegrationProvider = {
|
|
924
948
|
NAUKRI: 'NAUKRI',
|
|
925
|
-
ZOHO_RECRUIT: 'ZOHO_RECRUIT'
|
|
949
|
+
ZOHO_RECRUIT: 'ZOHO_RECRUIT',
|
|
950
|
+
LINKEDIN: 'LINKEDIN'
|
|
926
951
|
};
|
|
927
952
|
|
|
928
953
|
exports.IntegrationAuthType = exports.$Enums.IntegrationAuthType = {
|
|
@@ -974,6 +999,13 @@ exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
|
|
|
974
999
|
CLOSED: 'CLOSED'
|
|
975
1000
|
};
|
|
976
1001
|
|
|
1002
|
+
exports.JobProfileStatus = exports.$Enums.JobProfileStatus = {
|
|
1003
|
+
DRAFT: 'DRAFT',
|
|
1004
|
+
INTAKE_SENT: 'INTAKE_SENT',
|
|
1005
|
+
INTAKE_IN_PROGRESS: 'INTAKE_IN_PROGRESS',
|
|
1006
|
+
COMPLETE: 'COMPLETE'
|
|
1007
|
+
};
|
|
1008
|
+
|
|
977
1009
|
exports.OngoingEvaluationStatus = exports.$Enums.OngoingEvaluationStatus = {
|
|
978
1010
|
LOCKED: 'LOCKED',
|
|
979
1011
|
ACTION_REQUIRED: 'ACTION_REQUIRED',
|
|
@@ -1063,6 +1095,7 @@ exports.Prisma.ModelName = {
|
|
|
1063
1095
|
InterviewNotes: 'InterviewNotes',
|
|
1064
1096
|
JobDescription: 'JobDescription',
|
|
1065
1097
|
JobDescriptionData: 'JobDescriptionData',
|
|
1098
|
+
JobProfile: 'JobProfile',
|
|
1066
1099
|
Message: 'Message',
|
|
1067
1100
|
OngoingEvaluation: 'OngoingEvaluation',
|
|
1068
1101
|
Organisation: 'Organisation',
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
model CandidateQuestionResponse {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
3
4
|
question_id String
|
|
4
5
|
candidate_id String
|
|
5
6
|
assessment_id String
|
|
7
|
+
//data
|
|
6
8
|
response String
|
|
7
9
|
score Float?
|
|
10
|
+
/// Audit fields
|
|
8
11
|
created_by String
|
|
9
12
|
updated_by String
|
|
10
13
|
created_at DateTime @default(now())
|
|
@@ -15,7 +18,7 @@ model CandidateQuestionResponse {
|
|
|
15
18
|
assessment Assessment @relation(fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
16
19
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
17
20
|
|
|
21
|
+
@@unique([assessment_id, question_id, candidate_id])
|
|
18
22
|
@@index([candidate_id])
|
|
19
|
-
@@index([question_id])
|
|
20
23
|
@@index([assessment_id])
|
|
21
24
|
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
enum AssessmentStatus {
|
|
2
|
-
SCHEDULED // Assessment has been created and scheduled
|
|
3
|
-
IN_PROGRESS // Candidate is currently giving the assessment
|
|
4
|
-
COMPLETED // Assessment completed by candidate
|
|
5
|
-
CANCELLED // Assessment cancelled by admin or system
|
|
6
|
-
RESCHEDULED // Assessment rescheduled to a new time
|
|
7
|
-
NO_SHOW // Candidate failed to take the assessment
|
|
8
|
-
EVALUATION_PENDING // Waiting for manual/AI review of answers
|
|
9
|
-
EVALUATED // Final evaluation completed and locked
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
model Assessment {
|
|
13
2
|
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
4
|
+
organisation_id String?
|
|
14
5
|
assessment_library_id String
|
|
15
6
|
candidate_id String
|
|
16
7
|
reviewer_id String?
|
|
8
|
+
//data
|
|
17
9
|
score Float?
|
|
18
|
-
feedback
|
|
19
|
-
scheduled_start_time DateTime?
|
|
20
|
-
|
|
10
|
+
feedback Json?
|
|
11
|
+
scheduled_start_time DateTime?
|
|
12
|
+
scheduled_end_time DateTime?
|
|
13
|
+
actual_start_time DateTime?
|
|
14
|
+
actual_end_time DateTime?
|
|
15
|
+
/// Audit fields
|
|
21
16
|
created_at DateTime @default(now())
|
|
22
17
|
updated_at DateTime @updatedAt
|
|
23
18
|
created_by String
|
|
@@ -29,9 +24,10 @@ model Assessment {
|
|
|
29
24
|
reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
30
25
|
questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
|
|
31
26
|
candidateResponse CandidateQuestionResponse[]
|
|
32
|
-
|
|
27
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
33
28
|
User User? @relation(fields: [userId], references: [id])
|
|
34
29
|
userId String?
|
|
30
|
+
ongoingEvaluation OngoingEvaluation?
|
|
35
31
|
|
|
36
32
|
@@unique([assessment_library_id, candidate_id])
|
|
37
33
|
@@index([assessment_library_id])
|
|
@@ -25,6 +25,8 @@ model JobDescription {
|
|
|
25
25
|
updated_by String
|
|
26
26
|
is_active Boolean @default(true)
|
|
27
27
|
openings Int @default(1)
|
|
28
|
+
job_profile_id String?
|
|
29
|
+
job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
28
30
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
29
31
|
applications Application[]
|
|
30
32
|
interviews Interview[]
|
|
@@ -44,4 +46,5 @@ model JobDescription {
|
|
|
44
46
|
|
|
45
47
|
@@index([organisation_id])
|
|
46
48
|
@@index([hiring_manager_id])
|
|
49
|
+
@@index([job_profile_id])
|
|
47
50
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
enum JobProfileStatus {
|
|
2
|
+
DRAFT
|
|
3
|
+
INTAKE_SENT
|
|
4
|
+
INTAKE_IN_PROGRESS
|
|
5
|
+
COMPLETE
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
model JobProfile {
|
|
9
|
+
id String @id @default(uuid())
|
|
10
|
+
organisation_id String
|
|
11
|
+
created_by String
|
|
12
|
+
assigned_to String?
|
|
13
|
+
status JobProfileStatus @default(DRAFT)
|
|
14
|
+
|
|
15
|
+
// Basics
|
|
16
|
+
title String?
|
|
17
|
+
role_type String?
|
|
18
|
+
work_arrangement String?
|
|
19
|
+
location String?
|
|
20
|
+
experience_min String?
|
|
21
|
+
reporting String?
|
|
22
|
+
comp_range String?
|
|
23
|
+
comp_benchmark String?
|
|
24
|
+
|
|
25
|
+
// Requirements (structured from AI conversation)
|
|
26
|
+
responsibilities Json?
|
|
27
|
+
deliverables Json?
|
|
28
|
+
must_have_skills Json?
|
|
29
|
+
nice_to_have_skills Json?
|
|
30
|
+
dealbreakers Json?
|
|
31
|
+
culture Json?
|
|
32
|
+
success_metrics Json?
|
|
33
|
+
|
|
34
|
+
// Competencies
|
|
35
|
+
competencies Json?
|
|
36
|
+
|
|
37
|
+
// Conversation state
|
|
38
|
+
conversation_history Json?
|
|
39
|
+
current_phase String?
|
|
40
|
+
orion_execution_id String?
|
|
41
|
+
|
|
42
|
+
// Audit
|
|
43
|
+
created_at DateTime @default(now())
|
|
44
|
+
updated_at DateTime @updatedAt
|
|
45
|
+
is_active Boolean @default(true)
|
|
46
|
+
|
|
47
|
+
// Relations
|
|
48
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
49
|
+
creator User @relation("ProfileCreator", fields: [created_by], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
50
|
+
assignee User? @relation("ProfileAssignee", fields: [assigned_to], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
51
|
+
job_descriptions JobDescription[]
|
|
52
|
+
|
|
53
|
+
@@index([organisation_id])
|
|
54
|
+
@@index([assigned_to])
|
|
55
|
+
@@index([created_by])
|
|
56
|
+
}
|
|
@@ -35,6 +35,7 @@ model OngoingEvaluation {
|
|
|
35
35
|
evaluation_plan_id String
|
|
36
36
|
interview_id String? @unique
|
|
37
37
|
assignment_id String? @unique
|
|
38
|
+
assessment_id String? @unique
|
|
38
39
|
status OngoingEvaluationStatus?
|
|
39
40
|
state OngoingEvaluationState? @default(NOT_STARTED)
|
|
40
41
|
round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
|
|
@@ -48,6 +49,7 @@ model OngoingEvaluation {
|
|
|
48
49
|
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
49
50
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
50
51
|
assignment Assignment?
|
|
52
|
+
assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
51
53
|
created_at DateTime @default(now())
|
|
52
54
|
updated_at DateTime @updatedAt
|
|
53
55
|
created_by String
|
|
@@ -17,29 +17,31 @@ model Organisation {
|
|
|
17
17
|
address String
|
|
18
18
|
company_values Json[]
|
|
19
19
|
|
|
20
|
-
interviewers
|
|
21
|
-
created_at
|
|
22
|
-
updated_at
|
|
23
|
-
created_by
|
|
24
|
-
updated_by
|
|
25
|
-
is_active
|
|
26
|
-
alias
|
|
27
|
-
logo
|
|
28
|
-
applications
|
|
29
|
-
user_roles
|
|
30
|
-
job_descriptions
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
20
|
+
interviewers User[]
|
|
21
|
+
created_at DateTime @default(now())
|
|
22
|
+
updated_at DateTime @updatedAt
|
|
23
|
+
created_by String
|
|
24
|
+
updated_by String
|
|
25
|
+
is_active Boolean @default(true)
|
|
26
|
+
alias String? @unique
|
|
27
|
+
logo String?
|
|
28
|
+
applications Application[]
|
|
29
|
+
user_roles UserRole[]
|
|
30
|
+
job_descriptions JobDescription[]
|
|
31
|
+
job_profiles JobProfile[]
|
|
32
|
+
assessment_library AssessmentLibrary[]
|
|
33
|
+
assignment_library AssignmentLibrary[]
|
|
34
|
+
interviews Interview[]
|
|
35
|
+
assignments Assignment[]
|
|
36
|
+
fit_check FitCheck[] // one-to-many link
|
|
37
|
+
resumes Resume[] // one-to-many link
|
|
38
|
+
approvals Approval[] // one-to-many link
|
|
39
|
+
suggestions Suggestion[]
|
|
40
|
+
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
41
|
+
actions Action[]
|
|
42
|
+
integration_credentials IntegrationCredential[]
|
|
43
|
+
zoho_sync_mappings ZohoSyncMapping[]
|
|
44
|
+
assessments Assessment[]
|
|
43
45
|
|
|
44
46
|
@@index([name])
|
|
45
47
|
}
|