@adaptware/eagles-db 0.4.23 → 0.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/bin/db-cli.js +91 -91
- package/client/edge.js +9 -15
- package/client/index-browser.js +1 -8
- package/client/index.d.ts +565 -234
- package/client/index.js +15 -21
- package/client/{query_engine-windows.dll.node → libquery_engine-darwin-arm64.dylib.node} +0 -0
- package/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +15 -22
- package/client/wasm.js +9 -15
- package/package.json +58 -58
- package/prisma/schema/CandidateQuestionResponse.prisma +24 -24
- package/prisma/schema/UserRole.prisma +20 -20
- package/prisma/schema/action.prisma +35 -35
- package/prisma/schema/activityLog.prisma +22 -22
- package/prisma/schema/applications.prisma +56 -57
- package/prisma/schema/approval.prisma +14 -14
- package/prisma/schema/assessment.prisma +39 -39
- package/prisma/schema/assessmentLibrary.prisma +21 -21
- package/prisma/schema/assessmentQuestion.prisma +17 -17
- package/prisma/schema/assignment.prisma +48 -48
- package/prisma/schema/assignmentLibrary.prisma +20 -20
- package/prisma/schema/authModule.prisma +36 -36
- package/prisma/schema/budget.prisma +38 -38
- package/prisma/schema/calendly.prisma +18 -18
- package/prisma/schema/candidateProfile.prisma +26 -26
- package/prisma/schema/communication.prisma +156 -156
- package/prisma/schema/contactUs.prisma +12 -12
- package/prisma/schema/document.prisma +38 -37
- package/prisma/schema/evaluationPlan.prisma +74 -83
- package/prisma/schema/feedback.prisma +18 -18
- package/prisma/schema/fitCheck.prisma +58 -58
- package/prisma/schema/google.prisma +16 -16
- package/prisma/schema/integration.prisma +98 -98
- package/prisma/schema/interview.prisma +112 -112
- package/prisma/schema/interviewNotes.prisma +17 -17
- package/prisma/schema/jobApplicationFields.prisma +37 -37
- package/prisma/schema/jobApplicationResponse.prisma +33 -33
- package/prisma/schema/jobApplicationTemplate.prisma +30 -30
- package/prisma/schema/jobDescription.prisma +59 -57
- package/prisma/schema/jobDescriptionData.prisma +15 -15
- package/prisma/schema/jobProfile.prisma +56 -56
- package/prisma/schema/liveAnalysis.prisma +17 -17
- package/prisma/schema/message.prisma +15 -15
- package/prisma/schema/migrations/20260415120000_remove_job_profile_current_phase/migration.sql +2 -2
- package/prisma/schema/migrations/20260422120000_add_integration_provider_zoom/migration.sql +2 -2
- package/prisma/schema/migrations/20260422140000_add_zoom_meeting_tables/migration.sql +57 -57
- package/prisma/schema/migrations/20260422180000_add_zoom_webhook_event/migration.sql +18 -18
- package/prisma/schema/migrations/20260423140000_add_interview_platform/migration.sql +6 -6
- package/prisma/schema/migrations/20260423150000_remove_interview_zoom_topic/migration.sql +2 -2
- package/prisma/schema/migrations/20260423160000_zoom_meeting_uuid/migration.sql +4 -4
- package/prisma/schema/migrations/20260423170000_zoom_meeting_uuid_prisma_sync/migration.sql +2 -2
- package/prisma/schema/migrations/20260424120000_auth_module_user_provider_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260424130000_zoom_meeting_zoom_host_user_id/migration.sql +6 -6
- package/prisma/schema/migrations/20260425100000_zoom_participant_user_enum/migration.sql +22 -22
- package/prisma/schema/migrations/20260425110000_zoom_participant_zoom_id_required/migration.sql +13 -13
- package/prisma/schema/migrations/20260425120000_zoom_participant_id_nullable/migration.sql +4 -4
- package/prisma/schema/migrations/20260429140000_drop_evaluation_plan_job_order_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260429180000_eval_plan_timeline_optional_ongoing_duration/migration.sql +15 -15
- package/prisma/schema/migrations/20260430120000_drop_assessment_library_metadata_fields/migration.sql +8 -8
- package/prisma/schema/migrations/20260430140000_drop_question_question_type/migration.sql +5 -5
- package/prisma/schema/migrations/20260513120000_add_organisation_config/migration.sql +56 -56
- package/prisma/schema/migrations/20260514120000_dedupe_organisation_config/migration.sql +20 -20
- package/prisma/schema/migrations/20260515120000_add_interview_ai_assistance_mode/migration.sql +5 -5
- package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
- package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
- package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
- package/prisma/schema/migrations/migration_lock.toml +3 -3
- package/prisma/schema/notes.prisma +19 -19
- package/prisma/schema/ongoingEvaluation.prisma +72 -72
- package/prisma/schema/organisation.prisma +57 -57
- package/prisma/schema/organisationConfig.prisma +12 -12
- package/prisma/schema/permission.prisma +13 -13
- package/prisma/schema/promise.prisma +39 -39
- package/prisma/schema/questions.prisma +28 -28
- package/prisma/schema/refreshToken.prisma +10 -10
- package/prisma/schema/resume.prisma +34 -34
- package/prisma/schema/resumeData.prisma +15 -15
- package/prisma/schema/schema.prisma +16 -16
- package/prisma/schema/suggestion.prisma +20 -20
- package/prisma/schema/transcript.prisma +25 -25
- package/prisma/schema/user.prisma +93 -93
- package/prisma/schema/userProfile.prisma +15 -15
- package/prisma/schema/zoomMeeting.prisma +79 -79
- package/prisma/schema/migrations/20260626120000_add_evaluation_plan_share_scope/migration.sql +0 -14
- package/prisma/schema/migrations/20260626140000_add_evaluation_comment/migration.sql +0 -2
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
enum FitCheckStatus {
|
|
2
|
-
RECOMMENDED
|
|
3
|
-
TO_REVIEW
|
|
4
|
-
NOT_RECOMMENDED
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
model FitCheck {
|
|
8
|
-
/// Primary key (UUID)
|
|
9
|
-
id String @id @default(uuid())
|
|
10
|
-
/// FK to organisations table
|
|
11
|
-
organisation_id String?
|
|
12
|
-
candidate_id String?
|
|
13
|
-
resume_id String
|
|
14
|
-
job_description_id String
|
|
15
|
-
|
|
16
|
-
/// Old Fields will be deprecated soon
|
|
17
|
-
skills_match String[]
|
|
18
|
-
responsibilities_match String[]
|
|
19
|
-
responsibilities_score Float?
|
|
20
|
-
experience_match String[]
|
|
21
|
-
experience_score Float?
|
|
22
|
-
organisation_value_score Float?
|
|
23
|
-
organisation_value_match String[]
|
|
24
|
-
qualifications_match String[]
|
|
25
|
-
qualifications_score Float?
|
|
26
|
-
fit Json[]
|
|
27
|
-
fit_check_status FitCheckStatus?
|
|
28
|
-
// Fields to be used now
|
|
29
|
-
skills_analysis Json?
|
|
30
|
-
overall_analysis Json?
|
|
31
|
-
skills_score Float?
|
|
32
|
-
overall_score Float
|
|
33
|
-
short_match_analysis Json[]
|
|
34
|
-
fit_comparison Json?
|
|
35
|
-
recommendation Json?
|
|
36
|
-
// New Fields needs to be changed now
|
|
37
|
-
candidate_analysis Json[]
|
|
38
|
-
technical_analysis Json[]
|
|
39
|
-
competency_analysis Json[]
|
|
40
|
-
|
|
41
|
-
/// Audit fields
|
|
42
|
-
created_by String
|
|
43
|
-
updated_by String
|
|
44
|
-
is_active Boolean @default(true)
|
|
45
|
-
/// Timestamps
|
|
46
|
-
created_at DateTime @default(now())
|
|
47
|
-
updated_at DateTime @updatedAt
|
|
48
|
-
/// Relations
|
|
49
|
-
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
50
|
-
candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
51
|
-
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
52
|
-
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
53
|
-
application Application?
|
|
54
|
-
|
|
55
|
-
/// Ensure one FitCheck per (resume_id, job_description_id) pair
|
|
56
|
-
@@unique([resume_id, job_description_id])
|
|
57
|
-
@@index([resume_id])
|
|
58
|
-
}
|
|
1
|
+
enum FitCheckStatus {
|
|
2
|
+
RECOMMENDED
|
|
3
|
+
TO_REVIEW
|
|
4
|
+
NOT_RECOMMENDED
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
model FitCheck {
|
|
8
|
+
/// Primary key (UUID)
|
|
9
|
+
id String @id @default(uuid())
|
|
10
|
+
/// FK to organisations table
|
|
11
|
+
organisation_id String?
|
|
12
|
+
candidate_id String?
|
|
13
|
+
resume_id String
|
|
14
|
+
job_description_id String
|
|
15
|
+
|
|
16
|
+
/// Old Fields will be deprecated soon
|
|
17
|
+
skills_match String[]
|
|
18
|
+
responsibilities_match String[]
|
|
19
|
+
responsibilities_score Float?
|
|
20
|
+
experience_match String[]
|
|
21
|
+
experience_score Float?
|
|
22
|
+
organisation_value_score Float?
|
|
23
|
+
organisation_value_match String[]
|
|
24
|
+
qualifications_match String[]
|
|
25
|
+
qualifications_score Float?
|
|
26
|
+
fit Json[]
|
|
27
|
+
fit_check_status FitCheckStatus?
|
|
28
|
+
// Fields to be used now
|
|
29
|
+
skills_analysis Json?
|
|
30
|
+
overall_analysis Json?
|
|
31
|
+
skills_score Float?
|
|
32
|
+
overall_score Float
|
|
33
|
+
short_match_analysis Json[]
|
|
34
|
+
fit_comparison Json?
|
|
35
|
+
recommendation Json?
|
|
36
|
+
// New Fields needs to be changed now
|
|
37
|
+
candidate_analysis Json[]
|
|
38
|
+
technical_analysis Json[]
|
|
39
|
+
competency_analysis Json[]
|
|
40
|
+
|
|
41
|
+
/// Audit fields
|
|
42
|
+
created_by String
|
|
43
|
+
updated_by String
|
|
44
|
+
is_active Boolean @default(true)
|
|
45
|
+
/// Timestamps
|
|
46
|
+
created_at DateTime @default(now())
|
|
47
|
+
updated_at DateTime @updatedAt
|
|
48
|
+
/// Relations
|
|
49
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
50
|
+
candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
51
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
52
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
53
|
+
application Application?
|
|
54
|
+
|
|
55
|
+
/// Ensure one FitCheck per (resume_id, job_description_id) pair
|
|
56
|
+
@@unique([resume_id, job_description_id])
|
|
57
|
+
@@index([resume_id])
|
|
58
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
model Google {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
user_id String @unique
|
|
4
|
-
|
|
5
|
-
google_email String
|
|
6
|
-
refresh_token String
|
|
7
|
-
scope String?
|
|
8
|
-
|
|
9
|
-
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
10
|
-
|
|
11
|
-
created_at DateTime @default(now())
|
|
12
|
-
updated_at DateTime @updatedAt
|
|
13
|
-
created_by String
|
|
14
|
-
updated_by String
|
|
15
|
-
is_active Boolean @default(true)
|
|
16
|
-
}
|
|
1
|
+
model Google {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
user_id String @unique
|
|
4
|
+
|
|
5
|
+
google_email String
|
|
6
|
+
refresh_token String
|
|
7
|
+
scope String?
|
|
8
|
+
|
|
9
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
10
|
+
|
|
11
|
+
created_at DateTime @default(now())
|
|
12
|
+
updated_at DateTime @updatedAt
|
|
13
|
+
created_by String
|
|
14
|
+
updated_by String
|
|
15
|
+
is_active Boolean @default(true)
|
|
16
|
+
}
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
enum IntegrationProvider {
|
|
2
|
-
NAUKRI
|
|
3
|
-
ZOHO_RECRUIT
|
|
4
|
-
LINKEDIN
|
|
5
|
-
GOOGLE
|
|
6
|
-
MICROSOFT
|
|
7
|
-
ZOOM
|
|
8
|
-
CALENDLY
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
enum IntegrationAuthType {
|
|
12
|
-
OAUTH2
|
|
13
|
-
API_KEY
|
|
14
|
-
SSO
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
enum SyncDirection {
|
|
18
|
-
PUSH
|
|
19
|
-
PULL
|
|
20
|
-
BIDIRECTIONAL
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
enum SyncEntityType {
|
|
24
|
-
CANDIDATE
|
|
25
|
-
JOB_OPENING
|
|
26
|
-
INTERVIEW
|
|
27
|
-
APPLICATION
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
enum SyncStatus {
|
|
31
|
-
SYNCED
|
|
32
|
-
PENDING
|
|
33
|
-
FAILED
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
model IntegrationCredential {
|
|
37
|
-
id String @id @default(uuid())
|
|
38
|
-
organisation_id String?
|
|
39
|
-
provider IntegrationProvider
|
|
40
|
-
auth_type IntegrationAuthType
|
|
41
|
-
access_token String?
|
|
42
|
-
refresh_token String?
|
|
43
|
-
token_expires_at DateTime?
|
|
44
|
-
api_key String?
|
|
45
|
-
api_secret String?
|
|
46
|
-
metadata Json @default("{}")
|
|
47
|
-
is_active Boolean @default(true)
|
|
48
|
-
|
|
49
|
-
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
50
|
-
|
|
51
|
-
created_at DateTime @default(now())
|
|
52
|
-
updated_at DateTime @updatedAt
|
|
53
|
-
created_by String
|
|
54
|
-
updated_by String
|
|
55
|
-
|
|
56
|
-
@@unique([organisation_id, provider])
|
|
57
|
-
@@index([provider])
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
model IntegrationJobSync {
|
|
61
|
-
id String @id @default(uuid())
|
|
62
|
-
job_description_id String
|
|
63
|
-
provider IntegrationProvider
|
|
64
|
-
external_id String?
|
|
65
|
-
sync_enabled Boolean @default(true)
|
|
66
|
-
last_synced_at DateTime?
|
|
67
|
-
sync_direction SyncDirection @default(PUSH)
|
|
68
|
-
metadata Json @default("{}")
|
|
69
|
-
|
|
70
|
-
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
|
|
71
|
-
|
|
72
|
-
created_at DateTime @default(now())
|
|
73
|
-
updated_at DateTime @updatedAt
|
|
74
|
-
|
|
75
|
-
@@unique([job_description_id, provider])
|
|
76
|
-
@@index([provider])
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
model ZohoSyncMapping {
|
|
80
|
-
id String @id @default(uuid())
|
|
81
|
-
organisation_id String
|
|
82
|
-
entity_type SyncEntityType
|
|
83
|
-
treadspace_id String
|
|
84
|
-
zoho_module String
|
|
85
|
-
zoho_record_id String
|
|
86
|
-
last_synced_at DateTime @default(now())
|
|
87
|
-
sync_status SyncStatus @default(PENDING)
|
|
88
|
-
error_message String?
|
|
89
|
-
|
|
90
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
91
|
-
|
|
92
|
-
created_at DateTime @default(now())
|
|
93
|
-
updated_at DateTime @updatedAt
|
|
94
|
-
|
|
95
|
-
@@unique([organisation_id, entity_type, treadspace_id])
|
|
96
|
-
@@index([zoho_record_id])
|
|
97
|
-
@@index([sync_status])
|
|
98
|
-
}
|
|
1
|
+
enum IntegrationProvider {
|
|
2
|
+
NAUKRI
|
|
3
|
+
ZOHO_RECRUIT
|
|
4
|
+
LINKEDIN
|
|
5
|
+
GOOGLE
|
|
6
|
+
MICROSOFT
|
|
7
|
+
ZOOM
|
|
8
|
+
CALENDLY
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enum IntegrationAuthType {
|
|
12
|
+
OAUTH2
|
|
13
|
+
API_KEY
|
|
14
|
+
SSO
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
enum SyncDirection {
|
|
18
|
+
PUSH
|
|
19
|
+
PULL
|
|
20
|
+
BIDIRECTIONAL
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
enum SyncEntityType {
|
|
24
|
+
CANDIDATE
|
|
25
|
+
JOB_OPENING
|
|
26
|
+
INTERVIEW
|
|
27
|
+
APPLICATION
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
enum SyncStatus {
|
|
31
|
+
SYNCED
|
|
32
|
+
PENDING
|
|
33
|
+
FAILED
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
model IntegrationCredential {
|
|
37
|
+
id String @id @default(uuid())
|
|
38
|
+
organisation_id String?
|
|
39
|
+
provider IntegrationProvider
|
|
40
|
+
auth_type IntegrationAuthType
|
|
41
|
+
access_token String?
|
|
42
|
+
refresh_token String?
|
|
43
|
+
token_expires_at DateTime?
|
|
44
|
+
api_key String?
|
|
45
|
+
api_secret String?
|
|
46
|
+
metadata Json @default("{}")
|
|
47
|
+
is_active Boolean @default(true)
|
|
48
|
+
|
|
49
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
50
|
+
|
|
51
|
+
created_at DateTime @default(now())
|
|
52
|
+
updated_at DateTime @updatedAt
|
|
53
|
+
created_by String
|
|
54
|
+
updated_by String
|
|
55
|
+
|
|
56
|
+
@@unique([organisation_id, provider])
|
|
57
|
+
@@index([provider])
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
model IntegrationJobSync {
|
|
61
|
+
id String @id @default(uuid())
|
|
62
|
+
job_description_id String
|
|
63
|
+
provider IntegrationProvider
|
|
64
|
+
external_id String?
|
|
65
|
+
sync_enabled Boolean @default(true)
|
|
66
|
+
last_synced_at DateTime?
|
|
67
|
+
sync_direction SyncDirection @default(PUSH)
|
|
68
|
+
metadata Json @default("{}")
|
|
69
|
+
|
|
70
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
|
|
71
|
+
|
|
72
|
+
created_at DateTime @default(now())
|
|
73
|
+
updated_at DateTime @updatedAt
|
|
74
|
+
|
|
75
|
+
@@unique([job_description_id, provider])
|
|
76
|
+
@@index([provider])
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
model ZohoSyncMapping {
|
|
80
|
+
id String @id @default(uuid())
|
|
81
|
+
organisation_id String
|
|
82
|
+
entity_type SyncEntityType
|
|
83
|
+
treadspace_id String
|
|
84
|
+
zoho_module String
|
|
85
|
+
zoho_record_id String
|
|
86
|
+
last_synced_at DateTime @default(now())
|
|
87
|
+
sync_status SyncStatus @default(PENDING)
|
|
88
|
+
error_message String?
|
|
89
|
+
|
|
90
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
91
|
+
|
|
92
|
+
created_at DateTime @default(now())
|
|
93
|
+
updated_at DateTime @updatedAt
|
|
94
|
+
|
|
95
|
+
@@unique([organisation_id, entity_type, treadspace_id])
|
|
96
|
+
@@index([zoho_record_id])
|
|
97
|
+
@@index([sync_status])
|
|
98
|
+
}
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
enum InterviewStatus {
|
|
2
|
-
INTERVIEW_REQUESTED
|
|
3
|
-
SCHEDULED
|
|
4
|
-
IN_PROGRESS
|
|
5
|
-
CANCELLED
|
|
6
|
-
NO_SHOW // Candidate or interviewer failed to appear
|
|
7
|
-
EVALUATION_PENDING // Waiting for feedback or evaluation
|
|
8
|
-
EVALUATED // Feedback completed and locked
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
enum InterviewFeedback {
|
|
12
|
-
STRONG_HIRE
|
|
13
|
-
HIRE
|
|
14
|
-
NO_HIRE
|
|
15
|
-
STRONG_NO_HIRE
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
enum InterviewPlatform {
|
|
19
|
-
TREADSPACE
|
|
20
|
-
ZOOM
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
enum AiAssistanceMode {
|
|
24
|
-
NONE
|
|
25
|
-
ASSISTED
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
model Interview {
|
|
29
|
-
id String @id @default(uuid())
|
|
30
|
-
/// Foreign keys
|
|
31
|
-
organisation_id String
|
|
32
|
-
candidate_id String
|
|
33
|
-
interviewer_id String?
|
|
34
|
-
evaluation_plan_id String
|
|
35
|
-
application_id String?
|
|
36
|
-
resume_id String
|
|
37
|
-
job_description_id String
|
|
38
|
-
calendar_event_id String?
|
|
39
|
-
/// Data
|
|
40
|
-
room_name String?
|
|
41
|
-
interview_summary String[]
|
|
42
|
-
scheduled_start_time DateTime?
|
|
43
|
-
scheduled_end_time DateTime?
|
|
44
|
-
actual_start_time DateTime?
|
|
45
|
-
actual_end_time DateTime?
|
|
46
|
-
/// Interview length in minutes (source of truth; not derived from schedule window).
|
|
47
|
-
duration Int?
|
|
48
|
-
/// @deprecated Prefer `recording_document_id` + `Document` (type INTERVIEW_RECORDING).
|
|
49
|
-
recording_url String?
|
|
50
|
-
recording_document_id String? @unique
|
|
51
|
-
evaluation_type EvaluationType? @default(TREADSPACE_AI_ASSISTED)
|
|
52
|
-
ai_assistance_mode AiAssistanceMode? @default(ASSISTED)
|
|
53
|
-
interview_status InterviewStatus @default(SCHEDULED)
|
|
54
|
-
interview_platform InterviewPlatform @default(TREADSPACE)
|
|
55
|
-
/// Old Feedback fields will be deprecated soon
|
|
56
|
-
ai_interview_feedback InterviewFeedback?
|
|
57
|
-
interview_feedback InterviewFeedback?
|
|
58
|
-
overall_feedback String?
|
|
59
|
-
interview_rating Float? // Overall rating out of 100 based on evaluation
|
|
60
|
-
/// New Feedback fields
|
|
61
|
-
ai_feedback Json?
|
|
62
|
-
human_feedback Json?
|
|
63
|
-
interviewer_feedback Json?
|
|
64
|
-
section_feedback Json[]
|
|
65
|
-
interview_preparation Json?
|
|
66
|
-
final_feedback Json?
|
|
67
|
-
interview_analysis_ranges Json?
|
|
68
|
-
interview_flow_summary String?
|
|
69
|
-
/// When Orion AI feedback was last persisted on this interview.
|
|
70
|
-
ai_feedback_generated_at DateTime?
|
|
71
|
-
/// When recruiter human feedback was last saved (draft or final).
|
|
72
|
-
human_feedback_updated_at DateTime?
|
|
73
|
-
|
|
74
|
-
/// Self-scheduling
|
|
75
|
-
reschedule_count Int @default(0)
|
|
76
|
-
last_rescheduled_at DateTime?
|
|
77
|
-
first_assigned_at DateTime?
|
|
78
|
-
/// True while the candidate is waiting on recruiter action (typically a
|
|
79
|
-
/// reassign) after they submitted alternate slots via "None match" /
|
|
80
|
-
/// "Suggest times". Cleared whenever the recruiter routes a fresh
|
|
81
|
-
/// request via `upsertInterviewRequestRecord`.
|
|
82
|
-
awaiting_recruiter_action Boolean @default(false)
|
|
83
|
-
|
|
84
|
-
/// Audit fields
|
|
85
|
-
created_at DateTime @default(now())
|
|
86
|
-
updated_at DateTime @updatedAt
|
|
87
|
-
created_by String
|
|
88
|
-
updated_by String
|
|
89
|
-
is_active Boolean @default(true)
|
|
90
|
-
// Relations
|
|
91
|
-
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
92
|
-
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
93
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
94
|
-
recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
95
|
-
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
96
|
-
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
97
|
-
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
98
|
-
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
99
|
-
ongoing_evaluation OngoingEvaluation?
|
|
100
|
-
transcripts Transcript[]
|
|
101
|
-
suggestions Suggestion[]
|
|
102
|
-
feedback Feedback[]
|
|
103
|
-
interviewNotes InterviewNotes[]
|
|
104
|
-
liveAnalysis LiveAnalysis[]
|
|
105
|
-
zoom_meeting ZoomMeeting?
|
|
106
|
-
|
|
107
|
-
// Indexes
|
|
108
|
-
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
109
|
-
@@index([candidate_id])
|
|
110
|
-
@@index([interviewer_id])
|
|
111
|
-
@@index([job_description_id])
|
|
112
|
-
}
|
|
1
|
+
enum InterviewStatus {
|
|
2
|
+
INTERVIEW_REQUESTED
|
|
3
|
+
SCHEDULED
|
|
4
|
+
IN_PROGRESS
|
|
5
|
+
CANCELLED
|
|
6
|
+
NO_SHOW // Candidate or interviewer failed to appear
|
|
7
|
+
EVALUATION_PENDING // Waiting for feedback or evaluation
|
|
8
|
+
EVALUATED // Feedback completed and locked
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enum InterviewFeedback {
|
|
12
|
+
STRONG_HIRE
|
|
13
|
+
HIRE
|
|
14
|
+
NO_HIRE
|
|
15
|
+
STRONG_NO_HIRE
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
enum InterviewPlatform {
|
|
19
|
+
TREADSPACE
|
|
20
|
+
ZOOM
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
enum AiAssistanceMode {
|
|
24
|
+
NONE
|
|
25
|
+
ASSISTED
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
model Interview {
|
|
29
|
+
id String @id @default(uuid())
|
|
30
|
+
/// Foreign keys
|
|
31
|
+
organisation_id String
|
|
32
|
+
candidate_id String
|
|
33
|
+
interviewer_id String?
|
|
34
|
+
evaluation_plan_id String
|
|
35
|
+
application_id String?
|
|
36
|
+
resume_id String
|
|
37
|
+
job_description_id String
|
|
38
|
+
calendar_event_id String?
|
|
39
|
+
/// Data
|
|
40
|
+
room_name String?
|
|
41
|
+
interview_summary String[]
|
|
42
|
+
scheduled_start_time DateTime?
|
|
43
|
+
scheduled_end_time DateTime?
|
|
44
|
+
actual_start_time DateTime?
|
|
45
|
+
actual_end_time DateTime?
|
|
46
|
+
/// Interview length in minutes (source of truth; not derived from schedule window).
|
|
47
|
+
duration Int?
|
|
48
|
+
/// @deprecated Prefer `recording_document_id` + `Document` (type INTERVIEW_RECORDING).
|
|
49
|
+
recording_url String?
|
|
50
|
+
recording_document_id String? @unique
|
|
51
|
+
evaluation_type EvaluationType? @default(TREADSPACE_AI_ASSISTED)
|
|
52
|
+
ai_assistance_mode AiAssistanceMode? @default(ASSISTED)
|
|
53
|
+
interview_status InterviewStatus @default(SCHEDULED)
|
|
54
|
+
interview_platform InterviewPlatform @default(TREADSPACE)
|
|
55
|
+
/// Old Feedback fields will be deprecated soon
|
|
56
|
+
ai_interview_feedback InterviewFeedback?
|
|
57
|
+
interview_feedback InterviewFeedback?
|
|
58
|
+
overall_feedback String?
|
|
59
|
+
interview_rating Float? // Overall rating out of 100 based on evaluation
|
|
60
|
+
/// New Feedback fields
|
|
61
|
+
ai_feedback Json?
|
|
62
|
+
human_feedback Json?
|
|
63
|
+
interviewer_feedback Json?
|
|
64
|
+
section_feedback Json[]
|
|
65
|
+
interview_preparation Json?
|
|
66
|
+
final_feedback Json?
|
|
67
|
+
interview_analysis_ranges Json?
|
|
68
|
+
interview_flow_summary String?
|
|
69
|
+
/// When Orion AI feedback was last persisted on this interview.
|
|
70
|
+
ai_feedback_generated_at DateTime?
|
|
71
|
+
/// When recruiter human feedback was last saved (draft or final).
|
|
72
|
+
human_feedback_updated_at DateTime?
|
|
73
|
+
|
|
74
|
+
/// Self-scheduling
|
|
75
|
+
reschedule_count Int @default(0)
|
|
76
|
+
last_rescheduled_at DateTime?
|
|
77
|
+
first_assigned_at DateTime?
|
|
78
|
+
/// True while the candidate is waiting on recruiter action (typically a
|
|
79
|
+
/// reassign) after they submitted alternate slots via "None match" /
|
|
80
|
+
/// "Suggest times". Cleared whenever the recruiter routes a fresh
|
|
81
|
+
/// request via `upsertInterviewRequestRecord`.
|
|
82
|
+
awaiting_recruiter_action Boolean @default(false)
|
|
83
|
+
|
|
84
|
+
/// Audit fields
|
|
85
|
+
created_at DateTime @default(now())
|
|
86
|
+
updated_at DateTime @updatedAt
|
|
87
|
+
created_by String
|
|
88
|
+
updated_by String
|
|
89
|
+
is_active Boolean @default(true)
|
|
90
|
+
// Relations
|
|
91
|
+
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
92
|
+
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
93
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
94
|
+
recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
95
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
96
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
97
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
98
|
+
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
99
|
+
ongoing_evaluation OngoingEvaluation?
|
|
100
|
+
transcripts Transcript[]
|
|
101
|
+
suggestions Suggestion[]
|
|
102
|
+
feedback Feedback[]
|
|
103
|
+
interviewNotes InterviewNotes[]
|
|
104
|
+
liveAnalysis LiveAnalysis[]
|
|
105
|
+
zoom_meeting ZoomMeeting?
|
|
106
|
+
|
|
107
|
+
// Indexes
|
|
108
|
+
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
109
|
+
@@index([candidate_id])
|
|
110
|
+
@@index([interviewer_id])
|
|
111
|
+
@@index([job_description_id])
|
|
112
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
model InterviewNotes {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
interview_id String
|
|
4
|
-
note String
|
|
5
|
-
details Json?
|
|
6
|
-
timestamp DateTime @default(now())
|
|
7
|
-
created_at DateTime @default(now())
|
|
8
|
-
updated_at DateTime @updatedAt
|
|
9
|
-
created_by String
|
|
10
|
-
updated_by String
|
|
11
|
-
is_active Boolean @default(true)
|
|
12
|
-
|
|
13
|
-
// Relations
|
|
14
|
-
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
15
|
-
|
|
16
|
-
@@index([interview_id])
|
|
17
|
-
}
|
|
1
|
+
model InterviewNotes {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
interview_id String
|
|
4
|
+
note String
|
|
5
|
+
details Json?
|
|
6
|
+
timestamp DateTime @default(now())
|
|
7
|
+
created_at DateTime @default(now())
|
|
8
|
+
updated_at DateTime @updatedAt
|
|
9
|
+
created_by String
|
|
10
|
+
updated_by String
|
|
11
|
+
is_active Boolean @default(true)
|
|
12
|
+
|
|
13
|
+
// Relations
|
|
14
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
15
|
+
|
|
16
|
+
@@index([interview_id])
|
|
17
|
+
}
|