@adaptware/eagles-db 0.4.36 → 0.4.38
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/edge.js +870 -10
- package/client/index-browser.js +901 -40
- package/client/index.d.ts +81764 -27557
- package/client/index.js +870 -10
- package/client/libquery_engine-darwin.dylib.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +1580 -108
- package/client/wasm.js +870 -10
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +2 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/CandidateQuestionResponse.prisma +1 -0
- package/prisma/schema/UserRole.prisma +1 -0
- package/prisma/schema/action.prisma +5 -0
- package/prisma/schema/activityEvent.prisma +138 -0
- package/prisma/schema/activityLog.prisma +3 -0
- package/prisma/schema/applicationAnalytics.prisma +87 -0
- package/prisma/schema/applications.prisma +12 -2
- package/prisma/schema/approval.prisma +2 -0
- package/prisma/schema/assessment.prisma +1 -0
- package/prisma/schema/assessmentLibrary.prisma +1 -0
- package/prisma/schema/assessmentQuestion.prisma +1 -0
- package/prisma/schema/assessmentRoundAnalytics.prisma +119 -0
- package/prisma/schema/assignment.prisma +3 -0
- package/prisma/schema/assignmentLibrary.prisma +1 -0
- package/prisma/schema/assignmentRoundAnalytics.prisma +109 -0
- package/prisma/schema/authModule.prisma +3 -0
- package/prisma/schema/budget.prisma +6 -0
- package/prisma/schema/calendly.prisma +2 -0
- package/prisma/schema/candidateProfile.prisma +2 -0
- package/prisma/schema/communication.prisma +11 -0
- package/prisma/schema/contactUs.prisma +2 -0
- package/prisma/schema/document.prisma +5 -4
- package/prisma/schema/evaluationPlan.prisma +35 -10
- package/prisma/schema/feedback.prisma +1 -0
- package/prisma/schema/fitCheck.prisma +3 -0
- package/prisma/schema/google.prisma +2 -0
- package/prisma/schema/integration.prisma +13 -0
- package/prisma/schema/interview.prisma +9 -0
- package/prisma/schema/interviewNotes.prisma +1 -0
- package/prisma/schema/interviewRoundAnalytics.prisma +140 -0
- package/prisma/schema/interviewerAnalytics.prisma +129 -0
- package/prisma/schema/jobApplicationFields.prisma +3 -0
- package/prisma/schema/jobApplicationResponse.prisma +1 -0
- package/prisma/schema/jobApplicationTemplate.prisma +3 -0
- package/prisma/schema/jobDescription.prisma +43 -35
- package/prisma/schema/jobDescriptionData.prisma +1 -0
- package/prisma/schema/jobProfile.prisma +3 -0
- package/prisma/schema/jobRoundAnalytics.prisma +101 -0
- package/prisma/schema/liveAnalysis.prisma +1 -0
- package/prisma/schema/message.prisma +2 -0
- package/prisma/schema/migrations/20260519120000_add_analytics_schema/migration.sql +84 -0
- package/prisma/schema/migrations/20260625120000_add_interviewer_analytics/migration.sql +26 -0
- package/prisma/schema/migrations/20260629120000_add_user_lifecycle_activity_events/migration.sql +13 -0
- package/prisma/schema/migrations/20260629140000_drop_organisation_org_code/migration.sql +2 -0
- package/prisma/schema/migrations/20260629160000_employee_codes_dual_interviewer_analytics/migration.sql +87 -0
- package/prisma/schema/migrations/20260630120000_add_application_sources/migration.sql +38 -0
- package/prisma/schema/migrations/20260701120000_add_source_effectiveness_analytics/migration.sql +40 -0
- package/prisma/schema/migrations/20260702120000_add_analytics_daily_tables/migration.sql +232 -0
- package/prisma/schema/migrations/{20260710120000_add_resume_rendered_export_fields → 20260706120000_add_resume_rendered_export}/migration.sql +5 -2
- package/prisma/schema/notes.prisma +1 -0
- package/prisma/schema/ongoingEvaluation.prisma +7 -0
- package/prisma/schema/openJobAnalytics.prisma +81 -0
- package/prisma/schema/organisation.prisma +39 -31
- package/prisma/schema/organisationConfig.prisma +1 -0
- package/prisma/schema/permission.prisma +1 -0
- package/prisma/schema/pipelineDistributionAnalytics.prisma +64 -0
- package/prisma/schema/promise.prisma +3 -0
- package/prisma/schema/questions.prisma +4 -0
- package/prisma/schema/refreshToken.prisma +2 -0
- package/prisma/schema/reportingOverviewJobAnalytics.prisma +49 -0
- package/prisma/schema/resume.prisma +5 -4
- package/prisma/schema/resumeData.prisma +1 -0
- package/prisma/schema/roundAnalytics.prisma +145 -0
- package/prisma/schema/schema.prisma +2 -0
- package/prisma/schema/source.prisma +36 -0
- package/prisma/schema/sourceEffectivenessAnalytics.prisma +79 -0
- package/prisma/schema/suggestion.prisma +1 -0
- package/prisma/schema/transcript.prisma +1 -0
- package/prisma/schema/user.prisma +10 -0
- package/prisma/schema/userProfile.prisma +2 -0
- package/prisma/schema/zoomMeeting.prisma +5 -0
- package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +0 -25
- package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +0 -24
- package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +0 -2
|
@@ -0,0 +1,232 @@
|
|
|
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,6 +1,9 @@
|
|
|
1
|
+
-- Resume ATS export: persisted template + rendered export document pointer.
|
|
2
|
+
-- Additive and nullable; no backfill required (null = "never exported ATS layout").
|
|
3
|
+
|
|
1
4
|
-- AlterTable
|
|
2
|
-
ALTER TABLE "Resume" ADD COLUMN
|
|
3
|
-
ADD COLUMN
|
|
5
|
+
ALTER TABLE "Resume" ADD COLUMN "rendered_export_document_id" TEXT,
|
|
6
|
+
ADD COLUMN "resume_template_id" TEXT;
|
|
4
7
|
|
|
5
8
|
-- CreateIndex
|
|
6
9
|
CREATE UNIQUE INDEX "Resume_rendered_export_document_id_key" ON "Resume"("rendered_export_document_id");
|
|
@@ -4,6 +4,8 @@ enum OngoingEvaluationState {
|
|
|
4
4
|
CLEARED
|
|
5
5
|
SKIPPED
|
|
6
6
|
NOT_CLEARED
|
|
7
|
+
|
|
8
|
+
@@schema("public")
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
enum OngoingEvaluationRoundStatus {
|
|
@@ -13,6 +15,8 @@ enum OngoingEvaluationRoundStatus {
|
|
|
13
15
|
IN_PROGRESS
|
|
14
16
|
PENDING_EVALUATION
|
|
15
17
|
EVALUATED
|
|
18
|
+
|
|
19
|
+
@@schema("public")
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
model OngoingEvaluation {
|
|
@@ -39,6 +43,7 @@ model OngoingEvaluation {
|
|
|
39
43
|
description String?
|
|
40
44
|
order_no Int?
|
|
41
45
|
format EvaluationRoundFormat?
|
|
46
|
+
round_purpose String?
|
|
42
47
|
topics String[]
|
|
43
48
|
assignee String?
|
|
44
49
|
elimination_round Boolean? @default(false)
|
|
@@ -48,6 +53,7 @@ model OngoingEvaluation {
|
|
|
48
53
|
deadline Int?
|
|
49
54
|
duration_unit DurationUnit?
|
|
50
55
|
details Json?
|
|
56
|
+
category EvaluationCategory?
|
|
51
57
|
// Audit Fields
|
|
52
58
|
created_at DateTime @default(now())
|
|
53
59
|
updated_at DateTime @updatedAt
|
|
@@ -69,4 +75,5 @@ model OngoingEvaluation {
|
|
|
69
75
|
@@unique([application_id, evaluation_plan_id])
|
|
70
76
|
@@index([application_id])
|
|
71
77
|
@@index([evaluation_plan_id])
|
|
78
|
+
@@schema("public")
|
|
72
79
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
unscreened_count Int @default(0)
|
|
26
|
+
ongoing_count Int @default(0)
|
|
27
|
+
selected_count Int @default(0)
|
|
28
|
+
rejected_count Int @default(0)
|
|
29
|
+
|
|
30
|
+
updated_at DateTime @updatedAt
|
|
31
|
+
|
|
32
|
+
@@index([organisation_id, is_open])
|
|
33
|
+
@@index([organisation_id, hiring_manager_id])
|
|
34
|
+
@@index([organisation_id, opened_at])
|
|
35
|
+
@@index([organisation_id, job_number])
|
|
36
|
+
@@index([organisation_id, is_open, closure_type, closing_date])
|
|
37
|
+
@@index([job_description_id])
|
|
38
|
+
@@map("open_job_analytics")
|
|
39
|
+
@@schema("analytics")
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
model OpenJobAnalyticsDaily {
|
|
43
|
+
id String @id @default(uuid())
|
|
44
|
+
snapshot_date DateTime @db.Date
|
|
45
|
+
organisation_id String
|
|
46
|
+
job_description_id String
|
|
47
|
+
|
|
48
|
+
job_code String?
|
|
49
|
+
job_number Int?
|
|
50
|
+
role_title String?
|
|
51
|
+
department String?
|
|
52
|
+
hiring_manager_id String?
|
|
53
|
+
hiring_manager_name String?
|
|
54
|
+
location String?
|
|
55
|
+
compensation String?
|
|
56
|
+
vacancies Int @default(1)
|
|
57
|
+
|
|
58
|
+
opened_at DateTime
|
|
59
|
+
target_closing_date DateTime?
|
|
60
|
+
closing_date DateTime?
|
|
61
|
+
is_open Boolean @default(true)
|
|
62
|
+
|
|
63
|
+
closure_type OpenJobClosureType?
|
|
64
|
+
time_to_hire_days Int?
|
|
65
|
+
|
|
66
|
+
application_count Int @default(0)
|
|
67
|
+
unscreened_count Int @default(0)
|
|
68
|
+
ongoing_count Int @default(0)
|
|
69
|
+
selected_count Int @default(0)
|
|
70
|
+
rejected_count Int @default(0)
|
|
71
|
+
|
|
72
|
+
@@unique([snapshot_date, job_description_id])
|
|
73
|
+
@@index([snapshot_date], map: "ojad_snapshot_date_idx")
|
|
74
|
+
@@index([snapshot_date, organisation_id, is_open], map: "ojad_snapshot_org_open_idx")
|
|
75
|
+
@@index([snapshot_date, organisation_id, hiring_manager_id], map: "ojad_snapshot_org_hm_idx")
|
|
76
|
+
@@index([snapshot_date, organisation_id, opened_at], map: "ojad_snapshot_org_opened_idx")
|
|
77
|
+
@@index([snapshot_date, organisation_id, job_number], map: "ojad_snapshot_org_job_num_idx")
|
|
78
|
+
@@index([snapshot_date, job_description_id], map: "ojad_snapshot_job_idx")
|
|
79
|
+
@@map("open_job_analytics_daily")
|
|
80
|
+
@@schema("analytics")
|
|
81
|
+
}
|
|
@@ -4,6 +4,8 @@ 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")
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
model Organisation {
|
|
@@ -18,40 +20,46 @@ model Organisation {
|
|
|
18
20
|
company_values Json[]
|
|
19
21
|
allowed_email_domains String[]
|
|
20
22
|
|
|
21
|
-
interviewers
|
|
22
|
-
created_at
|
|
23
|
-
updated_at
|
|
24
|
-
created_by
|
|
25
|
-
updated_by
|
|
26
|
-
is_active
|
|
27
|
-
alias
|
|
28
|
-
logo
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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[]
|
|
48
57
|
job_application_fields JobApplicationField[]
|
|
49
58
|
documents Document[]
|
|
50
59
|
job_application_templates JobApplicationTemplate[]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
conversations Conversation[]
|
|
54
|
-
communication_messages CommunicationMessage[]
|
|
60
|
+
sources Source[]
|
|
61
|
+
// departments Department[]
|
|
55
62
|
|
|
56
63
|
@@index([name])
|
|
64
|
+
@@schema("public")
|
|
57
65
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
}
|
|
@@ -5,6 +5,8 @@ enum AsyncOperationStatus {
|
|
|
5
5
|
FAILED
|
|
6
6
|
RETRYING
|
|
7
7
|
CANCELLED
|
|
8
|
+
|
|
9
|
+
@@schema("public")
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
model AsyncOperation {
|
|
@@ -36,4 +38,5 @@ model AsyncOperation {
|
|
|
36
38
|
@@index([status])
|
|
37
39
|
@@index([operation_name])
|
|
38
40
|
@@index([correlationId])
|
|
41
|
+
@@schema("public")
|
|
39
42
|
}
|
|
@@ -2,6 +2,8 @@ enum Difficulty {
|
|
|
2
2
|
EASY // simple/basic questions
|
|
3
3
|
MEDIUM // moderate difficulty
|
|
4
4
|
HARD // challenging questions
|
|
5
|
+
|
|
6
|
+
@@schema("public")
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
model Question {
|
|
@@ -25,4 +27,6 @@ model Question {
|
|
|
25
27
|
assessmentLibrary AssessmentLibrary? @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade)
|
|
26
28
|
evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
|
|
27
29
|
candidateResponse CandidateQuestionResponse[]
|
|
30
|
+
|
|
31
|
+
@@schema("public")
|
|
28
32
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
|
9
|
+
/// Latest ATS template export (PDF). Null until first successful export.
|
|
10
10
|
rendered_export_document_id String? @unique
|
|
11
|
-
/// Last template id
|
|
11
|
+
/// Last chosen ATS layout template id (e.g. ats-classic). Set on first export.
|
|
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(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
26
|
-
rendered_export_document Document? @relation("
|
|
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)
|
|
27
27
|
applications Application[]
|
|
28
28
|
interviews Interview[]
|
|
29
29
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
@@ -36,4 +36,5 @@ model Resume {
|
|
|
36
36
|
|
|
37
37
|
@@index([user_id])
|
|
38
38
|
@@index([file_hash])
|
|
39
|
+
@@schema("public")
|
|
39
40
|
}
|