@adaptware/eagles-db 0.1.38 → 0.1.39

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-5ac043c7414ca642bbc8e7b02ef3040a50e4dc0f37a86e5bea0ddb8963dd11da",
2
+ "name": "prisma-client-3d6f737e76c812c2732fa6b2b1ce3c4668c542f50849008927bd91bbb546fede",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -84,20 +84,22 @@ enum ActivityActorType {
84
84
  }
85
85
 
86
86
  model ActivityLog {
87
- id String @id @default(uuid())
88
- candidate_id String
89
- actor_id String?
90
- actor_type ActivityActorType @default(USER)
91
- message String
92
- timestamp DateTime @default(now())
93
- metadata Json?
94
- created_at DateTime @default(now())
95
- is_active Boolean @default(true)
87
+ id String @id @default(uuid())
88
+ application_id String
89
+ actor_id String?
90
+ actor_type ActivityActorType @default(USER)
91
+ message String
92
+ timestamp DateTime @default(now())
93
+ metadata Json?
94
+ created_at DateTime @default(now())
95
+ is_active Boolean @default(true)
96
96
  // Relations
97
- candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
98
- actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
97
+ actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
98
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
99
+ user User? @relation(fields: [userId], references: [id])
100
+ userId String?
99
101
 
100
- @@index([candidate_id])
102
+ @@index([application_id])
101
103
  }
102
104
 
103
105
  // PENDING could be understood as unscreened
@@ -130,6 +132,7 @@ model Application {
130
132
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
131
133
  interviews Interview[]
132
134
  ongoing_evaluations OngoingEvaluation[]
135
+ activity_logs ActivityLog[]
133
136
  // Audit fields
134
137
  created_at DateTime @default(now())
135
138
  updated_at DateTime @updatedAt
@@ -1182,7 +1185,6 @@ model User {
1182
1185
  candidateResponses CandidateQuestionResponse[]
1183
1186
  questions Question[]
1184
1187
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
1185
- candidate_activity_logs ActivityLog[] @relation("CandidateActivityLogs")
1186
1188
  actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
1187
1189
  actions Action[]
1188
1190
  calendly Calendly?
@@ -1205,6 +1207,7 @@ model User {
1205
1207
  ethnicity String?
1206
1208
  veteran_status String?
1207
1209
  disability_status String?
1210
+ activityLogs ActivityLog[]
1208
1211
 
1209
1212
  @@index([role_id])
1210
1213
  @@index([permission_id])
package/client/wasm.js CHANGED
@@ -165,14 +165,15 @@ exports.Prisma.ActionScalarFieldEnum = {
165
165
 
166
166
  exports.Prisma.ActivityLogScalarFieldEnum = {
167
167
  id: 'id',
168
- candidate_id: 'candidate_id',
168
+ application_id: 'application_id',
169
169
  actor_id: 'actor_id',
170
170
  actor_type: 'actor_type',
171
171
  message: 'message',
172
172
  timestamp: 'timestamp',
173
173
  metadata: 'metadata',
174
174
  created_at: 'created_at',
175
- is_active: 'is_active'
175
+ is_active: 'is_active',
176
+ userId: 'userId'
176
177
  };
177
178
 
178
179
  exports.Prisma.ApplicationScalarFieldEnum = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,18 +5,20 @@ enum ActivityActorType {
5
5
  }
6
6
 
7
7
  model ActivityLog {
8
- id String @id @default(uuid())
9
- candidate_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)
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
17
  // Relations
18
- candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
19
- actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
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
+ user User? @relation(fields: [userId], references: [id])
21
+ userId String?
20
22
 
21
- @@index([candidate_id])
23
+ @@index([application_id])
22
24
  }
@@ -28,6 +28,7 @@ model Application {
28
28
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
29
  interviews Interview[]
30
30
  ongoing_evaluations OngoingEvaluation[]
31
+ activity_logs ActivityLog[]
31
32
  // Audit fields
32
33
  created_at DateTime @default(now())
33
34
  updated_at DateTime @updatedAt
@@ -43,29 +43,29 @@ model User {
43
43
  candidateResponses CandidateQuestionResponse[]
44
44
  questions Question[]
45
45
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
46
- candidate_activity_logs ActivityLog[] @relation("CandidateActivityLogs")
47
46
  actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
48
47
  actions Action[]
49
48
  calendly Calendly?
50
49
  google Google?
51
50
  fitChecks FitCheck[]
52
51
 
53
- name String?
54
- phone String?
55
- description String?
56
- date_of_birth DateTime?
57
- designation String?
58
- location String?
59
- salary String?
60
- work_experience Json?
61
- education Json?
62
- skills Json?
63
- notice_period String?
52
+ name String?
53
+ phone String?
54
+ description String?
55
+ date_of_birth DateTime?
56
+ designation String?
57
+ location String?
58
+ salary String?
59
+ work_experience Json?
60
+ education Json?
61
+ skills Json?
62
+ notice_period String?
64
63
  preferred_work_mode String?
65
- gender String?
66
- ethnicity String?
67
- veteran_status String?
68
- disability_status String?
64
+ gender String?
65
+ ethnicity String?
66
+ veteran_status String?
67
+ disability_status String?
68
+ activityLogs ActivityLog[]
69
69
 
70
70
  @@index([role_id])
71
71
  @@index([permission_id])