@adaptware/eagles-db 0.4.22 → 0.4.23
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 +16 -8
- package/client/index-browser.js +8 -0
- package/client/index.d.ts +232 -7
- package/client/index.js +22 -14
- package/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/client/package.json +1 -1
- package/client/{libquery_engine-darwin-arm64.dylib.node → query_engine-windows.dll.node} +0 -0
- package/client/schema.prisma +20 -10
- package/client/wasm.js +16 -8
- 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 +57 -56
- 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 +37 -37
- package/prisma/schema/evaluationPlan.prisma +83 -74
- 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 +57 -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/20260626120000_add_evaluation_plan_share_scope/migration.sql +14 -0
- package/prisma/schema/migrations/20260626140000_add_evaluation_comment/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/.DS_Store +0 -0
- package/prisma/schema/migrations/20260519120000_interview_deadline/migration.sql +0 -2
- package/prisma/schema/migrations/20260520120000_interview_duration_drop_deadline/migration.sql +0 -30
- package/prisma/schema/migrations/20260602120000_resume_file_hash_drop_unique/migration.sql +0 -2
- package/prisma/schema/migrations/20260603120000_job_application_field_is_mandatory/migration.sql +0 -2
- package/prisma/schema/migrations/20260604120000_job_application_response_updated_by_organisation/migration.sql +0 -2
- package/prisma/schema/migrations/20260605120000_drop_document_application_id/migration.sql +0 -3
- package/prisma/schema/migrations/20260610120000_jaf_template_model/migration.sql +0 -70
- package/prisma/schema/migrations/20260610130000_assignment_document_fks/migration.sql +0 -15
- package/prisma/schema/migrations/20260610140000_jaf_draft_activation/migration.sql +0 -12
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
enum JobApplicationFieldType {
|
|
2
|
-
TEXT
|
|
3
|
-
NUMBER
|
|
4
|
-
DATE
|
|
5
|
-
BOOLEAN
|
|
6
|
-
MULTI_SELECT
|
|
7
|
-
FILE
|
|
8
|
-
DROP_DOWN
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
model JobApplicationField {
|
|
12
|
-
/// Primary key (UUID)
|
|
13
|
-
id String @id @default(uuid())
|
|
14
|
-
/// Foreign keys
|
|
15
|
-
organisation_id String
|
|
16
|
-
template_id String
|
|
17
|
-
/// Data fields
|
|
18
|
-
field_type JobApplicationFieldType
|
|
19
|
-
label String
|
|
20
|
-
description String?
|
|
21
|
-
is_mandatory Boolean @default(false)
|
|
22
|
-
is_draft Boolean @default(true)
|
|
23
|
-
options String[]
|
|
24
|
-
/// Audit fields
|
|
25
|
-
is_active Boolean @default(true)
|
|
26
|
-
created_by String
|
|
27
|
-
updated_by String
|
|
28
|
-
created_at DateTime @default(now())
|
|
29
|
-
updated_at DateTime @updatedAt
|
|
30
|
-
/// Relations
|
|
31
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
32
|
-
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
33
|
-
job_application_responses JobApplicationResponse[]
|
|
34
|
-
|
|
35
|
-
/// Indexes
|
|
36
|
-
@@index([organisation_id, template_id])
|
|
37
|
-
}
|
|
1
|
+
enum JobApplicationFieldType {
|
|
2
|
+
TEXT
|
|
3
|
+
NUMBER
|
|
4
|
+
DATE
|
|
5
|
+
BOOLEAN
|
|
6
|
+
MULTI_SELECT
|
|
7
|
+
FILE
|
|
8
|
+
DROP_DOWN
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
model JobApplicationField {
|
|
12
|
+
/// Primary key (UUID)
|
|
13
|
+
id String @id @default(uuid())
|
|
14
|
+
/// Foreign keys
|
|
15
|
+
organisation_id String
|
|
16
|
+
template_id String
|
|
17
|
+
/// Data fields
|
|
18
|
+
field_type JobApplicationFieldType
|
|
19
|
+
label String
|
|
20
|
+
description String?
|
|
21
|
+
is_mandatory Boolean @default(false)
|
|
22
|
+
is_draft Boolean @default(true)
|
|
23
|
+
options String[]
|
|
24
|
+
/// Audit fields
|
|
25
|
+
is_active Boolean @default(true)
|
|
26
|
+
created_by String
|
|
27
|
+
updated_by String
|
|
28
|
+
created_at DateTime @default(now())
|
|
29
|
+
updated_at DateTime @updatedAt
|
|
30
|
+
/// Relations
|
|
31
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
32
|
+
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
33
|
+
job_application_responses JobApplicationResponse[]
|
|
34
|
+
|
|
35
|
+
/// Indexes
|
|
36
|
+
@@index([organisation_id, template_id])
|
|
37
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
model JobApplicationResponse {
|
|
2
|
-
/// Primary key
|
|
3
|
-
id String @id @default(uuid())
|
|
4
|
-
/// Foreign keys
|
|
5
|
-
application_id String
|
|
6
|
-
job_application_field_id String?
|
|
7
|
-
document_id String?
|
|
8
|
-
/// Answer payload
|
|
9
|
-
response Json?
|
|
10
|
-
/// Denormalized question snapshot (immutable on candidate save)
|
|
11
|
-
field_type JobApplicationFieldType?
|
|
12
|
-
label String?
|
|
13
|
-
description String?
|
|
14
|
-
is_mandatory Boolean?
|
|
15
|
-
is_draft Boolean?
|
|
16
|
-
is_submitted Boolean @default(false)
|
|
17
|
-
options String[]
|
|
18
|
-
updated_by_organisation Boolean @default(false)
|
|
19
|
-
/// Audit fields
|
|
20
|
-
created_at DateTime @default(now())
|
|
21
|
-
updated_at DateTime @updatedAt
|
|
22
|
-
created_by String
|
|
23
|
-
updated_by String
|
|
24
|
-
is_active Boolean @default(true)
|
|
25
|
-
/// Relations
|
|
26
|
-
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
27
|
-
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
28
|
-
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
29
|
-
|
|
30
|
-
/// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
31
|
-
@@index([application_id])
|
|
32
|
-
@@index([job_application_field_id])
|
|
33
|
-
}
|
|
1
|
+
model JobApplicationResponse {
|
|
2
|
+
/// Primary key
|
|
3
|
+
id String @id @default(uuid())
|
|
4
|
+
/// Foreign keys
|
|
5
|
+
application_id String
|
|
6
|
+
job_application_field_id String?
|
|
7
|
+
document_id String?
|
|
8
|
+
/// Answer payload
|
|
9
|
+
response Json?
|
|
10
|
+
/// Denormalized question snapshot (immutable on candidate save)
|
|
11
|
+
field_type JobApplicationFieldType?
|
|
12
|
+
label String?
|
|
13
|
+
description String?
|
|
14
|
+
is_mandatory Boolean?
|
|
15
|
+
is_draft Boolean?
|
|
16
|
+
is_submitted Boolean @default(false)
|
|
17
|
+
options String[]
|
|
18
|
+
updated_by_organisation Boolean @default(false)
|
|
19
|
+
/// Audit fields
|
|
20
|
+
created_at DateTime @default(now())
|
|
21
|
+
updated_at DateTime @updatedAt
|
|
22
|
+
created_by String
|
|
23
|
+
updated_by String
|
|
24
|
+
is_active Boolean @default(true)
|
|
25
|
+
/// Relations
|
|
26
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
27
|
+
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
28
|
+
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
29
|
+
|
|
30
|
+
/// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
31
|
+
@@index([application_id])
|
|
32
|
+
@@index([job_application_field_id])
|
|
33
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
enum JobApplicationTemplateScope {
|
|
2
|
-
ORGANIZATION
|
|
3
|
-
JOB
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
model JobApplicationTemplate {
|
|
7
|
-
/// Primary key
|
|
8
|
-
id String @id @default(uuid())
|
|
9
|
-
/// Foreign keys
|
|
10
|
-
organisation_id String
|
|
11
|
-
job_description_id String? @unique
|
|
12
|
-
/// Data fields
|
|
13
|
-
name String
|
|
14
|
-
description String?
|
|
15
|
-
scope JobApplicationTemplateScope @default(ORGANIZATION)
|
|
16
|
-
/// Audit fields
|
|
17
|
-
is_active Boolean @default(true)
|
|
18
|
-
created_by String
|
|
19
|
-
updated_by String
|
|
20
|
-
created_at DateTime @default(now())
|
|
21
|
-
updated_at DateTime @updatedAt
|
|
22
|
-
/// Relations
|
|
23
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
24
|
-
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
25
|
-
fields JobApplicationField[]
|
|
26
|
-
|
|
27
|
-
/// Indexes
|
|
28
|
-
@@index([organisation_id, scope])
|
|
29
|
-
@@index([job_description_id])
|
|
30
|
-
}
|
|
1
|
+
enum JobApplicationTemplateScope {
|
|
2
|
+
ORGANIZATION
|
|
3
|
+
JOB
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
model JobApplicationTemplate {
|
|
7
|
+
/// Primary key
|
|
8
|
+
id String @id @default(uuid())
|
|
9
|
+
/// Foreign keys
|
|
10
|
+
organisation_id String
|
|
11
|
+
job_description_id String? @unique
|
|
12
|
+
/// Data fields
|
|
13
|
+
name String
|
|
14
|
+
description String?
|
|
15
|
+
scope JobApplicationTemplateScope @default(ORGANIZATION)
|
|
16
|
+
/// Audit fields
|
|
17
|
+
is_active Boolean @default(true)
|
|
18
|
+
created_by String
|
|
19
|
+
updated_by String
|
|
20
|
+
created_at DateTime @default(now())
|
|
21
|
+
updated_at DateTime @updatedAt
|
|
22
|
+
/// Relations
|
|
23
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
24
|
+
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
25
|
+
fields JobApplicationField[]
|
|
26
|
+
|
|
27
|
+
/// Indexes
|
|
28
|
+
@@index([organisation_id, scope])
|
|
29
|
+
@@index([job_description_id])
|
|
30
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
enum JobDescriptionStatus {
|
|
2
|
-
CREATED
|
|
3
|
-
DRAFT
|
|
4
|
-
ACTIVE
|
|
5
|
-
DEACTIVATED
|
|
6
|
-
CLOSED
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
model JobDescription {
|
|
10
|
-
id String @id @default(uuid())
|
|
11
|
-
organisation_id String
|
|
12
|
-
hiring_manager_id String?
|
|
13
|
-
status JobDescriptionStatus @default(DRAFT)
|
|
14
|
-
screeningQuestions String[]
|
|
15
|
-
recommendedQuestions Json[]
|
|
16
|
-
/// @deprecated Prefer `source_document_id` + `Document` (type JOB_DESCRIPTION).
|
|
17
|
-
uploaded_job_description_path String?
|
|
18
|
-
source_document_id String? @unique
|
|
19
|
-
is_plan_published Boolean @default(false)
|
|
20
|
-
is_posted Boolean @default(false)
|
|
21
|
-
summary Json?
|
|
22
|
-
ai_insight Json?
|
|
23
|
-
job_fit_comparison Json?
|
|
24
|
-
// Audit fields
|
|
25
|
-
created_at DateTime @default(now())
|
|
26
|
-
updated_at DateTime @updatedAt
|
|
27
|
-
created_by String
|
|
28
|
-
updated_by String
|
|
29
|
-
is_active Boolean @default(true)
|
|
30
|
-
openings Int @default(1)
|
|
31
|
-
job_profile_id String?
|
|
32
|
-
job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
33
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
34
|
-
source_document Document? @relation(fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
35
|
-
applications Application[]
|
|
36
|
-
interviews Interview[]
|
|
37
|
-
assignments Assignment[]
|
|
38
|
-
fit_check FitCheck[] // one-to-many link
|
|
39
|
-
job_description_data JobDescriptionData[] // one-to-many link
|
|
40
|
-
evaluationPlan EvaluationPlan[] // relation to evaluation methods
|
|
41
|
-
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
42
|
-
assignment_library AssignmentLibrary[]
|
|
43
|
-
approvals Approval[] // one-to-many relation
|
|
44
|
-
resumes Resume[] // one-to-many link
|
|
45
|
-
budget Budget?
|
|
46
|
-
hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
47
|
-
recruiters User[]
|
|
48
|
-
transcripts Transcript[]
|
|
49
|
-
integration_job_syncs IntegrationJobSync[]
|
|
50
|
-
job_application_template JobApplicationTemplate?
|
|
51
|
-
conversations Conversation[]
|
|
52
|
-
communication_messages CommunicationMessage[]
|
|
53
|
-
|
|
54
|
-
@@index([organisation_id])
|
|
55
|
-
@@index([hiring_manager_id])
|
|
56
|
-
@@index([job_profile_id])
|
|
57
|
-
}
|
|
1
|
+
enum JobDescriptionStatus {
|
|
2
|
+
CREATED
|
|
3
|
+
DRAFT
|
|
4
|
+
ACTIVE
|
|
5
|
+
DEACTIVATED
|
|
6
|
+
CLOSED
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
model JobDescription {
|
|
10
|
+
id String @id @default(uuid())
|
|
11
|
+
organisation_id String
|
|
12
|
+
hiring_manager_id String?
|
|
13
|
+
status JobDescriptionStatus @default(DRAFT)
|
|
14
|
+
screeningQuestions String[]
|
|
15
|
+
recommendedQuestions Json[]
|
|
16
|
+
/// @deprecated Prefer `source_document_id` + `Document` (type JOB_DESCRIPTION).
|
|
17
|
+
uploaded_job_description_path String?
|
|
18
|
+
source_document_id String? @unique
|
|
19
|
+
is_plan_published Boolean @default(false)
|
|
20
|
+
is_posted Boolean @default(false)
|
|
21
|
+
summary Json?
|
|
22
|
+
ai_insight Json?
|
|
23
|
+
job_fit_comparison Json?
|
|
24
|
+
// Audit fields
|
|
25
|
+
created_at DateTime @default(now())
|
|
26
|
+
updated_at DateTime @updatedAt
|
|
27
|
+
created_by String
|
|
28
|
+
updated_by String
|
|
29
|
+
is_active Boolean @default(true)
|
|
30
|
+
openings Int @default(1)
|
|
31
|
+
job_profile_id String?
|
|
32
|
+
job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
33
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
34
|
+
source_document Document? @relation(fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
35
|
+
applications Application[]
|
|
36
|
+
interviews Interview[]
|
|
37
|
+
assignments Assignment[]
|
|
38
|
+
fit_check FitCheck[] // one-to-many link
|
|
39
|
+
job_description_data JobDescriptionData[] // one-to-many link
|
|
40
|
+
evaluationPlan EvaluationPlan[] // relation to evaluation methods
|
|
41
|
+
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
42
|
+
assignment_library AssignmentLibrary[]
|
|
43
|
+
approvals Approval[] // one-to-many relation
|
|
44
|
+
resumes Resume[] // one-to-many link
|
|
45
|
+
budget Budget?
|
|
46
|
+
hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
47
|
+
recruiters User[]
|
|
48
|
+
transcripts Transcript[]
|
|
49
|
+
integration_job_syncs IntegrationJobSync[]
|
|
50
|
+
job_application_template JobApplicationTemplate?
|
|
51
|
+
conversations Conversation[]
|
|
52
|
+
communication_messages CommunicationMessage[]
|
|
53
|
+
|
|
54
|
+
@@index([organisation_id])
|
|
55
|
+
@@index([hiring_manager_id])
|
|
56
|
+
@@index([job_profile_id])
|
|
57
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
model JobDescriptionData {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
job_description_id String
|
|
4
|
-
key String
|
|
5
|
-
value String
|
|
6
|
-
created_at DateTime @default(now())
|
|
7
|
-
updated_at DateTime @updatedAt
|
|
8
|
-
created_by String
|
|
9
|
-
updated_by String
|
|
10
|
-
is_active Boolean @default(true)
|
|
11
|
-
|
|
12
|
-
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
-
|
|
14
|
-
@@unique([job_description_id, key])
|
|
15
|
-
}
|
|
1
|
+
model JobDescriptionData {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
job_description_id String
|
|
4
|
+
key String
|
|
5
|
+
value String
|
|
6
|
+
created_at DateTime @default(now())
|
|
7
|
+
updated_at DateTime @updatedAt
|
|
8
|
+
created_by String
|
|
9
|
+
updated_by String
|
|
10
|
+
is_active Boolean @default(true)
|
|
11
|
+
|
|
12
|
+
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
+
|
|
14
|
+
@@unique([job_description_id, key])
|
|
15
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
enum JobProfileStatus {
|
|
2
|
-
DRAFT
|
|
3
|
-
INTAKE_SENT
|
|
4
|
-
INTAKE_IN_PROGRESS
|
|
5
|
-
COMPLETE
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
model JobProfile {
|
|
9
|
-
id String @id @default(uuid())
|
|
10
|
-
organisation_id String
|
|
11
|
-
hiring_manager_id String?
|
|
12
|
-
created_by String
|
|
13
|
-
assigned_to String?
|
|
14
|
-
status JobProfileStatus @default(DRAFT)
|
|
15
|
-
|
|
16
|
-
// Basics
|
|
17
|
-
title String?
|
|
18
|
-
role_type String? // new / replacement / backfill
|
|
19
|
-
work_arrangement String? // onsite / hybrid / remote
|
|
20
|
-
employment_type String? // full_time / part_time / contract / internship
|
|
21
|
-
location String?
|
|
22
|
-
experience String?
|
|
23
|
-
experience_min String?
|
|
24
|
-
comp_range String?
|
|
25
|
-
budget String?
|
|
26
|
-
|
|
27
|
-
// Requirements (structured from AI conversation)
|
|
28
|
-
responsibilities Json?
|
|
29
|
-
must_have_skills Json?
|
|
30
|
-
nice_to_have_skills Json?
|
|
31
|
-
culture Json?
|
|
32
|
-
|
|
33
|
-
// Competencies
|
|
34
|
-
competencies Json?
|
|
35
|
-
|
|
36
|
-
// Conversation state
|
|
37
|
-
conversation_history Json?
|
|
38
|
-
orion_execution_id String?
|
|
39
|
-
|
|
40
|
-
// Audit
|
|
41
|
-
created_at DateTime @default(now())
|
|
42
|
-
updated_at DateTime @updatedAt
|
|
43
|
-
is_active Boolean @default(true)
|
|
44
|
-
|
|
45
|
-
// Relations
|
|
46
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
47
|
-
hiring_manager User? @relation("JobProfileHiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
48
|
-
creator User @relation("ProfileCreator", fields: [created_by], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
49
|
-
assignee User? @relation("ProfileAssignee", fields: [assigned_to], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
50
|
-
job_descriptions JobDescription[]
|
|
51
|
-
|
|
52
|
-
@@index([organisation_id])
|
|
53
|
-
@@index([hiring_manager_id])
|
|
54
|
-
@@index([assigned_to])
|
|
55
|
-
@@index([created_by])
|
|
56
|
-
}
|
|
1
|
+
enum JobProfileStatus {
|
|
2
|
+
DRAFT
|
|
3
|
+
INTAKE_SENT
|
|
4
|
+
INTAKE_IN_PROGRESS
|
|
5
|
+
COMPLETE
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
model JobProfile {
|
|
9
|
+
id String @id @default(uuid())
|
|
10
|
+
organisation_id String
|
|
11
|
+
hiring_manager_id String?
|
|
12
|
+
created_by String
|
|
13
|
+
assigned_to String?
|
|
14
|
+
status JobProfileStatus @default(DRAFT)
|
|
15
|
+
|
|
16
|
+
// Basics
|
|
17
|
+
title String?
|
|
18
|
+
role_type String? // new / replacement / backfill
|
|
19
|
+
work_arrangement String? // onsite / hybrid / remote
|
|
20
|
+
employment_type String? // full_time / part_time / contract / internship
|
|
21
|
+
location String?
|
|
22
|
+
experience String?
|
|
23
|
+
experience_min String?
|
|
24
|
+
comp_range String?
|
|
25
|
+
budget String?
|
|
26
|
+
|
|
27
|
+
// Requirements (structured from AI conversation)
|
|
28
|
+
responsibilities Json?
|
|
29
|
+
must_have_skills Json?
|
|
30
|
+
nice_to_have_skills Json?
|
|
31
|
+
culture Json?
|
|
32
|
+
|
|
33
|
+
// Competencies
|
|
34
|
+
competencies Json?
|
|
35
|
+
|
|
36
|
+
// Conversation state
|
|
37
|
+
conversation_history Json?
|
|
38
|
+
orion_execution_id String?
|
|
39
|
+
|
|
40
|
+
// Audit
|
|
41
|
+
created_at DateTime @default(now())
|
|
42
|
+
updated_at DateTime @updatedAt
|
|
43
|
+
is_active Boolean @default(true)
|
|
44
|
+
|
|
45
|
+
// Relations
|
|
46
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
47
|
+
hiring_manager User? @relation("JobProfileHiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
48
|
+
creator User @relation("ProfileCreator", fields: [created_by], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
49
|
+
assignee User? @relation("ProfileAssignee", fields: [assigned_to], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
50
|
+
job_descriptions JobDescription[]
|
|
51
|
+
|
|
52
|
+
@@index([organisation_id])
|
|
53
|
+
@@index([hiring_manager_id])
|
|
54
|
+
@@index([assigned_to])
|
|
55
|
+
@@index([created_by])
|
|
56
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
model LiveAnalysis {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
//foreign keys
|
|
4
|
-
interview_id String
|
|
5
|
-
//data
|
|
6
|
-
analysis Json
|
|
7
|
-
//audit fields
|
|
8
|
-
created_at DateTime @default(now())
|
|
9
|
-
updated_at DateTime @updatedAt
|
|
10
|
-
created_by String
|
|
11
|
-
updated_by String
|
|
12
|
-
is_active Boolean @default(true)
|
|
13
|
-
//relations
|
|
14
|
-
interview Interview @relation(fields: [interview_id], references: [id])
|
|
15
|
-
|
|
16
|
-
@@index([interview_id])
|
|
17
|
-
}
|
|
1
|
+
model LiveAnalysis {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
4
|
+
interview_id String
|
|
5
|
+
//data
|
|
6
|
+
analysis Json
|
|
7
|
+
//audit fields
|
|
8
|
+
created_at DateTime @default(now())
|
|
9
|
+
updated_at DateTime @updatedAt
|
|
10
|
+
created_by String
|
|
11
|
+
updated_by String
|
|
12
|
+
is_active Boolean @default(true)
|
|
13
|
+
//relations
|
|
14
|
+
interview Interview @relation(fields: [interview_id], references: [id])
|
|
15
|
+
|
|
16
|
+
@@index([interview_id])
|
|
17
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
model Message {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
sender_id String
|
|
4
|
-
receiver_id String
|
|
5
|
-
message String
|
|
6
|
-
|
|
7
|
-
sender User @relation("Sent Messages", fields: [sender_id], references: [id])
|
|
8
|
-
receiver User @relation("Received Messages", fields: [receiver_id], references: [id])
|
|
9
|
-
|
|
10
|
-
created_at DateTime @default(now())
|
|
11
|
-
updated_at DateTime @updatedAt
|
|
12
|
-
created_by String
|
|
13
|
-
updated_by String
|
|
14
|
-
is_active Boolean @default(true)
|
|
15
|
-
}
|
|
1
|
+
model Message {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
sender_id String
|
|
4
|
+
receiver_id String
|
|
5
|
+
message String
|
|
6
|
+
|
|
7
|
+
sender User @relation("Sent Messages", fields: [sender_id], references: [id])
|
|
8
|
+
receiver User @relation("Received Messages", fields: [receiver_id], references: [id])
|
|
9
|
+
|
|
10
|
+
created_at DateTime @default(now())
|
|
11
|
+
updated_at DateTime @updatedAt
|
|
12
|
+
created_by String
|
|
13
|
+
updated_by String
|
|
14
|
+
is_active Boolean @default(true)
|
|
15
|
+
}
|
package/prisma/schema/migrations/20260415120000_remove_job_profile_current_phase/migration.sql
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
-- AlterTable
|
|
2
|
-
ALTER TABLE "JobProfile" DROP COLUMN IF EXISTS "current_phase";
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "JobProfile" DROP COLUMN IF EXISTS "current_phase";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
-- AlterEnum (re-run safe only if your PG version supports IF NOT EXISTS; otherwise apply once)
|
|
2
|
-
ALTER TYPE "IntegrationProvider" ADD VALUE 'ZOOM';
|
|
1
|
+
-- AlterEnum (re-run safe only if your PG version supports IF NOT EXISTS; otherwise apply once)
|
|
2
|
+
ALTER TYPE "IntegrationProvider" ADD VALUE 'ZOOM';
|