@adaptware/eagles-db 0.1.78 → 0.1.79

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,40 +7,41 @@ enum ApplicationStatus {
7
7
  }
8
8
 
9
9
  model Application {
10
- id String @id @default(uuid())
11
- candidate_id String
12
- resume_id String
13
- organisation_id String
14
- job_description_id String
15
- fit_check_score Float?
16
- applied_at DateTime @default(now())
17
- evaluation_plan_id String?
18
- fit_check_id String? @unique
19
- round_no Int @default(0)
10
+ id String @id @default(uuid())
11
+ candidate_id String
12
+ resume_id String
13
+ organisation_id String
14
+ job_description_id String
15
+ fit_check_score Float?
16
+ applied_at DateTime @default(now())
17
+ evaluation_plan_id String?
18
+ fit_check_id String? @unique
19
+ round_no Int @default(0)
20
20
  //Screening fields
21
- on_notice_period Boolean @default(false)
21
+ on_notice_period Boolean @default(false)
22
22
  expected_joining_date DateTime?
23
23
  current_ctc String?
24
- notes Json?
24
+ expected_ctc String?
25
25
  // Relations
26
- fit_check_status FitCheckStatus?
27
- status ApplicationStatus @default(PENDING)
28
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
29
- candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
30
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
31
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
32
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
33
- fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
34
- interviews Interview[]
35
- assignments Assignment[]
36
- ongoing_evaluations OngoingEvaluation[]
37
- activity_logs ActivityLog[]
26
+ fit_check_status FitCheckStatus?
27
+ status ApplicationStatus @default(PENDING)
28
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
29
+ candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
30
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
31
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
32
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
33
+ fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
34
+ interviews Interview[]
35
+ assignments Assignment[]
36
+ ongoing_evaluations OngoingEvaluation[]
37
+ activity_logs ActivityLog[]
38
+ notes Notes[]
38
39
  // Audit fields
39
- created_at DateTime @default(now())
40
- updated_at DateTime @updatedAt
41
- created_by String
42
- updated_by String
43
- is_active Boolean @default(true)
40
+ created_at DateTime @default(now())
41
+ updated_at DateTime @updatedAt
42
+ created_by String
43
+ updated_by String
44
+ is_active Boolean @default(true)
44
45
 
45
46
  @@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
46
47
  @@index([candidate_id])
@@ -0,0 +1,19 @@
1
+ model Notes {
2
+ id String @id @default(uuid())
3
+ application_id String
4
+ user_id String
5
+ note String
6
+ pinned Boolean @default(false)
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
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
15
+ user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
16
+
17
+ @@index([application_id, created_at])
18
+ @@index([user_id, created_at])
19
+ }
@@ -54,6 +54,7 @@ model User {
54
54
  assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
55
55
  user_auth_modules AuthModule[] @relation("UserAuthModule")
56
56
  refresh_token_auth RefreshToken[] @relation("TokenRefresh")
57
+ notes Notes[]
57
58
 
58
59
  name String?
59
60
  phone String?