@adaptware/eagles-db 0.1.53 → 0.1.55

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,6 +163,18 @@ 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
+
166
178
  exports.Prisma.ApplicationScalarFieldEnum = {
167
179
  id: 'id',
168
180
  candidate_id: 'candidate_id',
@@ -197,7 +209,7 @@ exports.Prisma.ApprovalScalarFieldEnum = {
197
209
 
198
210
  exports.Prisma.AssessmentScalarFieldEnum = {
199
211
  id: 'id',
200
- assessment_id: 'assessment_id',
212
+ assessment_library_id: 'assessment_library_id',
201
213
  candidate_id: 'candidate_id',
202
214
  reviewer_id: 'reviewer_id',
203
215
  score: 'score',
@@ -238,6 +250,30 @@ exports.Prisma.AssessmentQuestionScalarFieldEnum = {
238
250
  updated_at: 'updated_at'
239
251
  };
240
252
 
253
+ exports.Prisma.AssignmentScalarFieldEnum = {
254
+ id: 'id',
255
+ candidate_id: 'candidate_id',
256
+ assignment_library_id: 'assignment_library_id',
257
+ reviewer_id: 'reviewer_id',
258
+ application_id: 'application_id',
259
+ job_description_id: 'job_description_id',
260
+ organisation_id: 'organisation_id',
261
+ ongoing_evaluation_id: 'ongoing_evaluation_id',
262
+ score: 'score',
263
+ ai_result: 'ai_result',
264
+ ai_reasoning: 'ai_reasoning',
265
+ status: 'status',
266
+ cancel_reason: 'cancel_reason',
267
+ solution_url: 'solution_url',
268
+ scheduled_start_time: 'scheduled_start_time',
269
+ scheduled_end_time: 'scheduled_end_time',
270
+ created_at: 'created_at',
271
+ updated_at: 'updated_at',
272
+ created_by: 'created_by',
273
+ updated_by: 'updated_by',
274
+ is_active: 'is_active'
275
+ };
276
+
241
277
  exports.Prisma.AssignmentLibraryScalarFieldEnum = {
242
278
  id: 'id',
243
279
  deadline: 'deadline',
@@ -364,6 +400,7 @@ exports.Prisma.FeedbackScalarFieldEnum = {
364
400
  exports.Prisma.FitCheckScalarFieldEnum = {
365
401
  id: 'id',
366
402
  organisation_id: 'organisation_id',
403
+ candidate_id: 'candidate_id',
367
404
  resume_id: 'resume_id',
368
405
  job_description_id: 'job_description_id',
369
406
  skills_match: 'skills_match',
@@ -407,33 +444,17 @@ exports.Prisma.GoogleScalarFieldEnum = {
407
444
  is_active: 'is_active'
408
445
  };
409
446
 
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
447
  exports.Prisma.InterviewScalarFieldEnum = {
424
448
  id: 'id',
449
+ organisation_id: 'organisation_id',
425
450
  candidate_id: 'candidate_id',
426
451
  interviewer_id: 'interviewer_id',
427
452
  evaluation_plan_id: 'evaluation_plan_id',
428
453
  application_id: 'application_id',
429
454
  resume_id: 'resume_id',
430
455
  job_description_id: 'job_description_id',
431
- organisation_id: 'organisation_id',
432
456
  room_name: 'room_name',
433
457
  interview_summary: 'interview_summary',
434
- ai_interview_feedback: 'ai_interview_feedback',
435
- interview_feedback: 'interview_feedback',
436
- interview_rating: 'interview_rating',
437
458
  scheduled_start_time: 'scheduled_start_time',
438
459
  scheduled_end_time: 'scheduled_end_time',
439
460
  actual_start_time: 'actual_start_time',
@@ -441,6 +462,14 @@ exports.Prisma.InterviewScalarFieldEnum = {
441
462
  recording_url: 'recording_url',
442
463
  interview_status: 'interview_status',
443
464
  google_event_id: 'google_event_id',
465
+ ai_interview_feedback: 'ai_interview_feedback',
466
+ interview_feedback: 'interview_feedback',
467
+ overall_feedback: 'overall_feedback',
468
+ interview_rating: 'interview_rating',
469
+ ai_feedback: 'ai_feedback',
470
+ human_feedback: 'human_feedback',
471
+ interviewer_feedback: 'interviewer_feedback',
472
+ section_feedback: 'section_feedback',
444
473
  created_at: 'created_at',
445
474
  updated_at: 'updated_at',
446
475
  created_by: 'created_by',
@@ -448,22 +477,6 @@ exports.Prisma.InterviewScalarFieldEnum = {
448
477
  is_active: 'is_active'
449
478
  };
450
479
 
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
-
467
480
  exports.Prisma.InterviewNotesScalarFieldEnum = {
468
481
  id: 'id',
469
482
  interview_id: 'interview_id',
@@ -530,6 +543,7 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
530
543
  job_description_id: 'job_description_id',
531
544
  evaluation_plan_id: 'evaluation_plan_id',
532
545
  interview_id: 'interview_id',
546
+ assignment_id: 'assignment_id',
533
547
  status: 'status',
534
548
  state: 'state',
535
549
  round_status: 'round_status',
@@ -572,39 +586,6 @@ exports.Prisma.OrganisationScalarFieldEnum = {
572
586
  logo: 'logo'
573
587
  };
574
588
 
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
-
608
589
  exports.Prisma.PermissionScalarFieldEnum = {
609
590
  id: 'id',
610
591
  permissions: 'permissions',
@@ -772,10 +753,6 @@ exports.Prisma.NullableJsonNullValueInput = {
772
753
  JsonNull: Prisma.JsonNull
773
754
  };
774
755
 
775
- exports.Prisma.JsonNullValueInput = {
776
- JsonNull: Prisma.JsonNull
777
- };
778
-
779
756
  exports.Prisma.QueryMode = {
780
757
  default: 'default',
781
758
  insensitive: 'insensitive'
@@ -803,6 +780,12 @@ exports.ActionStatus = exports.$Enums.ActionStatus = {
803
780
  CANCELLED: 'CANCELLED'
804
781
  };
805
782
 
783
+ exports.ActivityActorType = exports.$Enums.ActivityActorType = {
784
+ USER: 'USER',
785
+ AI: 'AI',
786
+ SYSTEM: 'SYSTEM'
787
+ };
788
+
806
789
  exports.ApplicationStatus = exports.$Enums.ApplicationStatus = {
807
790
  PENDING: 'PENDING',
808
791
  IN_PROGRESS: 'IN_PROGRESS',
@@ -834,6 +817,12 @@ exports.AssessmentCategory = exports.$Enums.AssessmentCategory = {
834
817
  ASSIGNMENT: 'ASSIGNMENT'
835
818
  };
836
819
 
820
+ exports.AssignmentStatus = exports.$Enums.AssignmentStatus = {
821
+ AVAILABLE: 'AVAILABLE',
822
+ SCHEDULED: 'SCHEDULED',
823
+ CANCELLED: 'CANCELLED'
824
+ };
825
+
837
826
  exports.JobType = exports.$Enums.JobType = {
838
827
  Full_time: 'Full_time',
839
828
  Part_time: 'Part_time',
@@ -882,13 +871,6 @@ exports.EvaluationPlanType = exports.$Enums.EvaluationPlanType = {
882
871
  DELETED: 'DELETED'
883
872
  };
884
873
 
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'
890
- };
891
-
892
874
  exports.InterviewStatus = exports.$Enums.InterviewStatus = {
893
875
  INTERVIEW_REQUESTED: 'INTERVIEW_REQUESTED',
894
876
  SCHEDULED: 'SCHEDULED',
@@ -899,15 +881,11 @@ exports.InterviewStatus = exports.$Enums.InterviewStatus = {
899
881
  EVALUATED: 'EVALUATED'
900
882
  };
901
883
 
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'
884
+ exports.InterviewFeedback = exports.$Enums.InterviewFeedback = {
885
+ STRONG_HIRE: 'STRONG_HIRE',
886
+ HIRE: 'HIRE',
887
+ NO_HIRE: 'NO_HIRE',
888
+ STRONG_NO_HIRE: 'STRONG_NO_HIRE'
911
889
  };
912
890
 
913
891
  exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
@@ -953,19 +931,6 @@ exports.OrganisationSize = exports.$Enums.OrganisationSize = {
953
931
  FIVE_HUNDRED_PLUS: 'FIVE_HUNDRED_PLUS'
954
932
  };
955
933
 
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
-
969
934
  exports.AsyncOperationStatus = exports.$Enums.AsyncOperationStatus = {
970
935
  PENDING: 'PENDING',
971
936
  IN_PROGRESS: 'IN_PROGRESS',
@@ -997,11 +962,13 @@ exports.Prisma.ModelName = {
997
962
  CandidateQuestionResponse: 'CandidateQuestionResponse',
998
963
  UserRole: 'UserRole',
999
964
  Action: 'Action',
965
+ ActivityLog: 'ActivityLog',
1000
966
  Application: 'Application',
1001
967
  Approval: 'Approval',
1002
968
  Assessment: 'Assessment',
1003
969
  AssessmentLibrary: 'AssessmentLibrary',
1004
970
  AssessmentQuestion: 'AssessmentQuestion',
971
+ Assignment: 'Assignment',
1005
972
  AssignmentLibrary: 'AssignmentLibrary',
1006
973
  Budget: 'Budget',
1007
974
  Calendly: 'Calendly',
@@ -1011,17 +978,13 @@ exports.Prisma.ModelName = {
1011
978
  Feedback: 'Feedback',
1012
979
  FitCheck: 'FitCheck',
1013
980
  Google: 'Google',
1014
- IntermediateFeedback: 'IntermediateFeedback',
1015
981
  Interview: 'Interview',
1016
- InterviewLibrary: 'InterviewLibrary',
1017
982
  InterviewNotes: 'InterviewNotes',
1018
983
  JobDescription: 'JobDescription',
1019
984
  JobDescriptionData: 'JobDescriptionData',
1020
985
  Message: 'Message',
1021
986
  OngoingEvaluation: 'OngoingEvaluation',
1022
987
  Organisation: 'Organisation',
1023
- OverallFeedback: 'OverallFeedback',
1024
- Panelist: 'Panelist',
1025
988
  Permission: 'Permission',
1026
989
  AsyncOperation: 'AsyncOperation',
1027
990
  Question: 'Question',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file
@@ -24,12 +24,11 @@ model Assessment {
24
24
  updated_by String
25
25
  is_active Boolean @default(true)
26
26
  // Relations
27
- assessment_libarary AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
27
+ assessment_library AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
28
28
  candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
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
32
  panelistId String?
34
33
  User User? @relation(fields: [userId], references: [id])
35
34
  userId String?
@@ -72,7 +72,6 @@ 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
75
  interviews Interview[]
77
76
  applications Application[]
78
77
  // New optional one-to-one relation with AssessmentLibrary
@@ -16,44 +16,52 @@ enum InterviewFeedback {
16
16
  }
17
17
 
18
18
  model Interview {
19
- id String @id @default(uuid())
19
+ id String @id @default(uuid())
20
+ /// Foreign keys
21
+ organisation_id String
20
22
  candidate_id String
21
23
  interviewer_id String?
22
24
  evaluation_plan_id String
23
25
  application_id String?
24
26
  resume_id String
25
27
  job_description_id String
26
- organisation_id String
28
+ /// Data
27
29
  room_name String?
28
30
  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
31
  scheduled_start_time DateTime?
33
32
  scheduled_end_time DateTime?
34
33
  actual_start_time DateTime?
35
34
  actual_end_time DateTime?
36
35
  recording_url String?
37
- interview_status InterviewStatus @default(SCHEDULED)
36
+ interview_status InterviewStatus @default(SCHEDULED)
38
37
  google_event_id String?
39
- created_at DateTime @default(now())
40
- updated_at DateTime @updatedAt
38
+ /// Old Feedback fields will be deprecated soon
39
+ ai_interview_feedback InterviewFeedback?
40
+ interview_feedback InterviewFeedback?
41
+ overall_feedback String?
42
+ interview_rating Float? // Overall rating out of 100 based on evaluation
43
+ /// New Feedback fields
44
+ ai_feedback Json?
45
+ human_feedback Json?
46
+ interviewer_feedback Json?
47
+ section_feedback Json[]
48
+ /// Audit fields
49
+ created_at DateTime @default(now())
50
+ updated_at DateTime @updatedAt
41
51
  created_by String
42
52
  updated_by String
43
- is_active Boolean @default(true)
53
+ is_active Boolean @default(true)
44
54
  // Relations
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)
55
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
56
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
57
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
58
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
59
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
60
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
61
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
52
62
  ongoing_evaluation OngoingEvaluation?
53
- intermediateFeedbacks IntermediateFeedback[]
54
63
  transcripts Transcript[]
55
64
  suggestions Suggestion[]
56
- overallFeedback OverallFeedback[]
57
65
  feedback Feedback[]
58
66
  interviewNotes InterviewNotes[]
59
67
 
@@ -30,12 +30,10 @@ model Organisation {
30
30
  job_descriptions JobDescription[]
31
31
  assessment_library AssessmentLibrary[]
32
32
  assignment_library AssignmentLibrary[]
33
- interview_library InterviewLibrary[]
34
33
  interviews Interview[]
35
34
  assignments Assignment[]
36
35
  fit_check FitCheck[] // one-to-many link
37
36
  resumes Resume[] // one-to-many link
38
- panelists Panelist[] // one-to-many link
39
37
  approvals Approval[] // one-to-many link
40
38
  suggestions Suggestion[]
41
39
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
@@ -1,5 +1,5 @@
1
1
  model Transcript {
2
- id String @id @default(uuid())
2
+ id String @id @default(uuid())
3
3
  interview_id String?
4
4
  suggestion_id String?
5
5
  intermediate_feedback_id String?
@@ -8,17 +8,16 @@ model Transcript {
8
8
  candidate_timestamp DateTime?
9
9
  interviewer String
10
10
  candidate String
11
- order_no Int @default(autoincrement())
12
- created_at DateTime @default(now())
13
- updated_at DateTime @updatedAt
11
+ order_no Int @default(autoincrement())
12
+ created_at DateTime @default(now())
13
+ updated_at DateTime @updatedAt
14
14
  created_by String
15
15
  updated_by String
16
- is_active Boolean @default(true)
16
+ is_active Boolean @default(true)
17
17
  // Relations
18
- interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
19
- suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
20
- intermediate_feedback IntermediateFeedback? @relation(fields: [intermediate_feedback_id], references: [id], onDelete: SetNull)
21
- job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
18
+ interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
19
+ suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
20
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
22
21
 
23
22
  @@unique([interview_id, order_no])
24
23
  @@index([interview_id])
@@ -29,7 +29,6 @@ model User {
29
29
  job_description JobDescription[]
30
30
  hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
31
31
  approvals Approval[]
32
- panelist Panelist?
33
32
  sent_messages Message[] @relation("Sent Messages")
34
33
  received_messages Message[] @relation("Received Messages")
35
34
  profile_created Boolean
@@ -1,18 +0,0 @@
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
- }
@@ -1,31 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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
- }
@@ -1,24 +0,0 @@
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
- }