@adaptware/eagles-db 0.1.47 → 0.1.48

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
@@ -221,6 +221,7 @@ exports.Prisma.AssessmentScalarFieldEnum = {
221
221
  created_by: 'created_by',
222
222
  updated_by: 'updated_by',
223
223
  is_active: 'is_active',
224
+ panelistId: 'panelistId',
224
225
  userId: 'userId'
225
226
  };
226
227
 
@@ -362,7 +363,6 @@ exports.Prisma.EvaluationPlanScalarFieldEnum = {
362
363
  exports.Prisma.FeedbackScalarFieldEnum = {
363
364
  id: 'id',
364
365
  interview_id: 'interview_id',
365
- feedback_type: 'feedback_type',
366
366
  order_no: 'order_no',
367
367
  ai_feedback: 'ai_feedback',
368
368
  human_feedback: 'human_feedback',
@@ -420,17 +420,78 @@ exports.Prisma.GoogleScalarFieldEnum = {
420
420
  is_active: 'is_active'
421
421
  };
422
422
 
423
+ exports.Prisma.IntegrationCredentialScalarFieldEnum = {
424
+ id: 'id',
425
+ organisation_id: 'organisation_id',
426
+ provider: 'provider',
427
+ auth_type: 'auth_type',
428
+ access_token: 'access_token',
429
+ refresh_token: 'refresh_token',
430
+ token_expires_at: 'token_expires_at',
431
+ api_key: 'api_key',
432
+ api_secret: 'api_secret',
433
+ metadata: 'metadata',
434
+ is_active: 'is_active',
435
+ created_at: 'created_at',
436
+ updated_at: 'updated_at',
437
+ created_by: 'created_by',
438
+ updated_by: 'updated_by'
439
+ };
440
+
441
+ exports.Prisma.IntegrationJobSyncScalarFieldEnum = {
442
+ id: 'id',
443
+ job_description_id: 'job_description_id',
444
+ provider: 'provider',
445
+ external_id: 'external_id',
446
+ sync_enabled: 'sync_enabled',
447
+ last_synced_at: 'last_synced_at',
448
+ sync_direction: 'sync_direction',
449
+ metadata: 'metadata',
450
+ created_at: 'created_at',
451
+ updated_at: 'updated_at'
452
+ };
453
+
454
+ exports.Prisma.ZohoSyncMappingScalarFieldEnum = {
455
+ id: 'id',
456
+ organisation_id: 'organisation_id',
457
+ entity_type: 'entity_type',
458
+ treadspace_id: 'treadspace_id',
459
+ zoho_module: 'zoho_module',
460
+ zoho_record_id: 'zoho_record_id',
461
+ last_synced_at: 'last_synced_at',
462
+ sync_status: 'sync_status',
463
+ error_message: 'error_message',
464
+ created_at: 'created_at',
465
+ updated_at: 'updated_at'
466
+ };
467
+
468
+ exports.Prisma.IntermediateFeedbackScalarFieldEnum = {
469
+ id: 'id',
470
+ interview_id: 'interview_id',
471
+ overall_feedback_id: 'overall_feedback_id',
472
+ intermediate_feedback: 'intermediate_feedback',
473
+ order_no: 'order_no',
474
+ created_at: 'created_at',
475
+ updated_at: 'updated_at',
476
+ created_by: 'created_by',
477
+ updated_by: 'updated_by',
478
+ is_active: 'is_active'
479
+ };
480
+
423
481
  exports.Prisma.InterviewScalarFieldEnum = {
424
482
  id: 'id',
425
483
  candidate_id: 'candidate_id',
426
484
  interviewer_id: 'interviewer_id',
427
- application_id: 'application_id',
428
485
  evaluation_plan_id: 'evaluation_plan_id',
486
+ application_id: 'application_id',
429
487
  resume_id: 'resume_id',
430
488
  job_description_id: 'job_description_id',
431
489
  organisation_id: 'organisation_id',
432
490
  room_name: 'room_name',
433
491
  interview_summary: 'interview_summary',
492
+ ai_interview_feedback: 'ai_interview_feedback',
493
+ interview_feedback: 'interview_feedback',
494
+ interview_rating: 'interview_rating',
434
495
  scheduled_start_time: 'scheduled_start_time',
435
496
  scheduled_end_time: 'scheduled_end_time',
436
497
  actual_start_time: 'actual_start_time',
@@ -445,6 +506,22 @@ exports.Prisma.InterviewScalarFieldEnum = {
445
506
  is_active: 'is_active'
446
507
  };
447
508
 
509
+ exports.Prisma.InterviewLibraryScalarFieldEnum = {
510
+ id: 'id',
511
+ title: 'title',
512
+ description: 'description',
513
+ organisation_id: 'organisation_id',
514
+ category: 'category',
515
+ evaluation_type: 'evaluation_type',
516
+ duration: 'duration',
517
+ passing_marks: 'passing_marks',
518
+ is_active: 'is_active',
519
+ created_by: 'created_by',
520
+ updated_by: 'updated_by',
521
+ created_at: 'created_at',
522
+ updated_at: 'updated_at'
523
+ };
524
+
448
525
  exports.Prisma.InterviewNotesScalarFieldEnum = {
449
526
  id: 'id',
450
527
  interview_id: 'interview_id',
@@ -553,6 +630,39 @@ exports.Prisma.OrganisationScalarFieldEnum = {
553
630
  logo: 'logo'
554
631
  };
555
632
 
633
+ exports.Prisma.OverallFeedbackScalarFieldEnum = {
634
+ id: 'id',
635
+ interview_id: 'interview_id',
636
+ interviewer_id: 'interviewer_id',
637
+ feedback_type: 'feedback_type',
638
+ overall_score: 'overall_score',
639
+ overall_recommendation: 'overall_recommendation',
640
+ overall_feedback: 'overall_feedback',
641
+ created_at: 'created_at',
642
+ updated_at: 'updated_at',
643
+ created_by: 'created_by',
644
+ updated_by: 'updated_by',
645
+ is_active: 'is_active'
646
+ };
647
+
648
+ exports.Prisma.PanelistScalarFieldEnum = {
649
+ id: 'id',
650
+ name: 'name',
651
+ designation: 'designation',
652
+ experience: 'experience',
653
+ expertise: 'expertise',
654
+ suited_interview: 'suited_interview',
655
+ industry: 'industry',
656
+ special_areas: 'special_areas',
657
+ organisation_id: 'organisation_id',
658
+ user_id: 'user_id',
659
+ created_at: 'created_at',
660
+ updated_at: 'updated_at',
661
+ created_by: 'created_by',
662
+ updated_by: 'updated_by',
663
+ is_active: 'is_active'
664
+ };
665
+
556
666
  exports.Prisma.PermissionScalarFieldEnum = {
557
667
  id: 'id',
558
668
  permissions: 'permissions',
@@ -720,6 +830,10 @@ exports.Prisma.NullableJsonNullValueInput = {
720
830
  JsonNull: Prisma.JsonNull
721
831
  };
722
832
 
833
+ exports.Prisma.JsonNullValueInput = {
834
+ JsonNull: Prisma.JsonNull
835
+ };
836
+
723
837
  exports.Prisma.QueryMode = {
724
838
  default: 'default',
725
839
  insensitive: 'insensitive'
@@ -832,9 +946,40 @@ exports.EvaluationPlanType = exports.$Enums.EvaluationPlanType = {
832
946
  DELETED: 'DELETED'
833
947
  };
834
948
 
835
- exports.FeedbackType = exports.$Enums.FeedbackType = {
836
- SECTION: 'SECTION',
837
- OVERALL: 'OVERALL'
949
+ exports.IntegrationProvider = exports.$Enums.IntegrationProvider = {
950
+ NAUKRI: 'NAUKRI',
951
+ ZOHO_RECRUIT: 'ZOHO_RECRUIT'
952
+ };
953
+
954
+ exports.IntegrationAuthType = exports.$Enums.IntegrationAuthType = {
955
+ OAUTH2: 'OAUTH2',
956
+ API_KEY: 'API_KEY'
957
+ };
958
+
959
+ exports.SyncDirection = exports.$Enums.SyncDirection = {
960
+ PUSH: 'PUSH',
961
+ PULL: 'PULL',
962
+ BIDIRECTIONAL: 'BIDIRECTIONAL'
963
+ };
964
+
965
+ exports.SyncEntityType = exports.$Enums.SyncEntityType = {
966
+ CANDIDATE: 'CANDIDATE',
967
+ JOB_OPENING: 'JOB_OPENING',
968
+ INTERVIEW: 'INTERVIEW',
969
+ APPLICATION: 'APPLICATION'
970
+ };
971
+
972
+ exports.SyncStatus = exports.$Enums.SyncStatus = {
973
+ SYNCED: 'SYNCED',
974
+ PENDING: 'PENDING',
975
+ FAILED: 'FAILED'
976
+ };
977
+
978
+ exports.InterviewFeedback = exports.$Enums.InterviewFeedback = {
979
+ STRONG_HIRE: 'STRONG_HIRE',
980
+ HIRE: 'HIRE',
981
+ NO_HIRE: 'NO_HIRE',
982
+ STRONG_NO_HIRE: 'STRONG_NO_HIRE'
838
983
  };
839
984
 
840
985
  exports.InterviewStatus = exports.$Enums.InterviewStatus = {
@@ -847,6 +992,17 @@ exports.InterviewStatus = exports.$Enums.InterviewStatus = {
847
992
  EVALUATED: 'EVALUATED'
848
993
  };
849
994
 
995
+ exports.InterviewCategory = exports.$Enums.InterviewCategory = {
996
+ SCREENING: 'SCREENING',
997
+ TECHNICAL: 'TECHNICAL',
998
+ BEHAVIORAL: 'BEHAVIORAL',
999
+ CASE_STUDY: 'CASE_STUDY',
1000
+ MANAGERIAL: 'MANAGERIAL',
1001
+ CULTURAL_FIT: 'CULTURAL_FIT',
1002
+ FINAL_DISCUSSION: 'FINAL_DISCUSSION',
1003
+ GENERAL: 'GENERAL'
1004
+ };
1005
+
850
1006
  exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
851
1007
  CREATED: 'CREATED',
852
1008
  DRAFT: 'DRAFT',
@@ -890,6 +1046,19 @@ exports.OrganisationSize = exports.$Enums.OrganisationSize = {
890
1046
  FIVE_HUNDRED_PLUS: 'FIVE_HUNDRED_PLUS'
891
1047
  };
892
1048
 
1049
+ exports.FeedbackType = exports.$Enums.FeedbackType = {
1050
+ HUMAN: 'HUMAN',
1051
+ AI: 'AI'
1052
+ };
1053
+
1054
+ exports.OverallRecommendation = exports.$Enums.OverallRecommendation = {
1055
+ StrongHire: 'StrongHire',
1056
+ Hire: 'Hire',
1057
+ LeaningHire: 'LeaningHire',
1058
+ NoHire: 'NoHire',
1059
+ StrongNoHire: 'StrongNoHire'
1060
+ };
1061
+
893
1062
  exports.AsyncOperationStatus = exports.$Enums.AsyncOperationStatus = {
894
1063
  PENDING: 'PENDING',
895
1064
  IN_PROGRESS: 'IN_PROGRESS',
@@ -936,13 +1105,20 @@ exports.Prisma.ModelName = {
936
1105
  Feedback: 'Feedback',
937
1106
  FitCheck: 'FitCheck',
938
1107
  Google: 'Google',
1108
+ IntegrationCredential: 'IntegrationCredential',
1109
+ IntegrationJobSync: 'IntegrationJobSync',
1110
+ ZohoSyncMapping: 'ZohoSyncMapping',
1111
+ IntermediateFeedback: 'IntermediateFeedback',
939
1112
  Interview: 'Interview',
1113
+ InterviewLibrary: 'InterviewLibrary',
940
1114
  InterviewNotes: 'InterviewNotes',
941
1115
  JobDescription: 'JobDescription',
942
1116
  JobDescriptionData: 'JobDescriptionData',
943
1117
  Message: 'Message',
944
1118
  OngoingEvaluation: 'OngoingEvaluation',
945
1119
  Organisation: 'Organisation',
1120
+ OverallFeedback: 'OverallFeedback',
1121
+ Panelist: 'Panelist',
946
1122
  Permission: 'Permission',
947
1123
  AsyncOperation: 'AsyncOperation',
948
1124
  Question: 'Question',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,6 +29,8 @@ model Assessment {
29
29
  reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
30
30
  questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
31
31
  candidateResponse CandidateQuestionResponse[]
32
+ Panelist Panelist? @relation(fields: [panelistId], references: [id])
33
+ panelistId String?
32
34
  User User? @relation(fields: [userId], references: [id])
33
35
  userId String?
34
36
 
@@ -72,11 +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
+ panelists Panelist[]
76
+ interviews Interview[]
75
77
  applications Application[]
78
+ // New optional one-to-one relation with AssessmentLibrary
76
79
  assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
77
80
  assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
78
81
  ongoing_evaluations OngoingEvaluation[]
79
- interviews Interview[]
80
82
 
81
83
  @@unique([job_description_id, order_no])
82
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,92 @@
1
+ enum IntegrationProvider {
2
+ NAUKRI
3
+ ZOHO_RECRUIT
4
+ }
5
+
6
+ enum IntegrationAuthType {
7
+ OAUTH2
8
+ API_KEY
9
+ }
10
+
11
+ enum SyncDirection {
12
+ PUSH
13
+ PULL
14
+ BIDIRECTIONAL
15
+ }
16
+
17
+ enum SyncEntityType {
18
+ CANDIDATE
19
+ JOB_OPENING
20
+ INTERVIEW
21
+ APPLICATION
22
+ }
23
+
24
+ enum SyncStatus {
25
+ SYNCED
26
+ PENDING
27
+ FAILED
28
+ }
29
+
30
+ model IntegrationCredential {
31
+ id String @id @default(uuid())
32
+ organisation_id String?
33
+ provider IntegrationProvider
34
+ auth_type IntegrationAuthType
35
+ access_token String?
36
+ refresh_token String?
37
+ token_expires_at DateTime?
38
+ api_key String?
39
+ api_secret String?
40
+ metadata Json @default("{}")
41
+ is_active Boolean @default(true)
42
+
43
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
44
+
45
+ created_at DateTime @default(now())
46
+ updated_at DateTime @updatedAt
47
+ created_by String
48
+ updated_by String
49
+
50
+ @@unique([organisation_id, provider])
51
+ @@index([provider])
52
+ }
53
+
54
+ model IntegrationJobSync {
55
+ id String @id @default(uuid())
56
+ job_description_id String
57
+ provider IntegrationProvider
58
+ external_id String?
59
+ sync_enabled Boolean @default(true)
60
+ last_synced_at DateTime?
61
+ sync_direction SyncDirection @default(PUSH)
62
+ metadata Json @default("{}")
63
+
64
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
65
+
66
+ created_at DateTime @default(now())
67
+ updated_at DateTime @updatedAt
68
+
69
+ @@unique([job_description_id, provider])
70
+ @@index([provider])
71
+ }
72
+
73
+ model ZohoSyncMapping {
74
+ id String @id @default(uuid())
75
+ organisation_id String
76
+ entity_type SyncEntityType
77
+ treadspace_id String
78
+ zoho_module String
79
+ zoho_record_id String
80
+ last_synced_at DateTime @default(now())
81
+ sync_status SyncStatus @default(PENDING)
82
+ error_message String?
83
+
84
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
85
+
86
+ created_at DateTime @default(now())
87
+ updated_at DateTime @updatedAt
88
+
89
+ @@unique([organisation_id, entity_type, treadspace_id])
90
+ @@index([zoho_record_id])
91
+ @@index([sync_status])
92
+ }
@@ -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
+ }
@@ -39,6 +39,7 @@ model JobDescription {
39
39
  hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
40
40
  recruiters User[]
41
41
  transcripts Transcript[]
42
+ integration_job_syncs IntegrationJobSync[]
42
43
 
43
44
  @@index([organisation_id])
44
45
  @@index([hiring_manager_id])
@@ -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,18 +26,21 @@ 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[]
34
35
  fit_check FitCheck[] // one-to-many link
35
36
  resumes Resume[] // one-to-many link
37
+ panelists Panelist[] // one-to-many link
36
38
  approvals Approval[] // one-to-many link
37
39
  suggestions Suggestion[]
38
40
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
39
- actions Action[]
41
+ actions Action[]
42
+ integration_credentials IntegrationCredential[]
43
+ zoho_sync_mappings ZohoSyncMapping[]
40
44
 
41
45
  @@index([name])
42
46
  }
@@ -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
+ }