@adaptware/eagles-db 0.6.20 → 0.6.22
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/package.json
CHANGED
|
@@ -42,6 +42,8 @@ model Interview {
|
|
|
42
42
|
candidate_interview_metadata Json?
|
|
43
43
|
/// Data
|
|
44
44
|
room_name String?
|
|
45
|
+
/// Active logical session while a sitting is in progress; null when no session is open.
|
|
46
|
+
current_session_id String?
|
|
45
47
|
scheduled_start_time DateTime?
|
|
46
48
|
scheduled_end_time DateTime?
|
|
47
49
|
actual_start_time DateTime?
|
|
@@ -128,6 +130,7 @@ model Interview {
|
|
|
128
130
|
interviewNotes InterviewNotes[]
|
|
129
131
|
liveAnalysis LiveAnalysis[]
|
|
130
132
|
zoom_meeting ZoomMeeting?
|
|
133
|
+
activities InterviewActivity[]
|
|
131
134
|
|
|
132
135
|
// Indexes
|
|
133
136
|
@@index([candidate_id])
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
enum InterviewActivityType {
|
|
2
|
+
SESSION_STARTED
|
|
3
|
+
SESSION_ENDED
|
|
4
|
+
|
|
5
|
+
PARTICIPANT_JOINED
|
|
6
|
+
PARTICIPANT_LEFT
|
|
7
|
+
PARTICIPANT_DISCONNECTED
|
|
8
|
+
PARTICIPANT_RECONNECTED
|
|
9
|
+
|
|
10
|
+
REQUESTED_RESCHEDULE
|
|
11
|
+
|
|
12
|
+
INTERVIEW_CREATED
|
|
13
|
+
INTERVIEW_RESCHEDULED
|
|
14
|
+
INTERVIEW_CANCELLED
|
|
15
|
+
INTERVIEW_COMPLETED
|
|
16
|
+
|
|
17
|
+
@@schema("public")
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
enum InterviewParticipantType {
|
|
21
|
+
CANDIDATE
|
|
22
|
+
INTERVIEWER
|
|
23
|
+
HOST
|
|
24
|
+
|
|
25
|
+
@@schema("public")
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
model InterviewActivity {
|
|
29
|
+
id String @id @default(uuid())
|
|
30
|
+
organisation_id String?
|
|
31
|
+
application_id String?
|
|
32
|
+
session_id String?
|
|
33
|
+
session_number Int?
|
|
34
|
+
interview_id String
|
|
35
|
+
|
|
36
|
+
event_type InterviewActivityType
|
|
37
|
+
|
|
38
|
+
participant_id String?
|
|
39
|
+
participant_type InterviewParticipantType?
|
|
40
|
+
|
|
41
|
+
occurred_at DateTime
|
|
42
|
+
recorded_at DateTime @default(now())
|
|
43
|
+
|
|
44
|
+
source String?
|
|
45
|
+
idempotency_key String? @unique
|
|
46
|
+
provider_event_id String? @unique
|
|
47
|
+
|
|
48
|
+
metadata Json?
|
|
49
|
+
|
|
50
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
51
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
52
|
+
|
|
53
|
+
@@index([interview_id, occurred_at])
|
|
54
|
+
@@index([session_id, occurred_at])
|
|
55
|
+
@@index([participant_id, occurred_at])
|
|
56
|
+
@@index([organisation_id, occurred_at])
|
|
57
|
+
@@index([application_id, occurred_at])
|
|
58
|
+
@@map("interview_activities")
|
|
59
|
+
@@schema("public")
|
|
60
|
+
}
|
package/prisma/schema/migrations/20261023120000_interview_activity_session_lifecycle/migration.sql
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "public"."InterviewActivityType" AS ENUM ('SESSION_STARTED', 'SESSION_ENDED', 'PARTICIPANT_JOINED', 'PARTICIPANT_LEFT', 'PARTICIPANT_DISCONNECTED', 'PARTICIPANT_RECONNECTED', 'REQUESTED_RESCHEDULE', 'INTERVIEW_CREATED', 'INTERVIEW_RESCHEDULED', 'INTERVIEW_CANCELLED', 'INTERVIEW_COMPLETED');
|
|
3
|
+
|
|
4
|
+
-- CreateEnum
|
|
5
|
+
CREATE TYPE "public"."InterviewParticipantType" AS ENUM ('CANDIDATE', 'INTERVIEWER', 'HOST');
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "public"."Interview" ADD COLUMN "current_session_id" TEXT;
|
|
9
|
+
|
|
10
|
+
-- CreateTable
|
|
11
|
+
CREATE TABLE "public"."interview_activities" (
|
|
12
|
+
"id" TEXT NOT NULL,
|
|
13
|
+
"organisation_id" TEXT,
|
|
14
|
+
"application_id" TEXT,
|
|
15
|
+
"session_id" TEXT,
|
|
16
|
+
"session_number" INTEGER,
|
|
17
|
+
"interview_id" TEXT NOT NULL,
|
|
18
|
+
"event_type" "public"."InterviewActivityType" NOT NULL,
|
|
19
|
+
"participant_id" TEXT,
|
|
20
|
+
"participant_type" "public"."InterviewParticipantType",
|
|
21
|
+
"occurred_at" TIMESTAMP(3) NOT NULL,
|
|
22
|
+
"recorded_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
23
|
+
"source" TEXT,
|
|
24
|
+
"idempotency_key" TEXT,
|
|
25
|
+
"provider_event_id" TEXT,
|
|
26
|
+
"metadata" JSONB,
|
|
27
|
+
|
|
28
|
+
CONSTRAINT "interview_activities_pkey" PRIMARY KEY ("id")
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
-- CreateIndex
|
|
32
|
+
CREATE UNIQUE INDEX "interview_activities_idempotency_key_key" ON "public"."interview_activities"("idempotency_key");
|
|
33
|
+
|
|
34
|
+
-- CreateIndex
|
|
35
|
+
CREATE UNIQUE INDEX "interview_activities_provider_event_id_key" ON "public"."interview_activities"("provider_event_id");
|
|
36
|
+
|
|
37
|
+
-- CreateIndex
|
|
38
|
+
CREATE INDEX "interview_activities_interview_id_occurred_at_idx" ON "public"."interview_activities"("interview_id", "occurred_at");
|
|
39
|
+
|
|
40
|
+
-- CreateIndex
|
|
41
|
+
CREATE INDEX "interview_activities_session_id_occurred_at_idx" ON "public"."interview_activities"("session_id", "occurred_at");
|
|
42
|
+
|
|
43
|
+
-- CreateIndex
|
|
44
|
+
CREATE INDEX "interview_activities_participant_id_occurred_at_idx" ON "public"."interview_activities"("participant_id", "occurred_at");
|
|
45
|
+
|
|
46
|
+
-- CreateIndex
|
|
47
|
+
CREATE INDEX "interview_activities_organisation_id_occurred_at_idx" ON "public"."interview_activities"("organisation_id", "occurred_at");
|
|
48
|
+
|
|
49
|
+
-- CreateIndex
|
|
50
|
+
CREATE INDEX "interview_activities_application_id_occurred_at_idx" ON "public"."interview_activities"("application_id", "occurred_at");
|
|
51
|
+
|
|
52
|
+
-- AddForeignKey
|
|
53
|
+
ALTER TABLE "public"."interview_activities" ADD CONSTRAINT "interview_activities_interview_id_fkey" FOREIGN KEY ("interview_id") REFERENCES "public"."Interview"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
54
|
+
|
|
55
|
+
-- AddForeignKey
|
|
56
|
+
ALTER TABLE "public"."interview_activities" ADD CONSTRAINT "interview_activities_organisation_id_fkey" FOREIGN KEY ("organisation_id") REFERENCES "public"."Organisation"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -68,6 +68,7 @@ model Organisation {
|
|
|
68
68
|
hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
|
|
69
69
|
organisation_configs OrganisationConfig[]
|
|
70
70
|
activity_events ActivityEvent[]
|
|
71
|
+
interview_activities InterviewActivity[]
|
|
71
72
|
usage_ledger_entries UsageLedgerEntry[]
|
|
72
73
|
usage_aggregates UsageAggregate[]
|
|
73
74
|
channel_provider_configs ChannelProviderConfig[]
|