@adaptware/eagles-db 0.1.49 → 0.1.51

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/wasm.js CHANGED
@@ -163,18 +163,6 @@ exports.Prisma.ActionScalarFieldEnum = {
163
163
  is_active: 'is_active'
164
164
  };
165
165
 
166
- exports.Prisma.ActivityLogScalarFieldEnum = {
167
- id: 'id',
168
- application_id: 'application_id',
169
- actor_id: 'actor_id',
170
- actor_type: 'actor_type',
171
- message: 'message',
172
- timestamp: 'timestamp',
173
- metadata: 'metadata',
174
- created_at: 'created_at',
175
- is_active: 'is_active'
176
- };
177
-
178
166
  exports.Prisma.ApplicationScalarFieldEnum = {
179
167
  id: 'id',
180
168
  candidate_id: 'candidate_id',
@@ -221,6 +209,7 @@ exports.Prisma.AssessmentScalarFieldEnum = {
221
209
  created_by: 'created_by',
222
210
  updated_by: 'updated_by',
223
211
  is_active: 'is_active',
212
+ panelistId: 'panelistId',
224
213
  userId: 'userId'
225
214
  };
226
215
 
@@ -362,7 +351,6 @@ exports.Prisma.EvaluationPlanScalarFieldEnum = {
362
351
  exports.Prisma.FeedbackScalarFieldEnum = {
363
352
  id: 'id',
364
353
  interview_id: 'interview_id',
365
- feedback_type: 'feedback_type',
366
354
  order_no: 'order_no',
367
355
  ai_feedback: 'ai_feedback',
368
356
  human_feedback: 'human_feedback',
@@ -376,7 +364,6 @@ exports.Prisma.FeedbackScalarFieldEnum = {
376
364
  exports.Prisma.FitCheckScalarFieldEnum = {
377
365
  id: 'id',
378
366
  organisation_id: 'organisation_id',
379
- candidate_id: 'candidate_id',
380
367
  resume_id: 'resume_id',
381
368
  job_description_id: 'job_description_id',
382
369
  skills_match: 'skills_match',
@@ -420,16 +407,33 @@ exports.Prisma.GoogleScalarFieldEnum = {
420
407
  is_active: 'is_active'
421
408
  };
422
409
 
410
+ exports.Prisma.IntermediateFeedbackScalarFieldEnum = {
411
+ id: 'id',
412
+ interview_id: 'interview_id',
413
+ overall_feedback_id: 'overall_feedback_id',
414
+ intermediate_feedback: 'intermediate_feedback',
415
+ order_no: 'order_no',
416
+ created_at: 'created_at',
417
+ updated_at: 'updated_at',
418
+ created_by: 'created_by',
419
+ updated_by: 'updated_by',
420
+ is_active: 'is_active'
421
+ };
422
+
423
423
  exports.Prisma.InterviewScalarFieldEnum = {
424
424
  id: 'id',
425
425
  candidate_id: 'candidate_id',
426
426
  interviewer_id: 'interviewer_id',
427
+ evaluation_plan_id: 'evaluation_plan_id',
427
428
  application_id: 'application_id',
428
429
  resume_id: 'resume_id',
429
430
  job_description_id: 'job_description_id',
430
431
  organisation_id: 'organisation_id',
431
432
  room_name: 'room_name',
432
433
  interview_summary: 'interview_summary',
434
+ ai_interview_feedback: 'ai_interview_feedback',
435
+ interview_feedback: 'interview_feedback',
436
+ interview_rating: 'interview_rating',
433
437
  scheduled_start_time: 'scheduled_start_time',
434
438
  scheduled_end_time: 'scheduled_end_time',
435
439
  actual_start_time: 'actual_start_time',
@@ -444,6 +448,22 @@ exports.Prisma.InterviewScalarFieldEnum = {
444
448
  is_active: 'is_active'
445
449
  };
446
450
 
451
+ exports.Prisma.InterviewLibraryScalarFieldEnum = {
452
+ id: 'id',
453
+ title: 'title',
454
+ description: 'description',
455
+ organisation_id: 'organisation_id',
456
+ category: 'category',
457
+ evaluation_type: 'evaluation_type',
458
+ duration: 'duration',
459
+ passing_marks: 'passing_marks',
460
+ is_active: 'is_active',
461
+ created_by: 'created_by',
462
+ updated_by: 'updated_by',
463
+ created_at: 'created_at',
464
+ updated_at: 'updated_at'
465
+ };
466
+
447
467
  exports.Prisma.InterviewNotesScalarFieldEnum = {
448
468
  id: 'id',
449
469
  interview_id: 'interview_id',
@@ -552,6 +572,39 @@ exports.Prisma.OrganisationScalarFieldEnum = {
552
572
  logo: 'logo'
553
573
  };
554
574
 
575
+ exports.Prisma.OverallFeedbackScalarFieldEnum = {
576
+ id: 'id',
577
+ interview_id: 'interview_id',
578
+ interviewer_id: 'interviewer_id',
579
+ feedback_type: 'feedback_type',
580
+ overall_score: 'overall_score',
581
+ overall_recommendation: 'overall_recommendation',
582
+ overall_feedback: 'overall_feedback',
583
+ created_at: 'created_at',
584
+ updated_at: 'updated_at',
585
+ created_by: 'created_by',
586
+ updated_by: 'updated_by',
587
+ is_active: 'is_active'
588
+ };
589
+
590
+ exports.Prisma.PanelistScalarFieldEnum = {
591
+ id: 'id',
592
+ name: 'name',
593
+ designation: 'designation',
594
+ experience: 'experience',
595
+ expertise: 'expertise',
596
+ suited_interview: 'suited_interview',
597
+ industry: 'industry',
598
+ special_areas: 'special_areas',
599
+ organisation_id: 'organisation_id',
600
+ user_id: 'user_id',
601
+ created_at: 'created_at',
602
+ updated_at: 'updated_at',
603
+ created_by: 'created_by',
604
+ updated_by: 'updated_by',
605
+ is_active: 'is_active'
606
+ };
607
+
555
608
  exports.Prisma.PermissionScalarFieldEnum = {
556
609
  id: 'id',
557
610
  permissions: 'permissions',
@@ -719,6 +772,10 @@ exports.Prisma.NullableJsonNullValueInput = {
719
772
  JsonNull: Prisma.JsonNull
720
773
  };
721
774
 
775
+ exports.Prisma.JsonNullValueInput = {
776
+ JsonNull: Prisma.JsonNull
777
+ };
778
+
722
779
  exports.Prisma.QueryMode = {
723
780
  default: 'default',
724
781
  insensitive: 'insensitive'
@@ -746,12 +803,6 @@ exports.ActionStatus = exports.$Enums.ActionStatus = {
746
803
  CANCELLED: 'CANCELLED'
747
804
  };
748
805
 
749
- exports.ActivityActorType = exports.$Enums.ActivityActorType = {
750
- USER: 'USER',
751
- AI: 'AI',
752
- SYSTEM: 'SYSTEM'
753
- };
754
-
755
806
  exports.ApplicationStatus = exports.$Enums.ApplicationStatus = {
756
807
  PENDING: 'PENDING',
757
808
  IN_PROGRESS: 'IN_PROGRESS',
@@ -831,9 +882,11 @@ exports.EvaluationPlanType = exports.$Enums.EvaluationPlanType = {
831
882
  DELETED: 'DELETED'
832
883
  };
833
884
 
834
- exports.FeedbackType = exports.$Enums.FeedbackType = {
835
- SECTION: 'SECTION',
836
- OVERALL: 'OVERALL'
885
+ exports.InterviewFeedback = exports.$Enums.InterviewFeedback = {
886
+ STRONG_HIRE: 'STRONG_HIRE',
887
+ HIRE: 'HIRE',
888
+ NO_HIRE: 'NO_HIRE',
889
+ STRONG_NO_HIRE: 'STRONG_NO_HIRE'
837
890
  };
838
891
 
839
892
  exports.InterviewStatus = exports.$Enums.InterviewStatus = {
@@ -846,6 +899,17 @@ exports.InterviewStatus = exports.$Enums.InterviewStatus = {
846
899
  EVALUATED: 'EVALUATED'
847
900
  };
848
901
 
902
+ exports.InterviewCategory = exports.$Enums.InterviewCategory = {
903
+ SCREENING: 'SCREENING',
904
+ TECHNICAL: 'TECHNICAL',
905
+ BEHAVIORAL: 'BEHAVIORAL',
906
+ CASE_STUDY: 'CASE_STUDY',
907
+ MANAGERIAL: 'MANAGERIAL',
908
+ CULTURAL_FIT: 'CULTURAL_FIT',
909
+ FINAL_DISCUSSION: 'FINAL_DISCUSSION',
910
+ GENERAL: 'GENERAL'
911
+ };
912
+
849
913
  exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
850
914
  CREATED: 'CREATED',
851
915
  DRAFT: 'DRAFT',
@@ -889,6 +953,19 @@ exports.OrganisationSize = exports.$Enums.OrganisationSize = {
889
953
  FIVE_HUNDRED_PLUS: 'FIVE_HUNDRED_PLUS'
890
954
  };
891
955
 
956
+ exports.FeedbackType = exports.$Enums.FeedbackType = {
957
+ HUMAN: 'HUMAN',
958
+ AI: 'AI'
959
+ };
960
+
961
+ exports.OverallRecommendation = exports.$Enums.OverallRecommendation = {
962
+ StrongHire: 'StrongHire',
963
+ Hire: 'Hire',
964
+ LeaningHire: 'LeaningHire',
965
+ NoHire: 'NoHire',
966
+ StrongNoHire: 'StrongNoHire'
967
+ };
968
+
892
969
  exports.AsyncOperationStatus = exports.$Enums.AsyncOperationStatus = {
893
970
  PENDING: 'PENDING',
894
971
  IN_PROGRESS: 'IN_PROGRESS',
@@ -920,7 +997,6 @@ exports.Prisma.ModelName = {
920
997
  CandidateQuestionResponse: 'CandidateQuestionResponse',
921
998
  UserRole: 'UserRole',
922
999
  Action: 'Action',
923
- ActivityLog: 'ActivityLog',
924
1000
  Application: 'Application',
925
1001
  Approval: 'Approval',
926
1002
  Assessment: 'Assessment',
@@ -935,13 +1011,17 @@ exports.Prisma.ModelName = {
935
1011
  Feedback: 'Feedback',
936
1012
  FitCheck: 'FitCheck',
937
1013
  Google: 'Google',
1014
+ IntermediateFeedback: 'IntermediateFeedback',
938
1015
  Interview: 'Interview',
1016
+ InterviewLibrary: 'InterviewLibrary',
939
1017
  InterviewNotes: 'InterviewNotes',
940
1018
  JobDescription: 'JobDescription',
941
1019
  JobDescriptionData: 'JobDescriptionData',
942
1020
  Message: 'Message',
943
1021
  OngoingEvaluation: 'OngoingEvaluation',
944
1022
  Organisation: 'Organisation',
1023
+ OverallFeedback: 'OverallFeedback',
1024
+ Panelist: 'Panelist',
945
1025
  Permission: 'Permission',
946
1026
  AsyncOperation: 'AsyncOperation',
947
1027
  Question: 'Question',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,6 +27,7 @@ model Application {
27
27
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
28
28
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
29
  interviews Interview[]
30
+ assignments Assignment[]
30
31
  ongoing_evaluations OngoingEvaluation[]
31
32
  activity_logs ActivityLog[]
32
33
  // Audit fields
@@ -10,29 +10,31 @@ enum AssessmentStatus {
10
10
  }
11
11
 
12
12
  model Assessment {
13
- id String @id @default(uuid())
14
- assessment_id String
15
- candidate_id String
16
- reviewer_id String?
17
- score Float?
18
- feedback String?
19
- scheduled_start_time DateTime? @default(now()) // Start Time to start the assessment
20
- assessment_status AssessmentStatus @default(SCHEDULED)
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)
13
+ id String @id @default(uuid())
14
+ assessment_library_id String
15
+ candidate_id String
16
+ reviewer_id String?
17
+ score Float?
18
+ feedback String?
19
+ scheduled_start_time DateTime? @default(now()) // Start Time to start the assessment
20
+ assessment_status AssessmentStatus @default(SCHEDULED)
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
26
  // Relations
27
- assessment_libarary AssessmentLibrary @relation(fields: [assessment_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
28
- candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
- reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
30
- questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
31
- candidateResponse CandidateQuestionResponse[]
32
- User User? @relation(fields: [userId], references: [id])
33
- userId String?
27
+ assessment_libarary AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
28
+ candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
+ reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
30
+ questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
31
+ candidateResponse CandidateQuestionResponse[]
32
+ Panelist Panelist? @relation(fields: [panelistId], references: [id])
33
+ panelistId String?
34
+ User User? @relation(fields: [userId], references: [id])
35
+ userId String?
34
36
 
35
- @@unique([assessment_id, candidate_id])
36
- @@index([assessment_id])
37
+ @@unique([assessment_library_id, candidate_id])
38
+ @@index([assessment_library_id])
37
39
  @@index([candidate_id])
38
40
  }
@@ -0,0 +1,42 @@
1
+ enum AssignmentStatus {
2
+ AVAILABLE
3
+ SCHEDULED
4
+ CANCELLED
5
+ }
6
+
7
+ model Assignment {
8
+ id String @id @default(uuid())
9
+ candidate_id String
10
+ assignment_library_id String
11
+ reviewer_id String?
12
+ application_id String?
13
+ job_description_id String
14
+ organisation_id String
15
+ ongoing_evaluation_id String? @unique
16
+ score Int?
17
+ ai_result String?
18
+ ai_reasoning String?
19
+ status AssignmentStatus @default(AVAILABLE)
20
+ cancel_reason String?
21
+ solution_url String?
22
+ scheduled_start_time DateTime?
23
+ scheduled_end_time DateTime?
24
+ created_at DateTime @default(now())
25
+ updated_at DateTime @updatedAt
26
+ created_by String
27
+ updated_by String
28
+ is_active Boolean @default(true)
29
+ // Relations
30
+ candidate User? @relation("CandidateAssignments", fields: [candidate_id], references: [id], onDelete: Cascade)
31
+ assignment_library AssignmentLibrary @relation(fields: [assignment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
32
+ reviewer User? @relation("AssignmentReviewer", fields: [reviewer_id], references: [id], onDelete: SetNull)
33
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
34
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
35
+ application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
36
+ ongoing_evaluation OngoingEvaluation? @relation(fields: [ongoing_evaluation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
37
+
38
+ @@unique([candidate_id, ongoing_evaluation_id])
39
+ @@index([candidate_id])
40
+ @@index([reviewer_id])
41
+ @@index([job_description_id])
42
+ }
@@ -14,6 +14,7 @@ model AssignmentLibrary {
14
14
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
15
15
  /// Back-relation: one-to-one from EvaluationPlan (FK lives on EvaluationPlan.assignment_library_id)
16
16
  evaluationPlan EvaluationPlan[]
17
+ assignments Assignment[]
17
18
 
18
19
  @@index([job_description_id])
19
20
  }
@@ -72,10 +72,13 @@ model EvaluationPlan {
72
72
  // Relations
73
73
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
74
74
  questions Question[] // One evaluation plan → many questions
75
- applications Application[]
76
- assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
77
- assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
78
- ongoing_evaluations OngoingEvaluation[]
75
+ panelists Panelist[]
76
+ interviews Interview[]
77
+ applications Application[]
78
+ // New optional one-to-one relation with AssessmentLibrary
79
+ assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
80
+ assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
81
+ ongoing_evaluations OngoingEvaluation[]
79
82
 
80
83
  @@unique([job_description_id, order_no])
81
84
  @@index([job_description_id])
@@ -1,13 +1,7 @@
1
- enum FeedbackType {
2
- SECTION
3
- OVERALL
4
- }
5
-
6
1
  model Feedback {
7
- id String @id @default(uuid())
8
- interview_id String
9
- feedback_type FeedbackType
10
- order_no Int?
2
+ id String @id @default(uuid())
3
+ interview_id String
4
+ order_no Int
11
5
 
12
6
  ai_feedback Json?
13
7
  human_feedback Json?
@@ -0,0 +1,18 @@
1
+ model IntermediateFeedback {
2
+ id String @id @default(uuid())
3
+ interview_id String
4
+ overall_feedback_id String?
5
+ intermediate_feedback Json
6
+ order_no Int @default(autoincrement())
7
+ created_at DateTime @default(now())
8
+ updated_at DateTime @updatedAt
9
+ created_by String
10
+ updated_by String
11
+ is_active Boolean @default(true)
12
+ // Relations
13
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
14
+ OverallFeedback OverallFeedback? @relation(fields: [overall_feedback_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
15
+ transcripts Transcript[]
16
+
17
+ @@index([interview_id])
18
+ }
@@ -8,45 +8,54 @@ enum InterviewStatus {
8
8
  EVALUATED // Feedback completed and locked
9
9
  }
10
10
 
11
+ enum InterviewFeedback {
12
+ STRONG_HIRE
13
+ HIRE
14
+ NO_HIRE
15
+ STRONG_NO_HIRE
16
+ }
17
+
11
18
  model Interview {
12
- id String @id @default(uuid())
13
- /// Foreign keys
14
- candidate_id String
15
- interviewer_id String?
16
- application_id String?
17
- evaluation_plan_id String?
18
- resume_id String
19
- job_description_id String
20
- organisation_id String
21
- /// Data
22
- room_name String?
23
- interview_summary String[]
24
- scheduled_start_time DateTime?
25
- scheduled_end_time DateTime?
26
- actual_start_time DateTime?
27
- actual_end_time DateTime?
28
- recording_url String?
29
- interview_status InterviewStatus @default(SCHEDULED)
30
- google_event_id String?
31
- /// Audit fields
32
- created_at DateTime @default(now())
33
- updated_at DateTime @updatedAt
34
- created_by String
35
- updated_by String
36
- is_active Boolean @default(true)
19
+ id String @id @default(uuid())
20
+ candidate_id String
21
+ interviewer_id String?
22
+ evaluation_plan_id String
23
+ application_id String?
24
+ resume_id String
25
+ job_description_id String
26
+ organisation_id String
27
+ room_name String?
28
+ interview_summary String[]
29
+ ai_interview_feedback InterviewFeedback?
30
+ interview_feedback InterviewFeedback?
31
+ interview_rating Float? // Overall rating out of 100 based on evaluation
32
+ scheduled_start_time DateTime?
33
+ scheduled_end_time DateTime?
34
+ actual_start_time DateTime?
35
+ actual_end_time DateTime?
36
+ recording_url String?
37
+ interview_status InterviewStatus @default(SCHEDULED)
38
+ google_event_id String?
39
+ created_at DateTime @default(now())
40
+ updated_at DateTime @updatedAt
41
+ created_by String
42
+ updated_by String
43
+ is_active Boolean @default(true)
37
44
  // Relations
38
- candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
39
- interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
40
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
41
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
42
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
43
- application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
44
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
45
- ongoing_evaluation OngoingEvaluation?
46
- transcripts Transcript[]
47
- suggestions Suggestion[]
48
- feedback Feedback[]
49
- interviewNotes InterviewNotes[]
45
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
46
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
47
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
48
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
49
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
50
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
51
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
52
+ ongoing_evaluation OngoingEvaluation?
53
+ intermediateFeedbacks IntermediateFeedback[]
54
+ transcripts Transcript[]
55
+ suggestions Suggestion[]
56
+ overallFeedback OverallFeedback[]
57
+ feedback Feedback[]
58
+ interviewNotes InterviewNotes[]
50
59
 
51
60
  @@unique([interviewer_id, candidate_id, evaluation_plan_id])
52
61
  @@index([candidate_id])
@@ -0,0 +1,31 @@
1
+ /// Defines the category or purpose of the interview, suitable for any job role.
2
+ enum InterviewCategory {
3
+ SCREENING // Initial screening interview
4
+ TECHNICAL // Skill or role-specific interview
5
+ BEHAVIORAL // Behavioral or situational round
6
+ CASE_STUDY // Case-based or analytical round
7
+ MANAGERIAL // Leadership or management-focused
8
+ CULTURAL_FIT // Checks alignment with company culture
9
+ FINAL_DISCUSSION // Final HR or offer discussion
10
+ GENERAL // Generic or flexible-purpose interview
11
+ }
12
+
13
+ /// Represents a reusable interview template applicable to any job type.
14
+ model InterviewLibrary {
15
+ id String @id @default(uuid())
16
+ title String
17
+ description String
18
+ organisation_id String
19
+ category InterviewCategory
20
+ evaluation_type EvaluationType
21
+ duration Float
22
+ passing_marks Float
23
+ is_active Boolean @default(true)
24
+ created_by String
25
+ updated_by String
26
+ created_at DateTime @default(now())
27
+ updated_at DateTime @updatedAt
28
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
+
30
+ @@index([organisation_id])
31
+ }
@@ -28,6 +28,7 @@ model JobDescription {
28
28
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
29
  applications Application[]
30
30
  interviews Interview[]
31
+ assignments Assignment[]
31
32
  fit_check FitCheck[] // one-to-many link
32
33
  job_description_data JobDescriptionData[] // one-to-many link
33
34
  evaluationPlan EvaluationPlan[] // relation to evaluation methods
@@ -34,6 +34,7 @@ model OngoingEvaluation {
34
34
  job_description_id String
35
35
  evaluation_plan_id String
36
36
  interview_id String? @unique
37
+ assignment_id String? @unique
37
38
  status OngoingEvaluationStatus?
38
39
  state OngoingEvaluationState? @default(NOT_STARTED)
39
40
  round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
@@ -46,6 +47,7 @@ model OngoingEvaluation {
46
47
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
47
48
  evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
48
49
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
50
+ assignment Assignment?
49
51
  created_at DateTime @default(now())
50
52
  updated_at DateTime @updatedAt
51
53
  created_by String
@@ -17,6 +17,7 @@ model Organisation {
17
17
  address String
18
18
  company_values Json[]
19
19
 
20
+ interviewers User[]
20
21
  created_at DateTime @default(now())
21
22
  updated_at DateTime @updatedAt
22
23
  created_by String
@@ -25,14 +26,16 @@ model Organisation {
25
26
  alias String? @unique
26
27
  logo String?
27
28
  applications Application[]
28
- interviewers User[]
29
29
  user_roles UserRole[]
30
30
  job_descriptions JobDescription[]
31
31
  assessment_library AssessmentLibrary[]
32
32
  assignment_library AssignmentLibrary[]
33
+ interview_library InterviewLibrary[]
33
34
  interviews Interview[]
35
+ assignments Assignment[]
34
36
  fit_check FitCheck[] // one-to-many link
35
37
  resumes Resume[] // one-to-many link
38
+ panelists Panelist[] // one-to-many link
36
39
  approvals Approval[] // one-to-many link
37
40
  suggestions Suggestion[]
38
41
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
@@ -0,0 +1,34 @@
1
+ enum FeedbackType {
2
+ HUMAN
3
+ AI
4
+ }
5
+
6
+ enum OverallRecommendation {
7
+ StrongHire
8
+ Hire
9
+ LeaningHire
10
+ NoHire
11
+ StrongNoHire
12
+ }
13
+
14
+ model OverallFeedback {
15
+ id String @id @default(uuid())
16
+ interview_id String
17
+ interviewer_id String? // 👈 optional field
18
+ feedback_type FeedbackType
19
+ overall_score Float
20
+ overall_recommendation OverallRecommendation
21
+ overall_feedback Json
22
+ created_at DateTime @default(now())
23
+ updated_at DateTime @updatedAt
24
+ created_by String
25
+ updated_by String
26
+ is_active Boolean @default(true)
27
+ // Relations
28
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
+ interviewer Panelist? @relation(fields: [interviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
30
+ intermediateFeedbacks IntermediateFeedback[] // 👈 one-to-many relation added here
31
+
32
+ @@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
33
+ @@index([interview_id])
34
+ }
@@ -0,0 +1,24 @@
1
+ model Panelist {
2
+ id String @id @default(uuid())
3
+ name String
4
+ designation String
5
+ experience String // e.g. "10+", keeping as String for flexibility
6
+ expertise String // e.g. "Product Strategy, Figma..."
7
+ suited_interview String // e.g. "Consulting, Customer understanding..."
8
+ industry String // e.g. "Healthcare, Fintech"
9
+ special_areas String? // Optional field
10
+ organisation_id String
11
+ user_id String @unique
12
+
13
+ user User @relation(fields: [user_id], references: [id])
14
+ organisation Organisation @relation(fields: [organisation_id], references: [id])
15
+ evaluationPlans EvaluationPlan[]
16
+ overallFeedbacks OverallFeedback[]
17
+ created_at DateTime @default(now())
18
+ updated_at DateTime @updatedAt
19
+ created_by String
20
+ updated_by String
21
+ is_active Boolean @default(true)
22
+
23
+ assessments Assessment[]
24
+ }