@adaptware/eagles-db 0.4.35 → 0.4.36

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 (86) hide show
  1. package/client/edge.js +11 -869
  2. package/client/index-browser.js +42 -901
  3. package/client/index.d.ts +27423 -80978
  4. package/client/index.js +11 -869
  5. package/client/package.json +1 -1
  6. package/client/schema.prisma +128 -1594
  7. package/client/wasm.js +11 -869
  8. package/package.json +1 -1
  9. package/prisma/schema/CandidateQuestionResponse.prisma +0 -1
  10. package/prisma/schema/UserRole.prisma +0 -1
  11. package/prisma/schema/action.prisma +0 -5
  12. package/prisma/schema/activityLog.prisma +0 -3
  13. package/prisma/schema/applications.prisma +2 -12
  14. package/prisma/schema/approval.prisma +0 -2
  15. package/prisma/schema/assessment.prisma +0 -1
  16. package/prisma/schema/assessmentLibrary.prisma +0 -1
  17. package/prisma/schema/assessmentQuestion.prisma +0 -1
  18. package/prisma/schema/assignment.prisma +0 -3
  19. package/prisma/schema/assignmentLibrary.prisma +0 -1
  20. package/prisma/schema/authModule.prisma +0 -3
  21. package/prisma/schema/budget.prisma +0 -6
  22. package/prisma/schema/calendly.prisma +0 -2
  23. package/prisma/schema/candidateProfile.prisma +0 -2
  24. package/prisma/schema/communication.prisma +0 -11
  25. package/prisma/schema/contactUs.prisma +0 -2
  26. package/prisma/schema/document.prisma +1 -4
  27. package/prisma/schema/evaluationPlan.prisma +10 -35
  28. package/prisma/schema/feedback.prisma +0 -1
  29. package/prisma/schema/fitCheck.prisma +0 -3
  30. package/prisma/schema/google.prisma +0 -2
  31. package/prisma/schema/integration.prisma +0 -13
  32. package/prisma/schema/interview.prisma +0 -9
  33. package/prisma/schema/interviewNotes.prisma +0 -1
  34. package/prisma/schema/jobApplicationFields.prisma +0 -3
  35. package/prisma/schema/jobApplicationResponse.prisma +0 -1
  36. package/prisma/schema/jobApplicationTemplate.prisma +0 -3
  37. package/prisma/schema/jobDescription.prisma +35 -43
  38. package/prisma/schema/jobDescriptionData.prisma +0 -1
  39. package/prisma/schema/jobProfile.prisma +0 -3
  40. package/prisma/schema/liveAnalysis.prisma +0 -1
  41. package/prisma/schema/message.prisma +0 -2
  42. package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
  43. package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
  44. package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
  45. package/prisma/schema/migrations/{20260706120000_add_resume_rendered_export → 20260710120000_add_resume_rendered_export_fields}/migration.sql +2 -5
  46. package/prisma/schema/notes.prisma +0 -1
  47. package/prisma/schema/ongoingEvaluation.prisma +0 -7
  48. package/prisma/schema/organisation.prisma +31 -39
  49. package/prisma/schema/organisationConfig.prisma +0 -1
  50. package/prisma/schema/permission.prisma +0 -1
  51. package/prisma/schema/promise.prisma +0 -3
  52. package/prisma/schema/questions.prisma +0 -4
  53. package/prisma/schema/refreshToken.prisma +0 -2
  54. package/prisma/schema/resume.prisma +4 -5
  55. package/prisma/schema/resumeData.prisma +0 -1
  56. package/prisma/schema/schema.prisma +0 -2
  57. package/prisma/schema/suggestion.prisma +0 -1
  58. package/prisma/schema/transcript.prisma +0 -1
  59. package/prisma/schema/user.prisma +0 -10
  60. package/prisma/schema/userProfile.prisma +0 -2
  61. package/prisma/schema/zoomMeeting.prisma +0 -5
  62. package/client/libquery_engine-darwin.dylib.node +0 -0
  63. package/prisma/.DS_Store +0 -0
  64. package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +0 -2
  65. package/prisma/schema/.DS_Store +0 -0
  66. package/prisma/schema/activityEvent.prisma +0 -138
  67. package/prisma/schema/applicationAnalytics.prisma +0 -87
  68. package/prisma/schema/assessmentRoundAnalytics.prisma +0 -119
  69. package/prisma/schema/assignmentRoundAnalytics.prisma +0 -109
  70. package/prisma/schema/interviewRoundAnalytics.prisma +0 -140
  71. package/prisma/schema/interviewerAnalytics.prisma +0 -129
  72. package/prisma/schema/jobRoundAnalytics.prisma +0 -101
  73. package/prisma/schema/migrations/20260519120000_add_analytics_schema/migration.sql +0 -84
  74. package/prisma/schema/migrations/20260625120000_add_interviewer_analytics/migration.sql +0 -26
  75. package/prisma/schema/migrations/20260629120000_add_user_lifecycle_activity_events/migration.sql +0 -13
  76. package/prisma/schema/migrations/20260629140000_drop_organisation_org_code/migration.sql +0 -2
  77. package/prisma/schema/migrations/20260629160000_employee_codes_dual_interviewer_analytics/migration.sql +0 -87
  78. package/prisma/schema/migrations/20260630120000_add_application_sources/migration.sql +0 -38
  79. package/prisma/schema/migrations/20260701120000_add_source_effectiveness_analytics/migration.sql +0 -40
  80. package/prisma/schema/migrations/20260702120000_add_analytics_daily_tables/migration.sql +0 -232
  81. package/prisma/schema/openJobAnalytics.prisma +0 -85
  82. package/prisma/schema/pipelineDistributionAnalytics.prisma +0 -64
  83. package/prisma/schema/reportingOverviewJobAnalytics.prisma +0 -49
  84. package/prisma/schema/roundAnalytics.prisma +0 -145
  85. package/prisma/schema/source.prisma +0 -36
  86. package/prisma/schema/sourceEffectivenessAnalytics.prisma +0 -79
