@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
@@ -1,232 +0,0 @@
1
- -- Analytics daily history tables for midnight reporting snapshots.
2
-
3
- CREATE TABLE "analytics"."round_analytics_daily" (
4
- "id" TEXT NOT NULL,
5
- "snapshot_date" DATE NOT NULL,
6
- "organisation_id" TEXT NOT NULL,
7
- "application_id" TEXT NOT NULL,
8
- "candidate_id" TEXT NOT NULL,
9
- "job_description_id" TEXT NOT NULL,
10
- "evaluation_plan_id" TEXT NOT NULL,
11
- "round_id" TEXT NOT NULL,
12
- "round_name" TEXT,
13
- "evaluation_category" "EvaluationCategory",
14
- "round_type" "RoundType",
15
- "assigned_at" TIMESTAMP(3),
16
- "scheduled_at" TIMESTAMP(3),
17
- "started_at" TIMESTAMP(3),
18
- "completed_at" TIMESTAMP(3),
19
- "evaluated_at" TIMESTAMP(3),
20
- "round_completed_at" TIMESTAMP(3),
21
- "round_created_at" TIMESTAMP(3),
22
- "round_result" "analytics"."RoundResult",
23
- "round_result_at" TIMESTAMP(3),
24
- "scheduling_duration_minutes" INTEGER,
25
- "round_duration_minutes" INTEGER,
26
- "feedback_duration_minutes" INTEGER,
27
- "decision_duration_minutes" INTEGER,
28
- "total_round_duration_minutes" INTEGER,
29
- "is_custom" BOOLEAN NOT NULL DEFAULT false,
30
-
31
- CONSTRAINT "round_analytics_daily_pkey" PRIMARY KEY ("id")
32
- );
33
-
34
- CREATE TABLE "analytics"."job_round_analytics_daily" (
35
- "id" TEXT NOT NULL,
36
- "snapshot_date" DATE NOT NULL,
37
- "organisation_id" TEXT NOT NULL,
38
- "job_description_id" TEXT NOT NULL,
39
- "evaluation_plan_id" TEXT NOT NULL,
40
- "round_name" TEXT NOT NULL,
41
- "evaluation_category" "EvaluationCategory",
42
- "job_code" TEXT,
43
- "role_title" TEXT,
44
- "hiring_manager_id" TEXT,
45
- "plan_order_no" INTEGER,
46
- "plan_type" "EvaluationPlanType",
47
- "is_custom" BOOLEAN NOT NULL DEFAULT false,
48
- "assigned_count" INTEGER NOT NULL DEFAULT 0,
49
- "completed_count" INTEGER NOT NULL DEFAULT 0,
50
- "passed_count" INTEGER NOT NULL DEFAULT 0,
51
- "failed_count" INTEGER NOT NULL DEFAULT 0,
52
- "withdrawn_count" INTEGER NOT NULL DEFAULT 0,
53
- "no_show_count" INTEGER NOT NULL DEFAULT 0,
54
- "total_completion_minutes" BIGINT NOT NULL DEFAULT 0,
55
- "avg_completion_minutes" DOUBLE PRECISION,
56
-
57
- CONSTRAINT "job_round_analytics_daily_pkey" PRIMARY KEY ("id")
58
- );
59
-
60
- CREATE TABLE "analytics"."open_job_analytics_daily" (
61
- "id" TEXT NOT NULL,
62
- "snapshot_date" DATE NOT NULL,
63
- "organisation_id" TEXT NOT NULL,
64
- "job_description_id" TEXT NOT NULL,
65
- "job_code" TEXT,
66
- "job_number" INTEGER,
67
- "role_title" TEXT,
68
- "department" TEXT,
69
- "hiring_manager_id" TEXT,
70
- "hiring_manager_name" TEXT,
71
- "location" TEXT,
72
- "compensation" TEXT,
73
- "vacancies" INTEGER NOT NULL DEFAULT 1,
74
- "opened_at" TIMESTAMP(3) NOT NULL,
75
- "target_closing_date" TIMESTAMP(3),
76
- "closing_date" TIMESTAMP(3),
77
- "is_open" BOOLEAN NOT NULL DEFAULT true,
78
- "application_count" INTEGER NOT NULL DEFAULT 0,
79
- "in_consideration_count" INTEGER NOT NULL DEFAULT 0,
80
- "shortlisted_count" INTEGER NOT NULL DEFAULT 0,
81
-
82
- CONSTRAINT "open_job_analytics_daily_pkey" PRIMARY KEY ("id")
83
- );
84
-
85
- CREATE TABLE "analytics"."pipeline_distribution_analytics_daily" (
86
- "id" TEXT NOT NULL,
87
- "snapshot_date" DATE NOT NULL,
88
- "organisation_id" TEXT NOT NULL,
89
- "job_description_id" TEXT NOT NULL,
90
- "job_code" TEXT,
91
- "job_number" INTEGER,
92
- "role_title" TEXT,
93
- "hiring_manager_id" TEXT,
94
- "application_count" INTEGER NOT NULL DEFAULT 0,
95
- "filtered_in_count" INTEGER NOT NULL DEFAULT 0,
96
- "min_fit_score" DOUBLE PRECISION,
97
- "experience_screening_count" INTEGER NOT NULL DEFAULT 0,
98
- "technical_screening_count" INTEGER NOT NULL DEFAULT 0,
99
- "technical_interview_count" INTEGER NOT NULL DEFAULT 0,
100
- "business_round_count" INTEGER NOT NULL DEFAULT 0,
101
- "behavioral_round_count" INTEGER NOT NULL DEFAULT 0,
102
- "shortlisted_count" INTEGER NOT NULL DEFAULT 0,
103
-
104
- CONSTRAINT "pipeline_distribution_analytics_daily_pkey" PRIMARY KEY ("id")
105
- );
106
-
107
- CREATE TABLE "analytics"."source_effectiveness_analytics_daily" (
108
- "id" TEXT NOT NULL,
109
- "snapshot_date" DATE NOT NULL,
110
- "organisation_id" TEXT NOT NULL,
111
- "job_description_id" TEXT NOT NULL,
112
- "source_id" TEXT NOT NULL,
113
- "source_name" TEXT NOT NULL,
114
- "source_category" "SourceCategory",
115
- "source_colour" TEXT,
116
- "job_code" TEXT,
117
- "job_number" INTEGER,
118
- "role_title" TEXT,
119
- "hiring_manager_id" TEXT,
120
- "applications_count" INTEGER NOT NULL DEFAULT 0,
121
- "screened_count" INTEGER NOT NULL DEFAULT 0,
122
- "evaluated_count" INTEGER NOT NULL DEFAULT 0,
123
- "rejected_count" INTEGER NOT NULL DEFAULT 0,
124
- "shortlisted_count" INTEGER NOT NULL DEFAULT 0,
125
- "offered_count" INTEGER NOT NULL DEFAULT 0,
126
- "offer_accepted_count" INTEGER NOT NULL DEFAULT 0,
127
- "offer_declined_count" INTEGER NOT NULL DEFAULT 0,
128
- "withdrawn_count" INTEGER NOT NULL DEFAULT 0,
129
- "hired_count" INTEGER NOT NULL DEFAULT 0,
130
- "total_fit_score" DOUBLE PRECISION NOT NULL DEFAULT 0,
131
- "fit_score_sample_count" INTEGER NOT NULL DEFAULT 0,
132
- "average_fit_score" DOUBLE PRECISION,
133
-
134
- CONSTRAINT "source_effectiveness_analytics_daily_pkey" PRIMARY KEY ("id")
135
- );
136
-
137
- CREATE TABLE "analytics"."interviewer_organisation_analytics_daily" (
138
- "id" TEXT NOT NULL,
139
- "snapshot_date" DATE NOT NULL,
140
- "organisation_id" TEXT NOT NULL,
141
- "user_id" TEXT NOT NULL,
142
- "name" TEXT,
143
- "employee_id" TEXT,
144
- "interview_count" INTEGER NOT NULL DEFAULT 0,
145
- "accepted_count" INTEGER NOT NULL DEFAULT 0,
146
- "rejected_count" INTEGER NOT NULL DEFAULT 0,
147
- "unsure_count" INTEGER NOT NULL DEFAULT 0,
148
- "ai_disagreement_count" INTEGER NOT NULL DEFAULT 0,
149
- "ai_disagreement_percent" DOUBLE PRECISION,
150
- "avg_difficulty" DOUBLE PRECISION,
151
- "avg_supportiveness" DOUBLE PRECISION,
152
- "avg_topics_coverage_percent" DOUBLE PRECISION,
153
-
154
- CONSTRAINT "interviewer_organisation_analytics_daily_pkey" PRIMARY KEY ("id")
155
- );
156
-
157
- CREATE TABLE "analytics"."interviewer_job_analytics_daily" (
158
- "id" TEXT NOT NULL,
159
- "snapshot_date" DATE NOT NULL,
160
- "organisation_id" TEXT NOT NULL,
161
- "user_id" TEXT NOT NULL,
162
- "job_description_id" TEXT NOT NULL,
163
- "hiring_manager_id" TEXT,
164
- "department" TEXT,
165
- "location" TEXT,
166
- "role_title" TEXT,
167
- "job_code" TEXT,
168
- "opened_at" TIMESTAMP(3),
169
- "name" TEXT,
170
- "employee_id" TEXT,
171
- "interview_count" INTEGER NOT NULL DEFAULT 0,
172
- "accepted_count" INTEGER NOT NULL DEFAULT 0,
173
- "rejected_count" INTEGER NOT NULL DEFAULT 0,
174
- "unsure_count" INTEGER NOT NULL DEFAULT 0,
175
- "ai_disagreement_count" INTEGER NOT NULL DEFAULT 0,
176
- "ai_disagreement_percent" DOUBLE PRECISION,
177
- "avg_difficulty" DOUBLE PRECISION,
178
- "avg_supportiveness" DOUBLE PRECISION,
179
- "avg_topics_coverage_percent" DOUBLE PRECISION,
180
-
181
- CONSTRAINT "interviewer_job_analytics_daily_pkey" PRIMARY KEY ("id")
182
- );
183
-
184
- CREATE UNIQUE INDEX "round_analytics_daily_snapshot_date_round_id_key" ON "analytics"."round_analytics_daily"("snapshot_date", "round_id");
185
- CREATE INDEX "rad_snapshot_date_idx" ON "analytics"."round_analytics_daily"("snapshot_date");
186
- CREATE INDEX "rad_snapshot_org_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "organisation_id");
187
- CREATE INDEX "rad_snapshot_job_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "job_description_id");
188
- CREATE INDEX "rad_snapshot_app_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "application_id");
189
- CREATE INDEX "rad_snapshot_candidate_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "candidate_id");
190
- CREATE INDEX "rad_snapshot_eval_cat_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "evaluation_category");
191
- CREATE INDEX "rad_snapshot_round_result_idx" ON "analytics"."round_analytics_daily"("snapshot_date", "round_result");
192
-
193
- CREATE UNIQUE INDEX "job_round_analytics_daily_snapshot_date_job_description_id_evaluation_plan_id_key" ON "analytics"."job_round_analytics_daily"("snapshot_date", "job_description_id", "evaluation_plan_id");
194
- CREATE INDEX "jrad_snapshot_date_idx" ON "analytics"."job_round_analytics_daily"("snapshot_date");
195
- CREATE INDEX "jrad_snapshot_org_idx" ON "analytics"."job_round_analytics_daily"("snapshot_date", "organisation_id");
196
- CREATE INDEX "jrad_snapshot_org_hm_idx" ON "analytics"."job_round_analytics_daily"("snapshot_date", "organisation_id", "hiring_manager_id");
197
- CREATE INDEX "jrad_snapshot_job_idx" ON "analytics"."job_round_analytics_daily"("snapshot_date", "job_description_id");
198
-
199
- CREATE UNIQUE INDEX "open_job_analytics_daily_snapshot_date_job_description_id_key" ON "analytics"."open_job_analytics_daily"("snapshot_date", "job_description_id");
200
- CREATE INDEX "ojad_snapshot_date_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date");
201
- CREATE INDEX "ojad_snapshot_org_open_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date", "organisation_id", "is_open");
202
- CREATE INDEX "ojad_snapshot_org_hm_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date", "organisation_id", "hiring_manager_id");
203
- CREATE INDEX "ojad_snapshot_org_opened_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date", "organisation_id", "opened_at");
204
- CREATE INDEX "ojad_snapshot_org_job_num_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date", "organisation_id", "job_number");
205
- CREATE INDEX "ojad_snapshot_job_idx" ON "analytics"."open_job_analytics_daily"("snapshot_date", "job_description_id");
206
-
207
- CREATE UNIQUE INDEX "pipeline_distribution_analytics_daily_snapshot_date_job_description_id_key" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date", "job_description_id");
208
- CREATE INDEX "pdad_snapshot_date_idx" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date");
209
- CREATE INDEX "pdad_snapshot_org_idx" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date", "organisation_id");
210
- CREATE INDEX "pdad_snapshot_org_hm_idx" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date", "organisation_id", "hiring_manager_id");
211
- CREATE INDEX "pdad_snapshot_org_job_num_idx" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date", "organisation_id", "job_number");
212
- CREATE INDEX "pdad_snapshot_job_idx" ON "analytics"."pipeline_distribution_analytics_daily"("snapshot_date", "job_description_id");
213
-
214
- CREATE UNIQUE INDEX "source_effectiveness_analytics_daily_snapshot_date_organisation_id_job_description_id_source_id_key" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date", "organisation_id", "job_description_id", "source_id");
215
- CREATE INDEX "sead_snapshot_date_idx" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date");
216
- CREATE INDEX "sead_snapshot_org_idx" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date", "organisation_id");
217
- CREATE INDEX "sead_snapshot_org_source_idx" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date", "organisation_id", "source_id");
218
- CREATE INDEX "sead_snapshot_org_hm_idx" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date", "organisation_id", "hiring_manager_id");
219
- CREATE INDEX "sead_snapshot_job_idx" ON "analytics"."source_effectiveness_analytics_daily"("snapshot_date", "job_description_id");
220
-
221
- CREATE UNIQUE INDEX "interviewer_organisation_analytics_daily_snapshot_date_organisation_id_user_id_key" ON "analytics"."interviewer_organisation_analytics_daily"("snapshot_date", "organisation_id", "user_id");
222
- CREATE INDEX "ioad_snapshot_date_idx" ON "analytics"."interviewer_organisation_analytics_daily"("snapshot_date");
223
- CREATE INDEX "ioad_snapshot_org_idx" ON "analytics"."interviewer_organisation_analytics_daily"("snapshot_date", "organisation_id");
224
- CREATE INDEX "ioad_snapshot_org_user_idx" ON "analytics"."interviewer_organisation_analytics_daily"("snapshot_date", "organisation_id", "user_id");
225
-
226
- CREATE UNIQUE INDEX "interviewer_job_analytics_daily_snapshot_date_organisation_id_user_id_job_description_id_key" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "user_id", "job_description_id");
227
- CREATE INDEX "ijad_snapshot_date_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date");
228
- CREATE INDEX "ijad_snapshot_org_job_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "job_description_id");
229
- CREATE INDEX "ijad_snapshot_org_hm_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "hiring_manager_id");
230
- CREATE INDEX "ijad_snapshot_org_dept_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "department");
231
- CREATE INDEX "ijad_snapshot_org_loc_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "location");
232
- CREATE INDEX "ijad_snapshot_org_user_idx" ON "analytics"."interviewer_job_analytics_daily"("snapshot_date", "organisation_id", "user_id");
@@ -1,85 +0,0 @@
1
- model OpenJobAnalytics {
2
- id String @id @default(uuid())
3
- organisation_id String
4
- job_description_id String @unique
5
-
6
- job_code String?
7
- job_number Int?
8
- role_title String?
9
- department String?
10
- hiring_manager_id String?
11
- hiring_manager_name String?
12
- location String?
13
- compensation String?
14
- vacancies Int @default(1)
15
-
16
- opened_at DateTime
17
- target_closing_date DateTime?
18
- closing_date DateTime?
19
- is_open Boolean @default(true)
20
-
21
- closure_type OpenJobClosureType?
22
- time_to_hire_days Int?
23
-
24
- application_count Int @default(0)
25
- in_consideration_count Int @default(0)
26
- shortlisted_count Int @default(0)
27
- filtered_count Int @default(0)
28
- in_evaluation_count Int @default(0)
29
- offered_count Int @default(0)
30
- hired_count Int @default(0)
31
-
32
- updated_at DateTime @updatedAt
33
-
34
- @@index([organisation_id, is_open])
35
- @@index([organisation_id, hiring_manager_id])
36
- @@index([organisation_id, opened_at])
37
- @@index([organisation_id, job_number])
38
- @@index([organisation_id, is_open, closure_type, closing_date])
39
- @@index([job_description_id])
40
- @@map("open_job_analytics")
41
- @@schema("analytics")
42
- }
43
-
44
- model OpenJobAnalyticsDaily {
45
- id String @id @default(uuid())
46
- snapshot_date DateTime @db.Date
47
- organisation_id String
48
- job_description_id String
49
-
50
- job_code String?
51
- job_number Int?
52
- role_title String?
53
- department String?
54
- hiring_manager_id String?
55
- hiring_manager_name String?
56
- location String?
57
- compensation String?
58
- vacancies Int @default(1)
59
-
60
- opened_at DateTime
61
- target_closing_date DateTime?
62
- closing_date DateTime?
63
- is_open Boolean @default(true)
64
-
65
- closure_type OpenJobClosureType?
66
- time_to_hire_days Int?
67
-
68
- application_count Int @default(0)
69
- in_consideration_count Int @default(0)
70
- shortlisted_count Int @default(0)
71
- filtered_count Int @default(0)
72
- in_evaluation_count Int @default(0)
73
- offered_count Int @default(0)
74
- hired_count Int @default(0)
75
-
76
- @@unique([snapshot_date, job_description_id])
77
- @@index([snapshot_date], map: "ojad_snapshot_date_idx")
78
- @@index([snapshot_date, organisation_id, is_open], map: "ojad_snapshot_org_open_idx")
79
- @@index([snapshot_date, organisation_id, hiring_manager_id], map: "ojad_snapshot_org_hm_idx")
80
- @@index([snapshot_date, organisation_id, opened_at], map: "ojad_snapshot_org_opened_idx")
81
- @@index([snapshot_date, organisation_id, job_number], map: "ojad_snapshot_org_job_num_idx")
82
- @@index([snapshot_date, job_description_id], map: "ojad_snapshot_job_idx")
83
- @@map("open_job_analytics_daily")
84
- @@schema("analytics")
85
- }
@@ -1,64 +0,0 @@
1
- model PipelineDistributionAnalytics {
2
- id String @id @default(uuid())
3
- organisation_id String
4
- job_description_id String @unique
5
-
6
- job_code String?
7
- job_number Int?
8
- role_title String?
9
- hiring_manager_id String?
10
-
11
- application_count Int @default(0)
12
- filtered_in_count Int @default(0)
13
- min_fit_score Float?
14
-
15
- experience_screening_count Int @default(0)
16
- technical_screening_count Int @default(0)
17
- technical_interview_count Int @default(0)
18
- business_round_count Int @default(0)
19
- behavioral_round_count Int @default(0)
20
-
21
- shortlisted_count Int @default(0)
22
-
23
- updated_at DateTime @updatedAt
24
-
25
- @@index([organisation_id])
26
- @@index([organisation_id, hiring_manager_id])
27
- @@index([organisation_id, job_number])
28
- @@index([job_description_id])
29
- @@map("pipeline_distribution_analytics")
30
- @@schema("analytics")
31
- }
32
-
33
- model PipelineDistributionAnalyticsDaily {
34
- id String @id @default(uuid())
35
- snapshot_date DateTime @db.Date
36
- organisation_id String
37
- job_description_id String
38
-
39
- job_code String?
40
- job_number Int?
41
- role_title String?
42
- hiring_manager_id String?
43
-
44
- application_count Int @default(0)
45
- filtered_in_count Int @default(0)
46
- min_fit_score Float?
47
-
48
- experience_screening_count Int @default(0)
49
- technical_screening_count Int @default(0)
50
- technical_interview_count Int @default(0)
51
- business_round_count Int @default(0)
52
- behavioral_round_count Int @default(0)
53
-
54
- shortlisted_count Int @default(0)
55
-
56
- @@unique([snapshot_date, job_description_id])
57
- @@index([snapshot_date], map: "pdad_snapshot_date_idx")
58
- @@index([snapshot_date, organisation_id], map: "pdad_snapshot_org_idx")
59
- @@index([snapshot_date, organisation_id, hiring_manager_id], map: "pdad_snapshot_org_hm_idx")
60
- @@index([snapshot_date, organisation_id, job_number], map: "pdad_snapshot_org_job_num_idx")
61
- @@index([snapshot_date, job_description_id], map: "pdad_snapshot_job_idx")
62
- @@map("pipeline_distribution_analytics_daily")
63
- @@schema("analytics")
64
- }
@@ -1,49 +0,0 @@
1
- enum OpenJobClosureType {
2
- FILLED
3
- CANCELLED
4
-
5
- @@schema("analytics")
6
- }
7
-
8
- model ReportingOverviewJobAnalytics {
9
- id String @id @default(uuid())
10
- organisation_id String
11
- job_description_id String @unique
12
-
13
- job_code String?
14
- job_number Int?
15
- hiring_manager_id String?
16
-
17
- opened_at DateTime
18
- target_closing_date DateTime?
19
- closing_date DateTime?
20
- is_open Boolean @default(true)
21
-
22
- closure_type OpenJobClosureType?
23
- time_to_hire_days Int?
24
-
25
- in_consideration_count Int @default(0)
26
-
27
- updated_at DateTime @updatedAt
28
-
29
- recruiters ReportingOverviewJobRecruiter[]
30
-
31
- @@index([organisation_id, is_open])
32
- @@index([organisation_id, hiring_manager_id, is_open])
33
- @@index([organisation_id, closing_date, closure_type])
34
- @@map("reporting_overview_job_analytics")
35
- @@schema("analytics")
36
- }
37
-
38
- model ReportingOverviewJobRecruiter {
39
- id String @id @default(uuid())
40
- job_description_id String
41
- recruiter_user_id String
42
-
43
- job ReportingOverviewJobAnalytics @relation(fields: [job_description_id], references: [job_description_id], onDelete: Cascade)
44
-
45
- @@unique([job_description_id, recruiter_user_id])
46
- @@index([recruiter_user_id])
47
- @@map("reporting_overview_job_recruiters")
48
- @@schema("analytics")
49
- }
@@ -1,145 +0,0 @@
1
- enum RoundResult {
2
- PASSED
3
- FAILED
4
-
5
- @@schema("analytics")
6
- }
7
-
8
- model RoundAnalytics {
9
- id String @id @default(uuid())
10
-
11
- // Core Dimensions
12
- organisation_id String
13
-
14
- application_id String
15
-
16
- candidate_id String
17
-
18
- job_description_id String
19
-
20
- evaluation_plan_id String
21
-
22
- round_id String @unique
23
-
24
- // Round Information
25
- round_name String?
26
-
27
- evaluation_category EvaluationCategory?
28
-
29
- round_type RoundType?
30
-
31
- // Lifecycle Timestamps
32
- assigned_at DateTime?
33
-
34
- scheduled_at DateTime?
35
-
36
- started_at DateTime?
37
-
38
- completed_at DateTime?
39
-
40
- evaluated_at DateTime?
41
-
42
- round_completed_at DateTime?
43
- round_created_at DateTime?
44
-
45
- // Decision
46
- round_result RoundResult?
47
-
48
- round_result_at DateTime?
49
-
50
- // Derived Metrics
51
- scheduling_duration_minutes Int?
52
-
53
- round_duration_minutes Int?
54
-
55
- feedback_duration_minutes Int?
56
-
57
- decision_duration_minutes Int?
58
-
59
- total_round_duration_minutes Int?
60
-
61
- is_custom Boolean @default(false)
62
-
63
- // Audit
64
- created_at DateTime @default(now())
65
-
66
- updated_at DateTime @updatedAt
67
-
68
- @@index([organisation_id])
69
- @@index([job_description_id])
70
- @@index([application_id])
71
- @@index([candidate_id])
72
- @@index([evaluation_category])
73
- @@index([round_result])
74
- @@map("round_analytics")
75
- @@schema("analytics")
76
- }
77
-
78
- model RoundAnalyticsDaily {
79
- id String @id @default(uuid())
80
-
81
- snapshot_date DateTime @db.Date
82
-
83
- // Core Dimensions
84
- organisation_id String
85
-
86
- application_id String
87
-
88
- candidate_id String
89
-
90
- job_description_id String
91
-
92
- evaluation_plan_id String
93
-
94
- round_id String
95
-
96
- // Round Information
97
- round_name String?
98
-
99
- evaluation_category EvaluationCategory?
100
-
101
- round_type RoundType?
102
-
103
- // Lifecycle Timestamps
104
- assigned_at DateTime?
105
-
106
- scheduled_at DateTime?
107
-
108
- started_at DateTime?
109
-
110
- completed_at DateTime?
111
-
112
- evaluated_at DateTime?
113
-
114
- round_completed_at DateTime?
115
- round_created_at DateTime?
116
-
117
- // Decision
118
- round_result RoundResult?
119
-
120
- round_result_at DateTime?
121
-
122
- // Derived Metrics
123
- scheduling_duration_minutes Int?
124
-
125
- round_duration_minutes Int?
126
-
127
- feedback_duration_minutes Int?
128
-
129
- decision_duration_minutes Int?
130
-
131
- total_round_duration_minutes Int?
132
-
133
- is_custom Boolean @default(false)
134
-
135
- @@unique([snapshot_date, round_id])
136
- @@index([snapshot_date], map: "rad_snapshot_date_idx")
137
- @@index([snapshot_date, organisation_id], map: "rad_snapshot_org_idx")
138
- @@index([snapshot_date, job_description_id], map: "rad_snapshot_job_idx")
139
- @@index([snapshot_date, application_id], map: "rad_snapshot_app_idx")
140
- @@index([snapshot_date, candidate_id], map: "rad_snapshot_candidate_idx")
141
- @@index([snapshot_date, evaluation_category], map: "rad_snapshot_eval_cat_idx")
142
- @@index([snapshot_date, round_result], map: "rad_snapshot_round_result_idx")
143
- @@map("round_analytics_daily")
144
- @@schema("analytics")
145
- }
@@ -1,36 +0,0 @@
1
- enum SourceCategory {
2
- JOB_BOARD
3
- REFERRAL
4
- AGENCY
5
- SOCIAL_MEDIA
6
- CAREERS_PAGE
7
- EVENT
8
- OTHER
9
-
10
- @@schema("public")
11
- }
12
-
13
- model Source {
14
- id String @id @default(uuid())
15
- organisation_id String
16
- name String
17
- category SourceCategory?
18
- parent_source_id String?
19
- colour String?
20
- description String?
21
- is_active Boolean @default(true)
22
- created_at DateTime @default(now())
23
- updated_at DateTime @updatedAt
24
-
25
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
26
- parent Source? @relation("SourceHierarchy", fields: [parent_source_id], references: [id], onDelete: SetNull)
27
- children Source[] @relation("SourceHierarchy")
28
- applications Application[]
29
-
30
- @@unique([organisation_id, name])
31
- @@index([organisation_id])
32
- @@index([organisation_id, category])
33
- @@index([organisation_id, is_active])
34
- @@index([parent_source_id])
35
- @@schema("public")
36
- }