@adaptware/eagles-db 0.1.61 → 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 +52 -20
- package/client/index-browser.js +47 -15
- package/client/index.d.ts +23395 -17871
- package/client/index.js +52 -20
- package/client/package.json +1 -1
- package/client/schema.prisma +82 -16
- package/client/wasm.js +47 -15
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/CandidateQuestionResponse.prisma +4 -1
- package/prisma/schema/assessment.prisma +11 -15
- package/prisma/schema/integration.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/libquery_engine-darwin.dylib.node +0 -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 {
|
|
@@ -804,6 +804,8 @@ model JobDescription {
|
|
|
804
804
|
updated_by String
|
|
805
805
|
is_active Boolean @default(true)
|
|
806
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)
|
|
807
809
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
808
810
|
applications Application[]
|
|
809
811
|
interviews Interview[]
|
|
@@ -823,6 +825,7 @@ model JobDescription {
|
|
|
823
825
|
|
|
824
826
|
@@index([organisation_id])
|
|
825
827
|
@@index([hiring_manager_id])
|
|
828
|
+
@@index([job_profile_id])
|
|
826
829
|
}
|
|
827
830
|
|
|
828
831
|
model JobDescriptionData {
|
|
@@ -841,6 +844,63 @@ model JobDescriptionData {
|
|
|
841
844
|
@@unique([job_description_id, key])
|
|
842
845
|
}
|
|
843
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
|
+
|
|
844
904
|
model Message {
|
|
845
905
|
id String @id @default(uuid())
|
|
846
906
|
sender_id String
|
|
@@ -894,6 +954,7 @@ model OngoingEvaluation {
|
|
|
894
954
|
evaluation_plan_id String
|
|
895
955
|
interview_id String? @unique
|
|
896
956
|
assignment_id String? @unique
|
|
957
|
+
assessment_id String? @unique
|
|
897
958
|
status OngoingEvaluationStatus?
|
|
898
959
|
state OngoingEvaluationState? @default(NOT_STARTED)
|
|
899
960
|
round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
|
|
@@ -907,6 +968,7 @@ model OngoingEvaluation {
|
|
|
907
968
|
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
908
969
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
909
970
|
assignment Assignment?
|
|
971
|
+
assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
910
972
|
created_at DateTime @default(now())
|
|
911
973
|
updated_at DateTime @updatedAt
|
|
912
974
|
created_by String
|
|
@@ -961,6 +1023,7 @@ model Organisation {
|
|
|
961
1023
|
applications Application[]
|
|
962
1024
|
user_roles UserRole[]
|
|
963
1025
|
job_descriptions JobDescription[]
|
|
1026
|
+
job_profiles JobProfile[]
|
|
964
1027
|
assessment_library AssessmentLibrary[]
|
|
965
1028
|
assignment_library AssignmentLibrary[]
|
|
966
1029
|
interviews Interview[]
|
|
@@ -973,6 +1036,7 @@ model Organisation {
|
|
|
973
1036
|
actions Action[]
|
|
974
1037
|
integration_credentials IntegrationCredential[]
|
|
975
1038
|
zoho_sync_mappings ZohoSyncMapping[]
|
|
1039
|
+
assessments Assessment[]
|
|
976
1040
|
|
|
977
1041
|
@@index([name])
|
|
978
1042
|
}
|
|
@@ -1227,6 +1291,8 @@ model User {
|
|
|
1227
1291
|
calendly Calendly?
|
|
1228
1292
|
google Google?
|
|
1229
1293
|
fitChecks FitCheck[]
|
|
1294
|
+
created_job_profiles JobProfile[] @relation("ProfileCreator")
|
|
1295
|
+
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
1230
1296
|
|
|
1231
1297
|
name String?
|
|
1232
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
|
|
|
@@ -553,7 +555,8 @@ exports.Prisma.JobDescriptionScalarFieldEnum = {
|
|
|
553
555
|
created_by: 'created_by',
|
|
554
556
|
updated_by: 'updated_by',
|
|
555
557
|
is_active: 'is_active',
|
|
556
|
-
openings: 'openings'
|
|
558
|
+
openings: 'openings',
|
|
559
|
+
job_profile_id: 'job_profile_id'
|
|
557
560
|
};
|
|
558
561
|
|
|
559
562
|
exports.Prisma.JobDescriptionDataScalarFieldEnum = {
|
|
@@ -568,6 +571,36 @@ exports.Prisma.JobDescriptionDataScalarFieldEnum = {
|
|
|
568
571
|
is_active: 'is_active'
|
|
569
572
|
};
|
|
570
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
|
+
|
|
571
604
|
exports.Prisma.MessageScalarFieldEnum = {
|
|
572
605
|
id: 'id',
|
|
573
606
|
sender_id: 'sender_id',
|
|
@@ -590,6 +623,7 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
|
|
|
590
623
|
evaluation_plan_id: 'evaluation_plan_id',
|
|
591
624
|
interview_id: 'interview_id',
|
|
592
625
|
assignment_id: 'assignment_id',
|
|
626
|
+
assessment_id: 'assessment_id',
|
|
593
627
|
status: 'status',
|
|
594
628
|
state: 'state',
|
|
595
629
|
round_status: 'round_status',
|
|
@@ -849,17 +883,6 @@ exports.FitCheckStatus = exports.$Enums.FitCheckStatus = {
|
|
|
849
883
|
NOT_RECOMMENDED: 'NOT_RECOMMENDED'
|
|
850
884
|
};
|
|
851
885
|
|
|
852
|
-
exports.AssessmentStatus = exports.$Enums.AssessmentStatus = {
|
|
853
|
-
SCHEDULED: 'SCHEDULED',
|
|
854
|
-
IN_PROGRESS: 'IN_PROGRESS',
|
|
855
|
-
COMPLETED: 'COMPLETED',
|
|
856
|
-
CANCELLED: 'CANCELLED',
|
|
857
|
-
RESCHEDULED: 'RESCHEDULED',
|
|
858
|
-
NO_SHOW: 'NO_SHOW',
|
|
859
|
-
EVALUATION_PENDING: 'EVALUATION_PENDING',
|
|
860
|
-
EVALUATED: 'EVALUATED'
|
|
861
|
-
};
|
|
862
|
-
|
|
863
886
|
exports.AssessmentCategory = exports.$Enums.AssessmentCategory = {
|
|
864
887
|
MCQ: 'MCQ',
|
|
865
888
|
COMPETENCY: 'COMPETENCY',
|
|
@@ -923,7 +946,8 @@ exports.EvaluationPlanType = exports.$Enums.EvaluationPlanType = {
|
|
|
923
946
|
|
|
924
947
|
exports.IntegrationProvider = exports.$Enums.IntegrationProvider = {
|
|
925
948
|
NAUKRI: 'NAUKRI',
|
|
926
|
-
ZOHO_RECRUIT: 'ZOHO_RECRUIT'
|
|
949
|
+
ZOHO_RECRUIT: 'ZOHO_RECRUIT',
|
|
950
|
+
LINKEDIN: 'LINKEDIN'
|
|
927
951
|
};
|
|
928
952
|
|
|
929
953
|
exports.IntegrationAuthType = exports.$Enums.IntegrationAuthType = {
|
|
@@ -975,6 +999,13 @@ exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
|
|
|
975
999
|
CLOSED: 'CLOSED'
|
|
976
1000
|
};
|
|
977
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
|
+
|
|
978
1009
|
exports.OngoingEvaluationStatus = exports.$Enums.OngoingEvaluationStatus = {
|
|
979
1010
|
LOCKED: 'LOCKED',
|
|
980
1011
|
ACTION_REQUIRED: 'ACTION_REQUIRED',
|
|
@@ -1064,6 +1095,7 @@ exports.Prisma.ModelName = {
|
|
|
1064
1095
|
InterviewNotes: 'InterviewNotes',
|
|
1065
1096
|
JobDescription: 'JobDescription',
|
|
1066
1097
|
JobDescriptionData: 'JobDescriptionData',
|
|
1098
|
+
JobProfile: 'JobProfile',
|
|
1067
1099
|
Message: 'Message',
|
|
1068
1100
|
OngoingEvaluation: 'OngoingEvaluation',
|
|
1069
1101
|
Organisation: 'Organisation',
|
package/package.json
CHANGED
package/prisma/.DS_Store
ADDED
|
Binary file
|
|
@@ -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
|
}
|
|
Binary file
|