@adaptware/eagles-db 0.4.23 → 0.4.24

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.
Files changed (87) hide show
  1. package/README.md +15 -15
  2. package/bin/db-cli.js +91 -91
  3. package/client/edge.js +9 -15
  4. package/client/index-browser.js +1 -8
  5. package/client/index.d.ts +565 -234
  6. package/client/index.js +15 -21
  7. package/client/{query_engine-windows.dll.node → libquery_engine-darwin-arm64.dylib.node} +0 -0
  8. package/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  9. package/client/package.json +1 -1
  10. package/client/schema.prisma +15 -22
  11. package/client/wasm.js +9 -15
  12. package/package.json +58 -58
  13. package/prisma/schema/CandidateQuestionResponse.prisma +24 -24
  14. package/prisma/schema/UserRole.prisma +20 -20
  15. package/prisma/schema/action.prisma +35 -35
  16. package/prisma/schema/activityLog.prisma +22 -22
  17. package/prisma/schema/applications.prisma +56 -57
  18. package/prisma/schema/approval.prisma +14 -14
  19. package/prisma/schema/assessment.prisma +39 -39
  20. package/prisma/schema/assessmentLibrary.prisma +21 -21
  21. package/prisma/schema/assessmentQuestion.prisma +17 -17
  22. package/prisma/schema/assignment.prisma +48 -48
  23. package/prisma/schema/assignmentLibrary.prisma +20 -20
  24. package/prisma/schema/authModule.prisma +36 -36
  25. package/prisma/schema/budget.prisma +38 -38
  26. package/prisma/schema/calendly.prisma +18 -18
  27. package/prisma/schema/candidateProfile.prisma +26 -26
  28. package/prisma/schema/communication.prisma +156 -156
  29. package/prisma/schema/contactUs.prisma +12 -12
  30. package/prisma/schema/document.prisma +38 -37
  31. package/prisma/schema/evaluationPlan.prisma +74 -83
  32. package/prisma/schema/feedback.prisma +18 -18
  33. package/prisma/schema/fitCheck.prisma +58 -58
  34. package/prisma/schema/google.prisma +16 -16
  35. package/prisma/schema/integration.prisma +98 -98
  36. package/prisma/schema/interview.prisma +112 -112
  37. package/prisma/schema/interviewNotes.prisma +17 -17
  38. package/prisma/schema/jobApplicationFields.prisma +37 -37
  39. package/prisma/schema/jobApplicationResponse.prisma +33 -33
  40. package/prisma/schema/jobApplicationTemplate.prisma +30 -30
  41. package/prisma/schema/jobDescription.prisma +59 -57
  42. package/prisma/schema/jobDescriptionData.prisma +15 -15
  43. package/prisma/schema/jobProfile.prisma +56 -56
  44. package/prisma/schema/liveAnalysis.prisma +17 -17
  45. package/prisma/schema/message.prisma +15 -15
  46. package/prisma/schema/migrations/20260415120000_remove_job_profile_current_phase/migration.sql +2 -2
  47. package/prisma/schema/migrations/20260422120000_add_integration_provider_zoom/migration.sql +2 -2
  48. package/prisma/schema/migrations/20260422140000_add_zoom_meeting_tables/migration.sql +57 -57
  49. package/prisma/schema/migrations/20260422180000_add_zoom_webhook_event/migration.sql +18 -18
  50. package/prisma/schema/migrations/20260423140000_add_interview_platform/migration.sql +6 -6
  51. package/prisma/schema/migrations/20260423150000_remove_interview_zoom_topic/migration.sql +2 -2
  52. package/prisma/schema/migrations/20260423160000_zoom_meeting_uuid/migration.sql +4 -4
  53. package/prisma/schema/migrations/20260423170000_zoom_meeting_uuid_prisma_sync/migration.sql +2 -2
  54. package/prisma/schema/migrations/20260424120000_auth_module_user_provider_unique/migration.sql +5 -5
  55. package/prisma/schema/migrations/20260424130000_zoom_meeting_zoom_host_user_id/migration.sql +6 -6
  56. package/prisma/schema/migrations/20260425100000_zoom_participant_user_enum/migration.sql +22 -22
  57. package/prisma/schema/migrations/20260425110000_zoom_participant_zoom_id_required/migration.sql +13 -13
  58. package/prisma/schema/migrations/20260425120000_zoom_participant_id_nullable/migration.sql +4 -4
  59. package/prisma/schema/migrations/20260429140000_drop_evaluation_plan_job_order_unique/migration.sql +5 -5
  60. package/prisma/schema/migrations/20260429180000_eval_plan_timeline_optional_ongoing_duration/migration.sql +15 -15
  61. package/prisma/schema/migrations/20260430120000_drop_assessment_library_metadata_fields/migration.sql +8 -8
  62. package/prisma/schema/migrations/20260430140000_drop_question_question_type/migration.sql +5 -5
  63. package/prisma/schema/migrations/20260513120000_add_organisation_config/migration.sql +56 -56
  64. package/prisma/schema/migrations/20260514120000_dedupe_organisation_config/migration.sql +20 -20
  65. package/prisma/schema/migrations/20260515120000_add_interview_ai_assistance_mode/migration.sql +5 -5
  66. package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
  67. package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
  68. package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
  69. package/prisma/schema/migrations/migration_lock.toml +3 -3
  70. package/prisma/schema/notes.prisma +19 -19
  71. package/prisma/schema/ongoingEvaluation.prisma +72 -72
  72. package/prisma/schema/organisation.prisma +57 -57
  73. package/prisma/schema/organisationConfig.prisma +12 -12
  74. package/prisma/schema/permission.prisma +13 -13
  75. package/prisma/schema/promise.prisma +39 -39
  76. package/prisma/schema/questions.prisma +28 -28
  77. package/prisma/schema/refreshToken.prisma +10 -10
  78. package/prisma/schema/resume.prisma +34 -34
  79. package/prisma/schema/resumeData.prisma +15 -15
  80. package/prisma/schema/schema.prisma +16 -16
  81. package/prisma/schema/suggestion.prisma +20 -20
  82. package/prisma/schema/transcript.prisma +25 -25
  83. package/prisma/schema/user.prisma +93 -93
  84. package/prisma/schema/userProfile.prisma +15 -15
  85. package/prisma/schema/zoomMeeting.prisma +79 -79
  86. package/prisma/schema/migrations/20260626120000_add_evaluation_plan_share_scope/migration.sql +0 -14
  87. package/prisma/schema/migrations/20260626140000_add_evaluation_comment/migration.sql +0 -2
