@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
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@adaptware/eagles-db",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "A Prisma client package for Treadspace database operations",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"registry": "https://registry.npmjs.org/"
|
|
9
|
-
},
|
|
10
|
-
"type": "module",
|
|
11
|
-
"prisma": {
|
|
12
|
-
"schema": "./prisma/schema/schema.prisma"
|
|
13
|
-
},
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js",
|
|
18
|
-
"default": "./dist/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./package.json": "./package.json"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsc",
|
|
24
|
-
"dev": "tsc --watch",
|
|
25
|
-
"generate": "prisma generate --schema prisma/schema",
|
|
26
|
-
"update": "yarn run generate && yarn run build"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"prisma",
|
|
30
|
-
"database",
|
|
31
|
-
"eagles",
|
|
32
|
-
"client"
|
|
33
|
-
],
|
|
34
|
-
"author": "",
|
|
35
|
-
"license": "MIT",
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@prisma/client": "6.19.3",
|
|
38
|
-
"prisma": "6.19.3",
|
|
39
|
-
"zod": "^4.1.5"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@types/node": "^20.10.5",
|
|
43
|
-
"typescript": "^5.3.3"
|
|
44
|
-
},
|
|
45
|
-
"bin": {
|
|
46
|
-
"treadspace-db": "./bin/db-cli.js"
|
|
47
|
-
},
|
|
48
|
-
"peerDependencies": {},
|
|
49
|
-
"files": [
|
|
50
|
-
"dist",
|
|
51
|
-
"prisma",
|
|
52
|
-
"bin",
|
|
53
|
-
"client"
|
|
54
|
-
],
|
|
55
|
-
"engines": {
|
|
56
|
-
"node": ">=18.0.0"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@adaptware/eagles-db",
|
|
3
|
+
"version": "0.4.24",
|
|
4
|
+
"description": "A Prisma client package for Treadspace database operations",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"prisma": {
|
|
12
|
+
"schema": "./prisma/schema/schema.prisma"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"dev": "tsc --watch",
|
|
25
|
+
"generate": "prisma generate --schema prisma/schema",
|
|
26
|
+
"update": "yarn run generate && yarn run build"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"prisma",
|
|
30
|
+
"database",
|
|
31
|
+
"eagles",
|
|
32
|
+
"client"
|
|
33
|
+
],
|
|
34
|
+
"author": "",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@prisma/client": "6.19.3",
|
|
38
|
+
"prisma": "6.19.3",
|
|
39
|
+
"zod": "^4.1.5"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.10.5",
|
|
43
|
+
"typescript": "^5.3.3"
|
|
44
|
+
},
|
|
45
|
+
"bin": {
|
|
46
|
+
"treadspace-db": "./bin/db-cli.js"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"prisma",
|
|
52
|
+
"bin",
|
|
53
|
+
"client"
|
|
54
|
+
],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
model CandidateQuestionResponse {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
//foreign keys
|
|
4
|
-
question_id String
|
|
5
|
-
candidate_id String
|
|
6
|
-
assessment_id String
|
|
7
|
-
//data
|
|
8
|
-
response String
|
|
9
|
-
score Float?
|
|
10
|
-
/// Audit fields
|
|
11
|
-
created_by String
|
|
12
|
-
updated_by String
|
|
13
|
-
created_at DateTime @default(now())
|
|
14
|
-
updated_at DateTime @updatedAt
|
|
15
|
-
is_active Boolean @default(true)
|
|
16
|
-
// Relations
|
|
17
|
-
question Question @relation(fields: [question_id], references: [id], onDelete: Cascade)
|
|
18
|
-
assessment Assessment @relation(fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
19
|
-
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
20
|
-
|
|
21
|
-
@@unique([assessment_id, question_id, candidate_id])
|
|
22
|
-
@@index([candidate_id])
|
|
23
|
-
@@index([assessment_id])
|
|
24
|
-
}
|
|
1
|
+
model CandidateQuestionResponse {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
4
|
+
question_id String
|
|
5
|
+
candidate_id String
|
|
6
|
+
assessment_id String
|
|
7
|
+
//data
|
|
8
|
+
response String
|
|
9
|
+
score Float?
|
|
10
|
+
/// Audit fields
|
|
11
|
+
created_by String
|
|
12
|
+
updated_by String
|
|
13
|
+
created_at DateTime @default(now())
|
|
14
|
+
updated_at DateTime @updatedAt
|
|
15
|
+
is_active Boolean @default(true)
|
|
16
|
+
// Relations
|
|
17
|
+
question Question @relation(fields: [question_id], references: [id], onDelete: Cascade)
|
|
18
|
+
assessment Assessment @relation(fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
19
|
+
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
20
|
+
|
|
21
|
+
@@unique([assessment_id, question_id, candidate_id])
|
|
22
|
+
@@index([candidate_id])
|
|
23
|
+
@@index([assessment_id])
|
|
24
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
model UserRole {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
role String
|
|
4
|
-
organisation_id String?
|
|
5
|
-
is_custom Boolean @default(false)
|
|
6
|
-
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
7
|
-
permission_id String? @unique
|
|
8
|
-
permission Permission? @relation(fields: [permission_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
9
|
-
users User[]
|
|
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
|
-
|
|
16
|
-
@@unique([role, organisation_id])
|
|
17
|
-
@@index([role, organisation_id])
|
|
18
|
-
@@index([organisation_id])
|
|
19
|
-
@@index([permission_id])
|
|
20
|
-
}
|
|
1
|
+
model UserRole {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
role String
|
|
4
|
+
organisation_id String?
|
|
5
|
+
is_custom Boolean @default(false)
|
|
6
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
7
|
+
permission_id String? @unique
|
|
8
|
+
permission Permission? @relation(fields: [permission_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
9
|
+
users User[]
|
|
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
|
+
|
|
16
|
+
@@unique([role, organisation_id])
|
|
17
|
+
@@index([role, organisation_id])
|
|
18
|
+
@@index([organisation_id])
|
|
19
|
+
@@index([permission_id])
|
|
20
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
enum ActionType {
|
|
2
|
-
TAKE_INTERVIEW
|
|
3
|
-
PROVIDE_FEEDBACK
|
|
4
|
-
SCHEDULE_INTERVIEW
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
enum ActionStatus {
|
|
8
|
-
PENDING
|
|
9
|
-
COMPLETED
|
|
10
|
-
CANCELLED
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
model Action {
|
|
14
|
-
id String @id @default(uuid())
|
|
15
|
-
assignee_id String
|
|
16
|
-
title String
|
|
17
|
-
action_type ActionType
|
|
18
|
-
action_id String // Generic foreign key that can link to any entity
|
|
19
|
-
due_date DateTime?
|
|
20
|
-
organisation_id String
|
|
21
|
-
status ActionStatus @default(PENDING)
|
|
22
|
-
// Relations
|
|
23
|
-
user User @relation(fields: [assignee_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
24
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
25
|
-
// Audit fields
|
|
26
|
-
created_at DateTime @default(now())
|
|
27
|
-
updated_at DateTime @updatedAt
|
|
28
|
-
created_by String
|
|
29
|
-
updated_by String
|
|
30
|
-
is_active Boolean @default(true)
|
|
31
|
-
|
|
32
|
-
@@index([assignee_id, action_type])
|
|
33
|
-
@@index([status])
|
|
34
|
-
@@index([due_date])
|
|
35
|
-
}
|
|
1
|
+
enum ActionType {
|
|
2
|
+
TAKE_INTERVIEW
|
|
3
|
+
PROVIDE_FEEDBACK
|
|
4
|
+
SCHEDULE_INTERVIEW
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
enum ActionStatus {
|
|
8
|
+
PENDING
|
|
9
|
+
COMPLETED
|
|
10
|
+
CANCELLED
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
model Action {
|
|
14
|
+
id String @id @default(uuid())
|
|
15
|
+
assignee_id String
|
|
16
|
+
title String
|
|
17
|
+
action_type ActionType
|
|
18
|
+
action_id String // Generic foreign key that can link to any entity
|
|
19
|
+
due_date DateTime?
|
|
20
|
+
organisation_id String
|
|
21
|
+
status ActionStatus @default(PENDING)
|
|
22
|
+
// Relations
|
|
23
|
+
user User @relation(fields: [assignee_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
24
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
25
|
+
// Audit fields
|
|
26
|
+
created_at DateTime @default(now())
|
|
27
|
+
updated_at DateTime @updatedAt
|
|
28
|
+
created_by String
|
|
29
|
+
updated_by String
|
|
30
|
+
is_active Boolean @default(true)
|
|
31
|
+
|
|
32
|
+
@@index([assignee_id, action_type])
|
|
33
|
+
@@index([status])
|
|
34
|
+
@@index([due_date])
|
|
35
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
enum ActivityActorType {
|
|
2
|
-
USER
|
|
3
|
-
AI
|
|
4
|
-
SYSTEM
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
model ActivityLog {
|
|
8
|
-
id String @id @default(uuid())
|
|
9
|
-
application_id String
|
|
10
|
-
actor_id String?
|
|
11
|
-
actor_type ActivityActorType @default(USER)
|
|
12
|
-
message String
|
|
13
|
-
timestamp DateTime @default(now())
|
|
14
|
-
metadata Json?
|
|
15
|
-
created_at DateTime @default(now())
|
|
16
|
-
is_active Boolean @default(true)
|
|
17
|
-
// Relations
|
|
18
|
-
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
19
|
-
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
20
|
-
|
|
21
|
-
@@index([application_id])
|
|
22
|
-
}
|
|
1
|
+
enum ActivityActorType {
|
|
2
|
+
USER
|
|
3
|
+
AI
|
|
4
|
+
SYSTEM
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
model ActivityLog {
|
|
8
|
+
id String @id @default(uuid())
|
|
9
|
+
application_id String
|
|
10
|
+
actor_id String?
|
|
11
|
+
actor_type ActivityActorType @default(USER)
|
|
12
|
+
message String
|
|
13
|
+
timestamp DateTime @default(now())
|
|
14
|
+
metadata Json?
|
|
15
|
+
created_at DateTime @default(now())
|
|
16
|
+
is_active Boolean @default(true)
|
|
17
|
+
// Relations
|
|
18
|
+
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
19
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
20
|
+
|
|
21
|
+
@@index([application_id])
|
|
22
|
+
}
|
|
@@ -1,57 +1,56 @@
|
|
|
1
|
-
// PENDING could be understood as unscreened
|
|
2
|
-
enum ApplicationStatus {
|
|
3
|
-
PENDING
|
|
4
|
-
IN_PROGRESS
|
|
5
|
-
SHORTLISTED
|
|
6
|
-
SELECTED
|
|
7
|
-
REJECTED
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
model Application {
|
|
11
|
-
id String @id @default(uuid())
|
|
12
|
-
candidate_id String
|
|
13
|
-
resume_id String
|
|
14
|
-
organisation_id String
|
|
15
|
-
job_description_id String
|
|
16
|
-
fit_check_score Float?
|
|
17
|
-
applied_at DateTime @default(now())
|
|
18
|
-
evaluation_plan_id String?
|
|
19
|
-
fit_check_id String? @unique
|
|
20
|
-
round_no Int @default(0)
|
|
21
|
-
is_jaf_completed Boolean @default(false)
|
|
22
|
-
//Screening fields
|
|
23
|
-
on_notice_period Boolean @default(false)
|
|
24
|
-
expected_joining_date DateTime?
|
|
25
|
-
current_ctc String?
|
|
26
|
-
expected_ctc String?
|
|
27
|
-
notice_period Int?
|
|
28
|
-
preferred_location String?
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@@
|
|
55
|
-
@@index([
|
|
56
|
-
|
|
57
|
-
}
|
|
1
|
+
// PENDING could be understood as unscreened
|
|
2
|
+
enum ApplicationStatus {
|
|
3
|
+
PENDING
|
|
4
|
+
IN_PROGRESS
|
|
5
|
+
SHORTLISTED
|
|
6
|
+
SELECTED
|
|
7
|
+
REJECTED
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
model Application {
|
|
11
|
+
id String @id @default(uuid())
|
|
12
|
+
candidate_id String
|
|
13
|
+
resume_id String
|
|
14
|
+
organisation_id String
|
|
15
|
+
job_description_id String
|
|
16
|
+
fit_check_score Float?
|
|
17
|
+
applied_at DateTime @default(now())
|
|
18
|
+
evaluation_plan_id String?
|
|
19
|
+
fit_check_id String? @unique
|
|
20
|
+
round_no Int @default(0)
|
|
21
|
+
is_jaf_completed Boolean @default(false)
|
|
22
|
+
//Screening fields
|
|
23
|
+
on_notice_period Boolean @default(false)
|
|
24
|
+
expected_joining_date DateTime?
|
|
25
|
+
current_ctc String?
|
|
26
|
+
expected_ctc String?
|
|
27
|
+
notice_period Int?
|
|
28
|
+
preferred_location String?
|
|
29
|
+
// Relations
|
|
30
|
+
fit_check_status FitCheckStatus?
|
|
31
|
+
status ApplicationStatus @default(PENDING)
|
|
32
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
33
|
+
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
34
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
35
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
36
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
37
|
+
fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
38
|
+
interviews Interview[]
|
|
39
|
+
assignments Assignment[]
|
|
40
|
+
ongoing_evaluations OngoingEvaluation[]
|
|
41
|
+
activity_logs ActivityLog[]
|
|
42
|
+
notes Notes[]
|
|
43
|
+
job_application_responses JobApplicationResponse[]
|
|
44
|
+
conversations Conversation[]
|
|
45
|
+
communication_messages CommunicationMessage[]
|
|
46
|
+
// Audit fields
|
|
47
|
+
created_at DateTime @default(now())
|
|
48
|
+
updated_at DateTime @updatedAt
|
|
49
|
+
created_by String
|
|
50
|
+
updated_by String
|
|
51
|
+
is_active Boolean @default(true)
|
|
52
|
+
|
|
53
|
+
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
54
|
+
@@index([candidate_id])
|
|
55
|
+
@@index([job_description_id])
|
|
56
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
model Approval {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
job_description_id String
|
|
4
|
-
user_id String
|
|
5
|
-
organisaton_id 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
|
-
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
12
|
-
user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
-
organisation Organisation @relation(fields: [organisaton_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
14
|
-
}
|
|
1
|
+
model Approval {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
job_description_id String
|
|
4
|
+
user_id String
|
|
5
|
+
organisaton_id 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
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
12
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
+
organisation Organisation @relation(fields: [organisaton_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
14
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
model Assessment {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
//foreign keys
|
|
4
|
-
organisation_id String?
|
|
5
|
-
assessment_library_id String
|
|
6
|
-
candidate_id String
|
|
7
|
-
reviewer_id String?
|
|
8
|
-
//data
|
|
9
|
-
score Float?
|
|
10
|
-
feedback Json?
|
|
11
|
-
// Scheduled Deadline Window
|
|
12
|
-
scheduled_start_time DateTime?
|
|
13
|
-
scheduled_end_time DateTime?
|
|
14
|
-
/// Actual Start and End Time
|
|
15
|
-
actual_start_time DateTime?
|
|
16
|
-
actual_end_time DateTime?
|
|
17
|
-
/// Attempt Expires At
|
|
18
|
-
attempt_expires_at DateTime?
|
|
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
|
-
assessment_library AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
27
|
-
candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
28
|
-
reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
29
|
-
questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
|
|
30
|
-
candidateResponse CandidateQuestionResponse[]
|
|
31
|
-
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
32
|
-
User User? @relation(fields: [userId], references: [id])
|
|
33
|
-
userId String?
|
|
34
|
-
ongoingEvaluation OngoingEvaluation?
|
|
35
|
-
|
|
36
|
-
@@unique([assessment_library_id, candidate_id])
|
|
37
|
-
@@index([assessment_library_id])
|
|
38
|
-
@@index([candidate_id])
|
|
39
|
-
}
|
|
1
|
+
model Assessment {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
//foreign keys
|
|
4
|
+
organisation_id String?
|
|
5
|
+
assessment_library_id String
|
|
6
|
+
candidate_id String
|
|
7
|
+
reviewer_id String?
|
|
8
|
+
//data
|
|
9
|
+
score Float?
|
|
10
|
+
feedback Json?
|
|
11
|
+
// Scheduled Deadline Window
|
|
12
|
+
scheduled_start_time DateTime?
|
|
13
|
+
scheduled_end_time DateTime?
|
|
14
|
+
/// Actual Start and End Time
|
|
15
|
+
actual_start_time DateTime?
|
|
16
|
+
actual_end_time DateTime?
|
|
17
|
+
/// Attempt Expires At
|
|
18
|
+
attempt_expires_at DateTime?
|
|
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
|
+
assessment_library AssessmentLibrary @relation(fields: [assessment_library_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
27
|
+
candidate User @relation("CandidateAssessments", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
28
|
+
reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
29
|
+
questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
|
|
30
|
+
candidateResponse CandidateQuestionResponse[]
|
|
31
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
32
|
+
User User? @relation(fields: [userId], references: [id])
|
|
33
|
+
userId String?
|
|
34
|
+
ongoingEvaluation OngoingEvaluation?
|
|
35
|
+
|
|
36
|
+
@@unique([assessment_library_id, candidate_id])
|
|
37
|
+
@@index([assessment_library_id])
|
|
38
|
+
@@index([candidate_id])
|
|
39
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/// Defines how an assessment is conducted.
|
|
2
|
-
|
|
3
|
-
model AssessmentLibrary {
|
|
4
|
-
id String @id @default(uuid())
|
|
5
|
-
title String
|
|
6
|
-
time_required Int
|
|
7
|
-
passing_score Float?
|
|
8
|
-
max_score Float?
|
|
9
|
-
organisation_id String
|
|
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
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
16
|
-
questions Question[] // One assessment → many questions
|
|
17
|
-
assessments Assessment[]
|
|
18
|
-
evaluation_Plans EvaluationPlan[]
|
|
19
|
-
|
|
20
|
-
@@index([organisation_id])
|
|
21
|
-
}
|
|
1
|
+
/// Defines how an assessment is conducted.
|
|
2
|
+
|
|
3
|
+
model AssessmentLibrary {
|
|
4
|
+
id String @id @default(uuid())
|
|
5
|
+
title String
|
|
6
|
+
time_required Int
|
|
7
|
+
passing_score Float?
|
|
8
|
+
max_score Float?
|
|
9
|
+
organisation_id String
|
|
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
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
16
|
+
questions Question[] // One assessment → many questions
|
|
17
|
+
assessments Assessment[]
|
|
18
|
+
evaluation_Plans EvaluationPlan[]
|
|
19
|
+
|
|
20
|
+
@@index([organisation_id])
|
|
21
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Join table linking Assessments and Questions in a many-to-many relationship.
|
|
3
|
-
* - Each row represents one link between a specific Assessment and a specific Question.
|
|
4
|
-
* - Composite ID ensures no duplicate pairings exist.
|
|
5
|
-
* - Cascade delete ensures join rows are removed when either side is deleted.
|
|
6
|
-
* - Enables sharing the same Question across multiple Assessments.
|
|
7
|
-
*/
|
|
8
|
-
model AssessmentQuestion {
|
|
9
|
-
assessment_id String
|
|
10
|
-
question_id String
|
|
11
|
-
assessment Assessment @relation("AssessmentToAssessmentQuestion", fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
12
|
-
question Question @relation("QuestionToAssessmentQuestion", fields: [question_id], references: [id], onDelete: Cascade)
|
|
13
|
-
created_at DateTime @default(now())
|
|
14
|
-
updated_at DateTime @updatedAt
|
|
15
|
-
|
|
16
|
-
@@id([assessment_id, question_id])
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Join table linking Assessments and Questions in a many-to-many relationship.
|
|
3
|
+
* - Each row represents one link between a specific Assessment and a specific Question.
|
|
4
|
+
* - Composite ID ensures no duplicate pairings exist.
|
|
5
|
+
* - Cascade delete ensures join rows are removed when either side is deleted.
|
|
6
|
+
* - Enables sharing the same Question across multiple Assessments.
|
|
7
|
+
*/
|
|
8
|
+
model AssessmentQuestion {
|
|
9
|
+
assessment_id String
|
|
10
|
+
question_id String
|
|
11
|
+
assessment Assessment @relation("AssessmentToAssessmentQuestion", fields: [assessment_id], references: [id], onDelete: Cascade)
|
|
12
|
+
question Question @relation("QuestionToAssessmentQuestion", fields: [question_id], references: [id], onDelete: Cascade)
|
|
13
|
+
created_at DateTime @default(now())
|
|
14
|
+
updated_at DateTime @updatedAt
|
|
15
|
+
|
|
16
|
+
@@id([assessment_id, question_id])
|
|
17
|
+
}
|