@@ -4,64 +4,56 @@ enum JobDescriptionStatus {
4
4
  ACTIVE
5
5
  DEACTIVATED
6
6
  CLOSED
7
-
8
- @@schema("public")
9
7
  }
10
8
 
11
9
  model JobDescription {
12
- id String @id @default(uuid())
10
+ id String @id @default(uuid())
13
11
  organisation_id String
14
12
  hiring_manager_id String?
15
- status JobDescriptionStatus @default(DRAFT)
13
+ status JobDescriptionStatus @default(DRAFT)
16
14
  screeningQuestions String[]
17
15
  recommendedQuestions Json[]
18
16
  /// @deprecated Prefer `source_document_id` + `Document` (type JOB_DESCRIPTION).
19
17
  uploaded_job_description_path String?
20
- source_document_id String? @unique
21
- rendered_jd_document_id String? @unique
22
- rendered_jd_document Document? @relation("RenderedJdDocument", fields: [rendered_jd_document_id], references: [id], onDelete: SetNull)
23
- is_plan_published Boolean @default(false)
24
- is_posted Boolean @default(false)
18
+ source_document_id String? @unique
19
+ rendered_jd_document_id String? @unique
20
+ rendered_jd_document Document? @relation("RenderedJdDocument", fields: [rendered_jd_document_id], references: [id], onDelete: SetNull)
21
+ is_plan_published Boolean @default(false)
22
+ is_posted Boolean @default(false)
25
23
  summary Json?
26
24
  ai_insight Json?
27
25
  job_fit_comparison Json?
28
- target_closing_date DateTime?
29
- closing_date DateTime?
30
-
31
- job_number Int?
32
- job_code String? @unique
33
26
  // Audit fields
34
- created_at DateTime @default(now())
35
- updated_at DateTime @updatedAt
36
- created_by String
37
- updated_by String
38
- is_active Boolean @default(true)
39
- openings Int @default(1)
40
- job_profile_id String?
41
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
42
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
43
- source_document Document? @relation("SourceDocument", fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
44
- applications Application[]
45
- interviews Interview[]
46
- assignments Assignment[]
47
- fit_check FitCheck[] // one-to-many link
48
- job_description_data JobDescriptionData[] // one-to-many link
49
- evaluationPlan EvaluationPlan[] // relation to evaluation methods
50
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
51
- assignment_library AssignmentLibrary[]
52
- approvals Approval[] // one-to-many relation
53
- resumes Resume[] // one-to-many link
54
- budget Budget?
55
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
56
- recruiters User[]
57
- transcripts Transcript[]
58
- integration_job_syncs IntegrationJobSync[]
59
- job_application_template JobApplicationTemplate?
60
- conversations Conversation[]
61
- communication_messages CommunicationMessage[]
27
+ created_at DateTime @default(now())
28
+ updated_at DateTime @updatedAt
29
+ created_by String
30
+ updated_by String
31
+ is_active Boolean @default(true)
32
+ openings Int @default(1)
33
+ job_profile_id String?
34
+ job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
35
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
36
+ source_document Document? @relation("SourceDocument", fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
37
+ applications Application[]
38
+ interviews Interview[]
39
+ assignments Assignment[]
40
+ fit_check FitCheck[] // one-to-many link
41
+ job_description_data JobDescriptionData[] // one-to-many link
42
+ evaluationPlan EvaluationPlan[] // relation to evaluation methods
43
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
44
+ assignment_library AssignmentLibrary[]
45
+ approvals Approval[] // one-to-many relation
46
+ resumes Resume[] // one-to-many link
47
+ budget Budget?
48
+ hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
49
+ recruiters User[]
50
+ transcripts Transcript[]
51
+ integration_job_syncs IntegrationJobSync[]
52
+ job_application_template JobApplicationTemplate?
53
+ conversations Conversation[]
54
+ communication_messages CommunicationMessage[]
62
55
 
63
56
  @@index([organisation_id])
64
57
  @@index([hiring_manager_id])
65
58
  @@index([job_profile_id])
66
- @@schema("public")
67
59
  }
@@ -12,5 +12,4 @@ model JobDescriptionData {
12
12
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
13
13
 
14
14
  @@unique([job_description_id, key])
15
- @@schema("public")
16
15
  }
@@ -3,8 +3,6 @@ enum JobProfileStatus {
3
3
  INTAKE_SENT
4
4
  INTAKE_IN_PROGRESS
5
5
  COMPLETE
6
-
7
- @@schema("public")
8
6
  }
9
7
 
10
8
  model JobProfile {
@@ -55,5 +53,4 @@ model JobProfile {
55
53
  @@index([hiring_manager_id])
56
54
  @@index([assigned_to])
57
55
  @@index([created_by])
58
- @@schema("public")
59
56
  }
@@ -14,5 +14,4 @@ model LiveAnalysis {
14
14
  interview Interview @relation(fields: [interview_id], references: [id])
15
15
 
16
16
  @@index([interview_id])
17
- @@schema("public")
18
17
  }
@@ -12,6 +12,4 @@ model Message {
12
12
  created_by String
13
13
  updated_by String
14
14
  is_active Boolean @default(true)
15
-
16
- @@schema("public")
17
15
  }
@@ -0,0 +1,25 @@
1
+ -- Safe to re-run: adds record_kind without breaking existing ongoing evaluations.
2
+
3
+ DO $$ BEGIN
4
+ CREATE TYPE "OngoingEvaluationRecordKind" AS ENUM (
5
+ 'AI_RECOMMENDED',
6
+ 'PLAN_SELECTED',
7
+ 'COMMITTED'
8
+ );
9
+ EXCEPTION
10
+ WHEN duplicate_object THEN NULL;
11
+ END $$;
12
+
13
+ ALTER TABLE "OngoingEvaluation"
14
+ ADD COLUMN IF NOT EXISTS "record_kind" "OngoingEvaluationRecordKind";
15
+
16
+ ALTER TABLE "OngoingEvaluation"
17
+ ALTER COLUMN "evaluation_plan_id" DROP NOT NULL;
18
+
19
+ -- All existing rows are real pipeline rounds — not pre-Proceed drafts.
20
+ UPDATE "OngoingEvaluation"
21
+ SET "record_kind" = 'COMMITTED'
22
+ WHERE "record_kind" IS NULL;
23
+
24
+ CREATE INDEX IF NOT EXISTS "OngoingEvaluation_application_id_record_kind_idx"
25
+ ON "OngoingEvaluation"("application_id", "record_kind");
@@ -0,0 +1,24 @@
1
+ -- Replace record_kind enum with is_committed (null = legacy, false = draft, true = committed).
2
+
3
+ ALTER TABLE "OngoingEvaluation"
4
+ ADD COLUMN IF NOT EXISTS "is_committed" BOOLEAN;
5
+
6
+ UPDATE "OngoingEvaluation"
7
+ SET "is_committed" = false
8
+ WHERE "record_kind" IN ('AI_RECOMMENDED', 'PLAN_SELECTED');
9
+
10
+ UPDATE "OngoingEvaluation"
11
+ SET "is_committed" = true
12
+ WHERE "record_kind" = 'COMMITTED';
13
+
14
+ -- Legacy rows without record_kind stay null (treated as committed in app queries).
15
+
16
+ DROP INDEX IF EXISTS "OngoingEvaluation_application_id_record_kind_idx";
17
+
18
+ ALTER TABLE "OngoingEvaluation"
19
+ DROP COLUMN IF EXISTS "record_kind";
20
+
21
+ DROP TYPE IF EXISTS "OngoingEvaluationRecordKind";
22
+
23
+ CREATE INDEX IF NOT EXISTS "OngoingEvaluation_application_id_is_committed_idx"
24
+ ON "OngoingEvaluation"("application_id", "is_committed");
@@ -0,0 +1,2 @@
1
+ -- Drop unused per-job AI recommendation threshold storage (defaults live in application code).
2
+ ALTER TABLE "JobDescription" DROP COLUMN IF EXISTS "recommendation_config";
@@ -1,9 +1,6 @@
1
- -- Resume ATS export: persisted template + rendered export document pointer.
2
- -- Additive and nullable; no backfill required (null = "never exported ATS layout").
3
-
4
1
  -- AlterTable
5
- ALTER TABLE "Resume" ADD COLUMN "rendered_export_document_id" TEXT,
6
- ADD COLUMN "resume_template_id" TEXT;
2
+ ALTER TABLE "Resume" ADD COLUMN "rendered_export_document_id" TEXT,
3
+ ADD COLUMN "resume_template_id" TEXT;
7
4
 
8
5
  -- CreateIndex
9
6
  CREATE UNIQUE INDEX "Resume_rendered_export_document_id_key" ON "Resume"("rendered_export_document_id");
@@ -16,5 +16,4 @@ model Notes {
16
16
 
17
17
  @@index([application_id, created_at])
18
18
  @@index([user_id, created_at])
19
- @@schema("public")
20
19
  }
@@ -4,8 +4,6 @@ enum OngoingEvaluationState {
4
4
  CLEARED
5
5
  SKIPPED
6
6
  NOT_CLEARED
7
-
8
- @@schema("public")
9
7
  }
10
8
 
11
9
  enum OngoingEvaluationRoundStatus {
@@ -15,8 +13,6 @@ enum OngoingEvaluationRoundStatus {
15
13
  IN_PROGRESS
16
14
  PENDING_EVALUATION
17
15
  EVALUATED
18
-
19
- @@schema("public")
20
16
  }
21
17
 
22
18
  model OngoingEvaluation {
@@ -43,7 +39,6 @@ model OngoingEvaluation {
43
39
  description String?
44
40
  order_no Int?
45
41
  format EvaluationRoundFormat?
46
- round_purpose String?
47
42
  topics String[]
48
43
  assignee String?
49
44
  elimination_round Boolean? @default(false)
@@ -53,7 +48,6 @@ model OngoingEvaluation {
53
48
  deadline Int?
54
49
  duration_unit DurationUnit?
55
50
  details Json?
56
- category EvaluationCategory?
57
51
  // Audit Fields
58
52
  created_at DateTime @default(now())
59
53
  updated_at DateTime @updatedAt
@@ -75,5 +69,4 @@ model OngoingEvaluation {
75
69
  @@unique([application_id, evaluation_plan_id])
76
70
  @@index([application_id])
77
71
  @@index([evaluation_plan_id])
78
- @@schema("public")
79
72
  }
@@ -4,8 +4,6 @@ enum OrganisationSize {
4
4
  FIFTY_ONE_TO_TWO_HUNDRED @map("51-200")
5
5
  TWO_HUNDRED_ONE_TO_FIVE_HUNDRED @map("201-500")
6
6
  FIVE_HUNDRED_PLUS @map("500+")
7
-
8
- @@schema("public")
9
7
  }
10
8
 
11
9
  model Organisation {
@@ -20,46 +18,40 @@ model Organisation {
20
18
  company_values Json[]
21
19
  allowed_email_domains String[]
22
20
 
23
- interviewers User[]
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
- alias String? @unique
30
- logo String?
31
- job_sequence Int @default(1)
32
- employee_sequence Int @default(1)
33
- applications Application[]
34
- user_roles UserRole[]
35
- job_descriptions JobDescription[]
36
- job_profiles JobProfile[]
37
- assessment_library AssessmentLibrary[]
38
- assignment_library AssignmentLibrary[]
39
- interviews Interview[]
40
- assignments Assignment[]
41
- fit_check FitCheck[] // one-to-many link
42
- resumes Resume[] // one-to-many link
43
- approvals Approval[] // one-to-many link
44
- suggestions Suggestion[]
45
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
46
- actions Action[]
47
- integration_credentials IntegrationCredential[]
48
- zoho_sync_mappings ZohoSyncMapping[]
49
- assessments Assessment[]
50
- timezone String @default("Asia/Kolkata")
51
- organisation_configs OrganisationConfig[]
52
- activity_events ActivityEvent[]
53
-
54
- channel_provider_configs ChannelProviderConfig[]
55
- conversations Conversation[]
56
- communication_messages CommunicationMessage[]
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[]
57
48
  job_application_fields JobApplicationField[]
58
49
  documents Document[]
59
50
  job_application_templates JobApplicationTemplate[]
60
- sources Source[]
61
- // departments Department[]
51
+
52
+ channel_provider_configs ChannelProviderConfig[]
53
+ conversations Conversation[]
54
+ communication_messages CommunicationMessage[]
62
55
 
63
56
  @@index([name])
64
- @@schema("public")
65
57
  }
@@ -9,5 +9,4 @@ model OrganisationConfig {
9
9
 
10
10
  @@unique([organisation_id, config_key])
11
11
  @@map("organisationConfig")
12
- @@schema("public")
13
12
  }
@@ -10,5 +10,4 @@ model Permission {
10
10
  user_roles UserRole?
11
11
 
12
12
  @@index([created_at])
13
- @@schema("public")
14
13
  }
@@ -5,8 +5,6 @@ enum AsyncOperationStatus {
5
5
  FAILED
6
6
  RETRYING
7
7
  CANCELLED
8
-
9
- @@schema("public")
10
8
  }
11
9
 
12
10
  model AsyncOperation {
@@ -38,5 +36,4 @@ model AsyncOperation {
38
36
  @@index([status])
39
37
  @@index([operation_name])
40
38
  @@index([correlationId])
41
- @@schema("public")
42
39
  }
@@ -2,8 +2,6 @@ enum Difficulty {
2
2
  EASY // simple/basic questions
3
3
  MEDIUM // moderate difficulty
4
4
  HARD // challenging questions
5
-
6
- @@schema("public")
7
5
  }
8
6
 
9
7
  model Question {
@@ -27,6 +25,4 @@ model Question {
27
25
  assessmentLibrary AssessmentLibrary? @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade)
28
26
  evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
29
27
  candidateResponse CandidateQuestionResponse[]
30
-
31
- @@schema("public")
32
28
  }
@@ -7,6 +7,4 @@ model RefreshToken {
7
7
  created_at DateTime @default(now())
8
8
  updated_at DateTime @updatedAt
9
9
  user User @relation("TokenRefresh", fields: [user_id], references: [id], onDelete: Cascade)
10
-
11
- @@schema("public")
12
10
  }
@@ -6,9 +6,9 @@ model Resume {
6
6
  /// @deprecated Prefer `document_id` + `Document`. Kept until backfill completes.
7
7
  uploaded_resume_path String?
8
8
  document_id String? @unique
9
- /// Latest ATS template export (PDF). Null until first successful export.
9
+ /// Latest rendered ATS export document (PDF/DOCX). Mirrors JD `rendered_jd_document_id`.
10
10
  rendered_export_document_id String? @unique
11
- /// Last chosen ATS layout template id (e.g. ats-classic). Set on first export.
11
+ /// Last template id used for the linked rendered export (cache key with fingerprints).
12
12
  resume_template_id String?
13
13
  /// @deprecated Prefer `Document.file_hash`. Kept for legacy read fallback.
14
14
  file_hash String?
@@ -22,8 +22,8 @@ model Resume {
22
22
  user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
23
23
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
24
24
  job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
25
- document Document? @relation("ResumeSourceDocument", fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
26
- rendered_export_document Document? @relation("RenderedResumeExport", fields: [rendered_export_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
25
+ document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
26
+ rendered_export_document Document? @relation("RenderedResumeExportDocument", fields: [rendered_export_document_id], references: [id], onDelete: SetNull)
27
27
  applications Application[]
28
28
  interviews Interview[]
29
29
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
@@ -36,5 +36,4 @@ model Resume {
36
36
 
37
37
  @@index([user_id])
38
38
  @@index([file_hash])
39
- @@schema("public")
40
39
  }
@@ -12,5 +12,4 @@ model ResumeData {
12
12
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
13
13
 
14
14
  @@index([created_at])
15
- @@schema("public")
16
15
  }
@@ -13,6 +13,4 @@ generator client {
13
13
  datasource db {
14
14
  provider = "postgresql"
15
15
  url = env("DATABASE_URL")
16
-
17
- schemas = ["public", "analytics"]
18
16
  }
@@ -17,5 +17,4 @@ model Suggestion {
17
17
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
18
18
 
19
19
  @@index([interview_id])
20
- @@schema("public")
21
20
  }
@@ -22,5 +22,4 @@ model Transcript {
22
22
  @@unique([interview_id, order_no])
23
23
  @@index([interview_id])
24
24
  @@index([job_description_id])
25
- @@schema("public")
26
25
  }
@@ -1,16 +1,12 @@
1
1
  enum FirstLoginStatus {
2
2
  PENDING
3
3
  COMPLETED
4
-
5
- @@schema("public")
6
4
  }
7
5
 
8
6
  enum UserInvitationStatus {
9
7
  INVITED
10
8
  ACCEPTED
11
9
  EXPIRED
12
-
13
- @@schema("public")
14
10
  }
15
11
 
16
12
  model User {
@@ -71,7 +67,6 @@ model User {
71
67
  refresh_token_auth RefreshToken[] @relation("TokenRefresh")
72
68
  zoom_meeting_participants ZoomMeetingParticipant[]
73
69
  notes Notes[]
74
- recruiter_applications Application[] @relation("ApplicationRecruiter")
75
70
 
76
71
  name String?
77
72
  phone String?
@@ -92,12 +87,7 @@ model User {
92
87
  professional_expertise String?
93
88
  documents Document[]
94
89
 
95
- employee_number Int?
96
- employee_code String? @unique
97
-
98
90
  @@index([role_id])
99
91
  @@index([permission_id])
100
92
  @@index([organisation_id])
101
- @@index([organisation_id, employee_number])
102
- @@schema("public")
103
93
  }
@@ -12,6 +12,4 @@ model UserProfile {
12
12
  user_id String? @unique
13
13
 
14
14
  work_experience Json?
15
-
16
- @@schema("public")
17
15
  }
@@ -2,8 +2,6 @@
2
2
  enum ZoomMeetingParticipantRole {
3
3
  CANDIDATE
4
4
  INTERVIEWER
5
-
6
- @@schema("public")
7
5
  }
8
6
 
9
7
  /// Zoom meeting linked 1:1 to an interview; Zoom REST host is `zoom_host_user_id`.
@@ -42,7 +40,6 @@ model ZoomMeeting {
42
40
  @@index([interview_id])
43
41
  @@index([zoom_meeting_id])
44
42
  @@index([zoom_meeting_uuid])
45
- @@schema("public")
46
43
  }
47
44
 
48
45
  /// Expected participants for a `ZoomMeeting`: links to `User` (candidate / interviewer). Replaced on each meeting upsert.
@@ -66,7 +63,6 @@ model ZoomMeetingParticipant {
66
63
  @@index([zoom_meeting_row_id])
67
64
  @@index([user_id])
68
65
  @@index([zoom_participant_id])
69
- @@schema("public")
70
66
  }
71
67
 
72
68
  /// Ledger of processed Zoom webhook deliveries: one row per `dedupe_key` (request id or body hash).
@@ -80,5 +76,4 @@ model ZoomWebhookEvent {
80
76
 
81
77
  @@index([event])
82
78
  @@index([created_at])
83
- @@schema("public")
84
79
  }
package/prisma/.DS_Store DELETED
Binary file
@@ -1,2 +0,0 @@
1
- -- Migrate legacy terminal-positive status to SELECTED (SHORTLISTED enum value retained but unused).
2
- UPDATE applications SET status = 'SELECTED' WHERE status = 'SHORTLISTED';
Binary file