@@ -1,19 +1,19 @@
1
- model Notes {
2
- id String @id @default(uuid())
3
- application_id String
4
- user_id String
5
- note String
6
- pinned Boolean @default(false)
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
-
13
- // Relations
14
- application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
15
- user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
16
-
17
- @@index([application_id, created_at])
18
- @@index([user_id, created_at])
19
- }
1
+ model Notes {
2
+ id String @id @default(uuid())
3
+ application_id String
4
+ user_id String
5
+ note String
6
+ pinned Boolean @default(false)
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
+
13
+ // Relations
14
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
15
+ user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
16
+
17
+ @@index([application_id, created_at])
18
+ @@index([user_id, created_at])
19
+ }
@@ -1,72 +1,72 @@
1
- enum OngoingEvaluationState {
2
- NOT_STARTED
3
- IN_PROGRESS
4
- CLEARED
5
- SKIPPED
6
- NOT_CLEARED
7
- }
8
-
9
- enum OngoingEvaluationRoundStatus {
10
- NOT_SCHEDULED
11
- REQUESTED_SCHEDULING
12
- SCHEDULED
13
- IN_PROGRESS
14
- PENDING_EVALUATION
15
- EVALUATED
16
- }
17
-
18
- model OngoingEvaluation {
19
- // Primary Key
20
- id String @id @default(uuid())
21
- // Foreign Keys
22
- organisation_id String
23
- application_id String
24
- candidate_id String
25
- resume_id String
26
- job_description_id String
27
- evaluation_plan_id String
28
- interview_id String? @unique
29
- assignment_id String? @unique
30
- assessment_id String? @unique
31
- // Data Fields
32
- state OngoingEvaluationState? @default(NOT_STARTED)
33
- round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
34
- comments String? @default("")
35
- completed_at DateTime?
36
- is_committed Boolean?
37
- /// Evaluation Plan Fields Filled After Round Started
38
- title String?
39
- description String?
40
- order_no Int?
41
- format EvaluationRoundFormat?
42
- topics String[]
43
- assignee String?
44
- elimination_round Boolean? @default(false)
45
- evaluation_type EvaluationType?
46
- type_of_round RoundType?
47
- duration Int?
48
- deadline Int?
49
- duration_unit DurationUnit?
50
- details Json?
51
- // Audit Fields
52
- created_at DateTime @default(now())
53
- updated_at DateTime @updatedAt
54
- created_by String
55
- updated_by String
56
- is_active Boolean @default(true)
57
- is_current Boolean @default(false)
58
- // Relations
59
- jobDescription JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull)
60
- application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
61
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
62
- resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
63
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
64
- evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
65
- interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
66
- assignment Assignment?
67
- assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
68
-
69
- @@unique([application_id, evaluation_plan_id])
70
- @@index([application_id])
71
- @@index([evaluation_plan_id])
72
- }
1
+ enum OngoingEvaluationState {
2
+ NOT_STARTED
3
+ IN_PROGRESS
4
+ CLEARED
5
+ SKIPPED
6
+ NOT_CLEARED
7
+ }
8
+
9
+ enum OngoingEvaluationRoundStatus {
10
+ NOT_SCHEDULED
11
+ REQUESTED_SCHEDULING
12
+ SCHEDULED
13
+ IN_PROGRESS
14
+ PENDING_EVALUATION
15
+ EVALUATED
16
+ }
17
+
18
+ model OngoingEvaluation {
19
+ // Primary Key
20
+ id String @id @default(uuid())
21
+ // Foreign Keys
22
+ organisation_id String
23
+ application_id String
24
+ candidate_id String
25
+ resume_id String
26
+ job_description_id String
27
+ evaluation_plan_id String
28
+ interview_id String? @unique
29
+ assignment_id String? @unique
30
+ assessment_id String? @unique
31
+ // Data Fields
32
+ state OngoingEvaluationState? @default(NOT_STARTED)
33
+ round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
34
+ comments String? @default("")
35
+ completed_at DateTime?
36
+ is_committed Boolean?
37
+ /// Evaluation Plan Fields Filled After Round Started
38
+ title String?
39
+ description String?
40
+ order_no Int?
41
+ format EvaluationRoundFormat?
42
+ topics String[]
43
+ assignee String?
44
+ elimination_round Boolean? @default(false)
45
+ evaluation_type EvaluationType?
46
+ type_of_round RoundType?
47
+ duration Int?
48
+ deadline Int?
49
+ duration_unit DurationUnit?
50
+ details Json?
51
+ // Audit Fields
52
+ created_at DateTime @default(now())
53
+ updated_at DateTime @updatedAt
54
+ created_by String
55
+ updated_by String
56
+ is_active Boolean @default(true)
57
+ is_current Boolean @default(false)
58
+ // Relations
59
+ jobDescription JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull)
60
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
61
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
62
+ resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
63
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
64
+ evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
65
+ interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
66
+ assignment Assignment?
67
+ assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
68
+
69
+ @@unique([application_id, evaluation_plan_id])
70
+ @@index([application_id])
71
+ @@index([evaluation_plan_id])
72
+ }
@@ -1,57 +1,57 @@
1
- enum OrganisationSize {
2
- ONE_TO_TEN @map("1-10")
3
- ELEVEN_TO_FIFTY @map("11-50")
4
- FIFTY_ONE_TO_TWO_HUNDRED @map("51-200")
5
- TWO_HUNDRED_ONE_TO_FIVE_HUNDRED @map("201-500")
6
- FIVE_HUNDRED_PLUS @map("500+")
7
- }
8
-
9
- model Organisation {
10
- id String @id @default(uuid())
11
- name String @unique
12
- industry String
13
- about String
14
- website String
15
- size OrganisationSize @default(ONE_TO_TEN)
16
- phone String
17
- address String
18
- company_values Json[]
19
- allowed_email_domains String[]
20
-
21
- interviewers User[]
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
- alias String? @unique
28
- logo String?
29
- applications Application[]
30
- user_roles UserRole[]
31
- job_descriptions JobDescription[]
32
- job_profiles JobProfile[]
33
- assessment_library AssessmentLibrary[]
34
- assignment_library AssignmentLibrary[]
35
- interviews Interview[]
36
- assignments Assignment[]
37
- fit_check FitCheck[] // one-to-many link
38
- resumes Resume[] // one-to-many link
39
- approvals Approval[] // one-to-many link
40
- suggestions Suggestion[]
41
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
42
- actions Action[]
43
- integration_credentials IntegrationCredential[]
44
- zoho_sync_mappings ZohoSyncMapping[]
45
- assessments Assessment[]
46
- timezone String @default("Asia/Kolkata")
47
- organisation_configs OrganisationConfig[]
48
- job_application_fields JobApplicationField[]
49
- documents Document[]
50
- job_application_templates JobApplicationTemplate[]
51
-
52
- channel_provider_configs ChannelProviderConfig[]
53
- conversations Conversation[]
54
- communication_messages CommunicationMessage[]
55
-
56
- @@index([name])
57
- }
1
+ enum OrganisationSize {
2
+ ONE_TO_TEN @map("1-10")
3
+ ELEVEN_TO_FIFTY @map("11-50")
4
+ FIFTY_ONE_TO_TWO_HUNDRED @map("51-200")
5
+ TWO_HUNDRED_ONE_TO_FIVE_HUNDRED @map("201-500")
6
+ FIVE_HUNDRED_PLUS @map("500+")
7
+ }
8
+
9
+ model Organisation {
10
+ id String @id @default(uuid())
11
+ name String @unique
12
+ industry String
13
+ about String
14
+ website String
15
+ size OrganisationSize @default(ONE_TO_TEN)
16
+ phone String
17
+ address String
18
+ company_values Json[]
19
+ allowed_email_domains String[]
20
+
21
+ interviewers User[]
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
+ alias String? @unique
28
+ logo String?
29
+ applications Application[]
30
+ user_roles UserRole[]
31
+ job_descriptions JobDescription[]
32
+ job_profiles JobProfile[]
33
+ assessment_library AssessmentLibrary[]
34
+ assignment_library AssignmentLibrary[]
35
+ interviews Interview[]
36
+ assignments Assignment[]
37
+ fit_check FitCheck[] // one-to-many link
38
+ resumes Resume[] // one-to-many link
39
+ approvals Approval[] // one-to-many link
40
+ suggestions Suggestion[]
41
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
42
+ actions Action[]
43
+ integration_credentials IntegrationCredential[]
44
+ zoho_sync_mappings ZohoSyncMapping[]
45
+ assessments Assessment[]
46
+ timezone String @default("Asia/Kolkata")
47
+ organisation_configs OrganisationConfig[]
48
+ job_application_fields JobApplicationField[]
49
+ documents Document[]
50
+ job_application_templates JobApplicationTemplate[]
51
+
52
+ channel_provider_configs ChannelProviderConfig[]
53
+ conversations Conversation[]
54
+ communication_messages CommunicationMessage[]
55
+
56
+ @@index([name])
57
+ }
@@ -1,12 +1,12 @@
1
- model OrganisationConfig {
2
- id String @id @default(uuid())
3
- organisation_id String
4
- config_key String
5
- value Json
6
- created_at DateTime @default(now())
7
- updated_at DateTime @updatedAt
8
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
9
-
10
- @@unique([organisation_id, config_key])
11
- @@map("organisationConfig")
12
- }
1
+ model OrganisationConfig {
2
+ id String @id @default(uuid())
3
+ organisation_id String
4
+ config_key String
5
+ value Json
6
+ created_at DateTime @default(now())
7
+ updated_at DateTime @updatedAt
8
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
9
+
10
+ @@unique([organisation_id, config_key])
11
+ @@map("organisationConfig")
12
+ }
@@ -1,13 +1,13 @@
1
- model Permission {
2
- id String @id @default(uuid())
3
- permissions String[] @default([])
4
- created_by String?
5
- updated_by String?
6
- updated_at DateTime @updatedAt
7
- created_at DateTime @default(now())
8
- is_active Boolean @default(true)
9
- user User?
10
- user_roles UserRole?
11
-
12
- @@index([created_at])
13
- }
1
+ model Permission {
2
+ id String @id @default(uuid())
3
+ permissions String[] @default([])
4
+ created_by String?
5
+ updated_by String?
6
+ updated_at DateTime @updatedAt
7
+ created_at DateTime @default(now())
8
+ is_active Boolean @default(true)
9
+ user User?
10
+ user_roles UserRole?
11
+
12
+ @@index([created_at])
13
+ }
@@ -1,39 +1,39 @@
1
- enum AsyncOperationStatus {
2
- PENDING
3
- IN_PROGRESS
4
- SUCCESS
5
- FAILED
6
- RETRYING
7
- CANCELLED
8
- }
9
-
10
- model AsyncOperation {
11
- id String @id @default(uuid())
12
- // Identification
13
- operation_name String
14
- // Status tracking
15
- status AsyncOperationStatus @default(PENDING)
16
- started_at DateTime?
17
- completed_at DateTime?
18
- // Execution metadata
19
- payload Json?
20
- metadata Json?
21
- // Tracing
22
- correlationId String?
23
- sourceService String?
24
- // Retry information
25
- retry_count Int @default(0)
26
- max_retries Int @default(0)
27
- next_retry_at DateTime?
28
- // Error information
29
- error_message String?
30
- error_details String?
31
- // Audit fields
32
- created_at DateTime @default(now())
33
- updated_at DateTime @updatedAt
34
- is_active Boolean @default(true)
35
-
36
- @@index([status])
37
- @@index([operation_name])
38
- @@index([correlationId])
39
- }
1
+ enum AsyncOperationStatus {
2
+ PENDING
3
+ IN_PROGRESS
4
+ SUCCESS
5
+ FAILED
6
+ RETRYING
7
+ CANCELLED
8
+ }
9
+
10
+ model AsyncOperation {
11
+ id String @id @default(uuid())
12
+ // Identification
13
+ operation_name String
14
+ // Status tracking
15
+ status AsyncOperationStatus @default(PENDING)
16
+ started_at DateTime?
17
+ completed_at DateTime?
18
+ // Execution metadata
19
+ payload Json?
20
+ metadata Json?
21
+ // Tracing
22
+ correlationId String?
23
+ sourceService String?
24
+ // Retry information
25
+ retry_count Int @default(0)
26
+ max_retries Int @default(0)
27
+ next_retry_at DateTime?
28
+ // Error information
29
+ error_message String?
30
+ error_details String?
31
+ // Audit fields
32
+ created_at DateTime @default(now())
33
+ updated_at DateTime @updatedAt
34
+ is_active Boolean @default(true)
35
+
36
+ @@index([status])
37
+ @@index([operation_name])
38
+ @@index([correlationId])
39
+ }
@@ -1,28 +1,28 @@
1
- enum Difficulty {
2
- EASY // simple/basic questions
3
- MEDIUM // moderate difficulty
4
- HARD // challenging questions
5
- }
6
-
7
- model Question {
8
- id String @id @default(uuid())
9
- assessment_library_id String?
10
- evaluation_plan_id String?
11
- candidate_id String?
12
- skill String?
13
- question String
14
- answer String
15
- options String[] // For MCQ's
16
- max_score Float?
17
- difficulty Difficulty?
18
- created_by String
19
- updated_by String
20
- created_at DateTime @default(now())
21
- updated_at DateTime @updatedAt
22
- is_active Boolean @default(true)
23
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: SetNull)
24
- assessments AssessmentQuestion[] @relation("QuestionToAssessmentQuestion")
25
- assessmentLibrary AssessmentLibrary? @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade)
26
- evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
27
- candidateResponse CandidateQuestionResponse[]
28
- }
1
+ enum Difficulty {
2
+ EASY // simple/basic questions
3
+ MEDIUM // moderate difficulty
4
+ HARD // challenging questions
5
+ }
6
+
7
+ model Question {
8
+ id String @id @default(uuid())
9
+ assessment_library_id String?
10
+ evaluation_plan_id String?
11
+ candidate_id String?
12
+ skill String?
13
+ question String
14
+ answer String
15
+ options String[] // For MCQ's
16
+ max_score Float?
17
+ difficulty Difficulty?
18
+ created_by String
19
+ updated_by String
20
+ created_at DateTime @default(now())
21
+ updated_at DateTime @updatedAt
22
+ is_active Boolean @default(true)
23
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: SetNull)
24
+ assessments AssessmentQuestion[] @relation("QuestionToAssessmentQuestion")
25
+ assessmentLibrary AssessmentLibrary? @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade)
26
+ evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
27
+ candidateResponse CandidateQuestionResponse[]
28
+ }
@@ -1,10 +1,10 @@
1
- model RefreshToken {
2
- id String @id @default(uuid())
3
- user_id String
4
- token String @unique
5
- is_active Boolean @default(true)
6
- expires_at DateTime
7
- created_at DateTime @default(now())
8
- updated_at DateTime @updatedAt
9
- user User @relation("TokenRefresh", fields: [user_id], references: [id], onDelete: Cascade)
10
- }
1
+ model RefreshToken {
2
+ id String @id @default(uuid())
3
+ user_id String
4
+ token String @unique
5
+ is_active Boolean @default(true)
6
+ expires_at DateTime
7
+ created_at DateTime @default(now())
8
+ updated_at DateTime @updatedAt
9
+ user User @relation("TokenRefresh", fields: [user_id], references: [id], onDelete: Cascade)
10
+ }
@@ -1,34 +1,34 @@
1
- model Resume {
2
- id String @id @default(uuid())
3
- user_id String?
4
- organisation_id String?
5
- job_description_id String?
6
- /// @deprecated Prefer `document_id` + `Document`. Kept until backfill completes.
7
- uploaded_resume_path String?
8
- document_id String? @unique
9
- /// @deprecated Prefer `Document.file_hash`. Kept for legacy read fallback.
10
- file_hash String?
11
- summary Json?
12
- created_at DateTime @default(now())
13
- updated_at DateTime @updatedAt
14
- created_by String
15
- updated_by String
16
- is_active Boolean @default(true)
17
- name String?
18
- user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
19
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
20
- job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
21
- document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
22
- applications Application[]
23
- interviews Interview[]
24
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
25
-
26
- resume_data ResumeData[] // one-to-many link
27
- fit_check FitCheck[] // one-to-many link
28
- // inverse side of the relation — no foreign key here
29
- candidate_profile CandidateProfile? // one-to-one link
30
- yearsOfExperience Int?
31
-
32
- @@index([user_id])
33
- @@index([file_hash])
34
- }
1
+ model Resume {
2
+ id String @id @default(uuid())
3
+ user_id String?
4
+ organisation_id String?
5
+ job_description_id String?
6
+ /// @deprecated Prefer `document_id` + `Document`. Kept until backfill completes.
7
+ uploaded_resume_path String?
8
+ document_id String? @unique
9
+ /// @deprecated Prefer `Document.file_hash`. Kept for legacy read fallback.
10
+ file_hash String?
11
+ summary Json?
12
+ created_at DateTime @default(now())
13
+ updated_at DateTime @updatedAt
14
+ created_by String
15
+ updated_by String
16
+ is_active Boolean @default(true)
17
+ name String?
18
+ user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
19
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
20
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
21
+ document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
22
+ applications Application[]
23
+ interviews Interview[]
24
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
25
+
26
+ resume_data ResumeData[] // one-to-many link
27
+ fit_check FitCheck[] // one-to-many link
28
+ // inverse side of the relation — no foreign key here
29
+ candidate_profile CandidateProfile? // one-to-one link
30
+ yearsOfExperience Int?
31
+
32
+ @@index([user_id])
33
+ @@index([file_hash])
34
+ }
@@ -1,15 +1,15 @@
1
- model ResumeData {
2
- id String @id @default(uuid())
3
- resume_id String
4
- key String
5
- value String
6
- created_at DateTime @default(now())
7
- updated_at DateTime @updatedAt
8
- created_by String
9
- updated_by String
10
- is_active Boolean @default(true)
11
-
12
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
13
-
14
- @@index([created_at])
15
- }
1
+ model ResumeData {
2
+ id String @id @default(uuid())
3
+ resume_id String
4
+ key String
5
+ value String
6
+ created_at DateTime @default(now())
7
+ updated_at DateTime @updatedAt
8
+ created_by String
9
+ updated_by String
10
+ is_active Boolean @default(true)
11
+
12
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
13
+
14
+ @@index([created_at])
15
+ }
@@ -1,16 +1,16 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
5
- // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
6
-
7
- generator client {
8
- provider = "prisma-client-js"
9
- output = "../../client"
10
- binaryTargets = ["native", "linux-arm64-openssl-1.1.x"]
11
- }
12
-
13
- datasource db {
14
- provider = "postgresql"
15
- url = env("DATABASE_URL")
16
- }
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
5
+ // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
6
+
7
+ generator client {
8
+ provider = "prisma-client-js"
9
+ output = "../../client"
10
+ binaryTargets = ["native", "linux-arm64-openssl-1.1.x"]
11
+ }
12
+
13
+ datasource db {
14
+ provider = "postgresql"
15
+ url = env("DATABASE_URL")
16
+ }