@hirelink/database-prisma 1.1.2 → 1.1.5
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
package/prisma/schema.prisma
CHANGED
@@ -8,145 +8,115 @@ datasource db {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
model User {
|
11
|
-
id
|
12
|
-
email
|
13
|
-
first_name
|
14
|
-
last_name
|
15
|
-
role
|
16
|
-
status
|
17
|
-
created_at
|
18
|
-
updated_at
|
19
|
-
work_experience
|
20
|
-
|
11
|
+
id String @id
|
12
|
+
email String @unique
|
13
|
+
first_name String?
|
14
|
+
last_name String?
|
15
|
+
role Role
|
16
|
+
status UserStatus @default(active)
|
17
|
+
created_at DateTime? @default(now())
|
18
|
+
updated_at DateTime? @updatedAt
|
19
|
+
work_experience Work_experience?
|
20
|
+
candidate_documents CandidateDocument[]
|
21
|
+
hirelink_ids HirelinkId[]
|
21
22
|
hr_users HrUser[]
|
23
|
+
logs Log[]
|
24
|
+
notifications Notification[]
|
22
25
|
onboarding_details OnboardingDetail[]
|
23
|
-
candidate_documents CandidateDocument[]
|
24
|
-
sessions Session[]
|
25
26
|
otp_requests OtpRequest[]
|
26
|
-
verification_requests VerificationRequest[]
|
27
27
|
password_reset_requests PasswordResetRequest[]
|
28
|
-
|
29
|
-
|
30
|
-
logs Log[]
|
31
|
-
}
|
32
|
-
|
33
|
-
enum Role {
|
34
|
-
admin
|
35
|
-
hr
|
36
|
-
candidate
|
37
|
-
}
|
38
|
-
|
39
|
-
enum Work_experience {
|
40
|
-
experience
|
41
|
-
fresher
|
42
|
-
}
|
43
|
-
|
44
|
-
enum UserStatus {
|
45
|
-
active
|
46
|
-
inactive
|
47
|
-
locked
|
28
|
+
sessions Session[]
|
29
|
+
verification_requests VerificationRequest[]
|
48
30
|
}
|
49
31
|
|
50
32
|
model Organization {
|
51
|
-
org_id
|
52
|
-
legal_name
|
53
|
-
display_name
|
54
|
-
gst_number
|
55
|
-
address_line_1
|
56
|
-
address_line_2
|
57
|
-
address_line_3
|
58
|
-
city
|
59
|
-
pincode
|
60
|
-
state
|
61
|
-
terms_accepted
|
62
|
-
created_at
|
63
|
-
updated_at
|
64
|
-
|
33
|
+
org_id String @id @default(uuid())
|
34
|
+
legal_name String
|
35
|
+
display_name String?
|
36
|
+
gst_number String? @unique
|
37
|
+
address_line_1 String?
|
38
|
+
address_line_2 String?
|
39
|
+
address_line_3 String?
|
40
|
+
city String?
|
41
|
+
pincode String?
|
42
|
+
state String?
|
43
|
+
terms_accepted Boolean @default(false)
|
44
|
+
created_at DateTime? @default(now())
|
45
|
+
updated_at DateTime? @updatedAt
|
46
|
+
documents Document[]
|
65
47
|
hr_users HrUser[]
|
66
48
|
onboarding_details OnboardingDetail[]
|
67
|
-
documents Document[]
|
68
49
|
policy_masters PolicyMaster[]
|
69
50
|
}
|
70
51
|
|
71
52
|
model HrUser {
|
72
|
-
hr_user_id
|
73
|
-
org_id
|
74
|
-
user_id
|
75
|
-
status
|
76
|
-
created_at
|
77
|
-
updated_at
|
78
|
-
|
53
|
+
hr_user_id String @id @default(uuid())
|
54
|
+
org_id String
|
55
|
+
user_id String
|
56
|
+
status HrUserStatus @default(initiated)
|
57
|
+
created_at DateTime? @default(now())
|
58
|
+
updated_at DateTime? @updatedAt
|
79
59
|
organization Organization @relation(fields: [org_id], references: [org_id])
|
80
60
|
user User @relation(fields: [user_id], references: [id])
|
81
61
|
}
|
82
62
|
|
83
|
-
enum HrUserStatus {
|
84
|
-
active
|
85
|
-
initiated
|
86
|
-
disabled
|
87
|
-
}
|
88
|
-
|
89
63
|
model OnboardingDetail {
|
90
|
-
onboarding_id String
|
64
|
+
onboarding_id String @id @default(uuid())
|
91
65
|
org_id String
|
92
66
|
admin_user_id String
|
93
67
|
hr_emails String?
|
94
68
|
default_list String?
|
95
69
|
documents Json?
|
96
|
-
created_at DateTime?
|
97
|
-
updated_at DateTime?
|
98
|
-
|
99
|
-
organization
|
100
|
-
admin_user User @relation(fields: [admin_user_id], references: [id])
|
70
|
+
created_at DateTime? @default(now())
|
71
|
+
updated_at DateTime? @updatedAt
|
72
|
+
admin_user User @relation(fields: [admin_user_id], references: [id])
|
73
|
+
organization Organization @relation(fields: [org_id], references: [org_id])
|
101
74
|
}
|
102
75
|
|
103
76
|
model Document {
|
104
|
-
doc_id
|
105
|
-
org_id
|
106
|
-
doc_name
|
107
|
-
mandatory
|
108
|
-
optional
|
109
|
-
custom
|
110
|
-
created_at
|
111
|
-
updated_at
|
112
|
-
|
77
|
+
doc_id String @id @default(uuid())
|
78
|
+
org_id String
|
79
|
+
doc_name String
|
80
|
+
mandatory Boolean @default(false)
|
81
|
+
optional Boolean @default(false)
|
82
|
+
custom Boolean @default(false)
|
83
|
+
created_at DateTime? @default(now())
|
84
|
+
updated_at DateTime? @updatedAt
|
113
85
|
organization Organization @relation(fields: [org_id], references: [org_id])
|
114
86
|
}
|
115
87
|
|
116
88
|
model PolicyMaster {
|
117
|
-
id String
|
89
|
+
id String @id
|
118
90
|
document_name String
|
119
91
|
default_option String
|
120
92
|
additional_option String
|
121
|
-
created_at DateTime?
|
122
|
-
updated_at DateTime?
|
93
|
+
created_at DateTime? @default(now())
|
94
|
+
updated_at DateTime? @updatedAt
|
123
95
|
org_id String
|
124
96
|
created_by String
|
125
|
-
active Boolean
|
126
|
-
|
127
|
-
organization Organization @relation(fields: [org_id], references: [org_id])
|
97
|
+
active Boolean @default(true)
|
98
|
+
organization Organization @relation(fields: [org_id], references: [org_id])
|
128
99
|
}
|
129
100
|
|
130
101
|
model CandidateDocument {
|
131
|
-
doc_id
|
132
|
-
doc_name
|
133
|
-
doc_type
|
134
|
-
status
|
135
|
-
uploaded_at
|
136
|
-
user_id
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
user
|
102
|
+
doc_id String @id
|
103
|
+
doc_name String
|
104
|
+
doc_type String
|
105
|
+
status String
|
106
|
+
uploaded_at String
|
107
|
+
user_id String
|
108
|
+
candidate_document_type CandidateDocumentType?
|
109
|
+
created_at DateTime? @default(now())
|
110
|
+
updated_at DateTime? @updatedAt
|
111
|
+
user User @relation(fields: [user_id], references: [id])
|
141
112
|
}
|
142
113
|
|
143
114
|
model Session {
|
144
115
|
id String @id @default(uuid())
|
145
116
|
user_id String
|
146
|
-
token String
|
117
|
+
token String
|
147
118
|
expires_at DateTime
|
148
|
-
|
149
|
-
user User @relation(fields: [user_id], references: [id])
|
119
|
+
user User @relation(fields: [user_id], references: [id])
|
150
120
|
}
|
151
121
|
|
152
122
|
model OtpRequest {
|
@@ -156,14 +126,7 @@ model OtpRequest {
|
|
156
126
|
status OtpStatus
|
157
127
|
created_at DateTime @default(now())
|
158
128
|
expires_at DateTime
|
159
|
-
|
160
|
-
user User @relation(fields: [user_id], references: [id])
|
161
|
-
}
|
162
|
-
|
163
|
-
enum OtpStatus {
|
164
|
-
Pending
|
165
|
-
Verified
|
166
|
-
Expired
|
129
|
+
user User @relation(fields: [user_id], references: [id])
|
167
130
|
}
|
168
131
|
|
169
132
|
model PasswordResetRequest {
|
@@ -173,14 +136,7 @@ model PasswordResetRequest {
|
|
173
136
|
status PasswordResetStatus
|
174
137
|
created_at DateTime @default(now())
|
175
138
|
expires_at DateTime
|
176
|
-
|
177
|
-
user User @relation(fields: [user_id], references: [id])
|
178
|
-
}
|
179
|
-
|
180
|
-
enum PasswordResetStatus {
|
181
|
-
Pending
|
182
|
-
Used
|
183
|
-
Expired
|
139
|
+
user User @relation(fields: [user_id], references: [id])
|
184
140
|
}
|
185
141
|
|
186
142
|
model VerificationRequest {
|
@@ -189,53 +145,91 @@ model VerificationRequest {
|
|
189
145
|
status VerificationStatus
|
190
146
|
requested_at DateTime
|
191
147
|
completed_at DateTime?
|
192
|
-
|
193
|
-
user User @relation(fields: [user_id], references: [id])
|
194
|
-
}
|
195
|
-
|
196
|
-
enum VerificationStatus {
|
197
|
-
Pending
|
198
|
-
InProgress
|
199
|
-
Verified
|
200
|
-
Rejected
|
148
|
+
user User @relation(fields: [user_id], references: [id])
|
201
149
|
}
|
202
150
|
|
203
151
|
model HirelinkId {
|
204
152
|
id String @id @default(uuid())
|
205
153
|
user_id String
|
206
|
-
hirelink_url String @unique
|
154
|
+
hirelink_url String @unique
|
207
155
|
reference_name String @db.VarChar(32)
|
208
156
|
status HirelinkStatus
|
209
157
|
created_at DateTime @default(now())
|
210
|
-
|
211
|
-
user User @relation(fields: [user_id], references: [id])
|
212
|
-
}
|
213
|
-
|
214
|
-
enum HirelinkStatus {
|
215
|
-
Active
|
216
|
-
Inactive
|
158
|
+
user User @relation(fields: [user_id], references: [id])
|
217
159
|
}
|
218
160
|
|
219
161
|
model Notification {
|
220
162
|
id String @id @default(uuid())
|
221
163
|
user_id String
|
222
|
-
message String
|
164
|
+
message String
|
223
165
|
status NotificationStatus
|
224
166
|
created_at DateTime @default(now())
|
225
|
-
|
226
|
-
user User @relation(fields: [user_id], references: [id])
|
227
|
-
}
|
228
|
-
|
229
|
-
enum NotificationStatus {
|
230
|
-
Unread
|
231
|
-
Read
|
167
|
+
user User @relation(fields: [user_id], references: [id])
|
232
168
|
}
|
233
169
|
|
234
170
|
model Log {
|
235
171
|
id String @id @default(uuid())
|
236
172
|
user_id String
|
237
|
-
action String
|
173
|
+
action String
|
238
174
|
timestamp DateTime @default(now())
|
175
|
+
user User @relation(fields: [user_id], references: [id])
|
176
|
+
}
|
177
|
+
|
178
|
+
enum Role {
|
179
|
+
admin
|
180
|
+
hr
|
181
|
+
candidate
|
182
|
+
}
|
183
|
+
|
184
|
+
enum Work_experience {
|
185
|
+
experience
|
186
|
+
fresher
|
187
|
+
}
|
188
|
+
|
189
|
+
enum UserStatus {
|
190
|
+
active
|
191
|
+
inactive
|
192
|
+
locked
|
193
|
+
}
|
194
|
+
|
195
|
+
enum HrUserStatus {
|
196
|
+
active
|
197
|
+
initiated
|
198
|
+
disabled
|
199
|
+
}
|
200
|
+
|
201
|
+
enum CandidateDocumentType {
|
202
|
+
identity
|
203
|
+
education
|
204
|
+
employment
|
205
|
+
payslips
|
206
|
+
}
|
207
|
+
|
208
|
+
enum OtpStatus {
|
209
|
+
Pending
|
210
|
+
Verified
|
211
|
+
Expired
|
212
|
+
}
|
213
|
+
|
214
|
+
enum PasswordResetStatus {
|
215
|
+
Pending
|
216
|
+
Used
|
217
|
+
Expired
|
218
|
+
}
|
219
|
+
|
220
|
+
enum VerificationStatus {
|
221
|
+
Pending
|
222
|
+
InProgress
|
223
|
+
Verified
|
224
|
+
Rejected
|
225
|
+
}
|
239
226
|
|
240
|
-
|
227
|
+
enum HirelinkStatus {
|
228
|
+
Active
|
229
|
+
Inactive
|
230
|
+
}
|
231
|
+
|
232
|
+
enum NotificationStatus {
|
233
|
+
Unread
|
234
|
+
Read
|
241
235
|
}
|