@dynamatix/gb-schemas 2.0.4 → 2.0.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/entities/shared/apprivo-sync-journey.entity.ts +9 -5
- package/entities/shared/apprivo-sync-journey.model.ts +13 -0
- package/package.json +1 -1
- package/prisma/migrations/20250501104920_milstone_update/migration.sql +30 -0
- package/prisma/schema.prisma +1150 -1144
- package/prisma/shared/apprivo-sync-journey.prisma +15 -8
- package/prisma/shared/job-run.prisma +3 -0
- package/prisma/shared/lookup.prisma +1 -0
package/prisma/schema.prisma
CHANGED
|
@@ -10,36 +10,40 @@ datasource db {
|
|
|
10
10
|
url = env("DATABASE_URL")
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
13
|
// From prisma/shared/alert.prisma
|
|
17
14
|
model Alert {
|
|
18
|
-
id
|
|
19
|
-
title
|
|
20
|
-
message
|
|
21
|
-
type
|
|
22
|
-
isRead
|
|
23
|
-
userId
|
|
24
|
-
createdAt
|
|
25
|
-
updatedAt
|
|
15
|
+
id String @id @default(uuid())
|
|
16
|
+
title String
|
|
17
|
+
message String
|
|
18
|
+
type String
|
|
19
|
+
isRead Boolean @default(false) @map("is_read")
|
|
20
|
+
userId String @map("user_id")
|
|
21
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
22
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
26
23
|
|
|
27
24
|
// Relations
|
|
28
|
-
user
|
|
25
|
+
user User @relation("UserAlerts", fields: [userId], references: [id])
|
|
29
26
|
|
|
30
27
|
@@map("alerts")
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
// From prisma/shared/apprivo-sync-journey.prisma
|
|
34
31
|
model ApprivoSyncJourney {
|
|
35
|
-
id
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
id String @id @default(uuid())
|
|
33
|
+
applicationId String @map("application_id")
|
|
34
|
+
milestoneLid String? @map("milestone_lid")
|
|
35
|
+
mileStoneStatus String @map("milestone_status")
|
|
36
|
+
error String?
|
|
37
|
+
isFirstPull String @map("is_first_pull")
|
|
38
|
+
jobRunId String? @map("job_run_id")
|
|
39
|
+
startTime DateTime? @map("start_time")
|
|
40
|
+
endTime DateTime? @map("end_time")
|
|
41
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
42
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
43
|
+
|
|
44
|
+
// Relations
|
|
45
|
+
milestone Lookup? @relation("ApprivoSyncJourney", fields: [milestoneLid], references: [id])
|
|
46
|
+
jobRun JobRun? @relation("Milestones", fields: [jobRunId], references: [id])
|
|
43
47
|
|
|
44
48
|
@@map("apprivo_sync_journeys")
|
|
45
49
|
}
|
|
@@ -69,26 +73,29 @@ model DocumentType {
|
|
|
69
73
|
|
|
70
74
|
// From prisma/shared/job-run.prisma
|
|
71
75
|
model JobRun {
|
|
72
|
-
id String
|
|
73
|
-
jobName String
|
|
76
|
+
id String @id @default(uuid())
|
|
77
|
+
jobName String @map("job_name")
|
|
74
78
|
status String
|
|
75
|
-
startedAt DateTime
|
|
79
|
+
startedAt DateTime @map("started_at")
|
|
76
80
|
completedAt DateTime? @map("completed_at")
|
|
77
|
-
createdAt DateTime
|
|
78
|
-
updatedAt DateTime
|
|
81
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
82
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
83
|
+
|
|
84
|
+
// Relations
|
|
85
|
+
apprivoSyncJourneys ApprivoSyncJourney[] @relation("Milestones")
|
|
79
86
|
|
|
80
87
|
@@map("job_runs")
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
// From prisma/shared/job-setting.prisma
|
|
84
91
|
model JobSetting {
|
|
85
|
-
id
|
|
86
|
-
name
|
|
87
|
-
isActive
|
|
88
|
-
frequency
|
|
89
|
-
jobParams
|
|
90
|
-
createdAt
|
|
91
|
-
updatedAt
|
|
92
|
+
id String @id @default(uuid())
|
|
93
|
+
name String @map("name")
|
|
94
|
+
isActive Boolean @default(true) @map("is_active")
|
|
95
|
+
frequency String @default("2 hours") @map("frequency")
|
|
96
|
+
jobParams Json @default("{}") @map("job_params")
|
|
97
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
98
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
92
99
|
|
|
93
100
|
@@map("job_settings")
|
|
94
101
|
}
|
|
@@ -102,7 +109,7 @@ model LookupGroup {
|
|
|
102
109
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
103
110
|
|
|
104
111
|
// Relations
|
|
105
|
-
lookups
|
|
112
|
+
lookups Lookup[] @relation("LookupToGroup")
|
|
106
113
|
|
|
107
114
|
@@map("lookup_groups")
|
|
108
115
|
}
|
|
@@ -119,62 +126,61 @@ model Lookup {
|
|
|
119
126
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
120
127
|
|
|
121
128
|
// Relations
|
|
122
|
-
group
|
|
129
|
+
group LookupGroup @relation("LookupToGroup", fields: [groupId], references: [id])
|
|
123
130
|
|
|
124
131
|
// Application Relations
|
|
125
132
|
applicationType_applications Application[] @relation("ApplicationType")
|
|
126
|
-
lendingType_applications
|
|
127
|
-
purchaseType_applications
|
|
128
|
-
status_applications
|
|
129
|
-
repaymentType_applications
|
|
133
|
+
lendingType_applications Application[] @relation("LendingType")
|
|
134
|
+
purchaseType_applications Application[] @relation("PurchaseType")
|
|
135
|
+
status_applications Application[] @relation("Status")
|
|
136
|
+
repaymentType_applications Application[] @relation("RepaymentType")
|
|
130
137
|
|
|
131
138
|
// ApplicationDocument Relations
|
|
132
139
|
documentType_documents ApplicationDocument[] @relation("DocumentType")
|
|
133
140
|
|
|
134
141
|
// ApplicationMortgage Relations
|
|
135
|
-
repaymentType_mortgages
|
|
136
|
-
exitStrategy_mortgages
|
|
137
|
-
sourceOfFunds_mortgages
|
|
138
|
-
saleMade_mortgages
|
|
139
|
-
leaseType_mortgages
|
|
142
|
+
repaymentType_mortgages ApplicationMortgage[] @relation("RepaymentType")
|
|
143
|
+
exitStrategy_mortgages ApplicationMortgage[] @relation("ExitStrategy")
|
|
144
|
+
sourceOfFunds_mortgages ApplicationMortgage[] @relation("SourceOfFunds")
|
|
145
|
+
saleMade_mortgages ApplicationMortgage[] @relation("SaleMade")
|
|
146
|
+
leaseType_mortgages ApplicationMortgage[] @relation("LeaseType")
|
|
140
147
|
depositComeFrom_mortgages ApplicationMortgage[] @relation("DepositComeFrom")
|
|
141
148
|
proposedTenants_mortgages ApplicationMortgage[] @relation("ProposedTenants")
|
|
142
149
|
|
|
143
150
|
// ApplicationNote Relations
|
|
144
|
-
noteType_notes
|
|
151
|
+
noteType_notes ApplicationNote[] @relation("NoteType")
|
|
145
152
|
noteSubType_notes ApplicationNote[] @relation("NoteSubType")
|
|
146
153
|
|
|
147
154
|
// ApplicationProduct Relations
|
|
148
|
-
lendingType_products
|
|
149
|
-
repaymentType_products
|
|
150
|
-
financeRecommended_products
|
|
151
|
-
procFeeRate_products
|
|
152
|
-
clubNetworkName_products
|
|
155
|
+
lendingType_products ApplicationProduct[] @relation("LendingType")
|
|
156
|
+
repaymentType_products ApplicationProduct[] @relation("RepaymentType")
|
|
157
|
+
financeRecommended_products ApplicationProduct[] @relation("FinanceRecommended")
|
|
158
|
+
procFeeRate_products ApplicationProduct[] @relation("ProcFeeRate")
|
|
159
|
+
clubNetworkName_products ApplicationProduct[] @relation("ClubNetworkName")
|
|
153
160
|
productFeePaymentType_products ApplicationProduct[] @relation("ProductFeePaymentType")
|
|
154
161
|
|
|
155
162
|
// ApplicationRationale Relations
|
|
156
163
|
affordabilityStatus_rationales ApplicationRationale[] @relation("AffordabilityStatus")
|
|
157
|
-
applicantsStatus_rationales
|
|
164
|
+
applicantsStatus_rationales ApplicationRationale[] @relation("ApplicantsStatus")
|
|
158
165
|
creditConductStatus_rationales ApplicationRationale[] @relation("CreditConductStatus")
|
|
159
|
-
fraudCheckStatus_rationales
|
|
160
|
-
incomeSourceStatus_rationales
|
|
161
|
-
loanStatus_rationales
|
|
162
|
-
securityStatus_rationales
|
|
163
|
-
propertyStatus_rationales
|
|
166
|
+
fraudCheckStatus_rationales ApplicationRationale[] @relation("FraudCheckStatus")
|
|
167
|
+
incomeSourceStatus_rationales ApplicationRationale[] @relation("IncomeSourceStatus")
|
|
168
|
+
loanStatus_rationales ApplicationRationale[] @relation("LoanStatus")
|
|
169
|
+
securityStatus_rationales ApplicationRationale[] @relation("SecurityStatus")
|
|
170
|
+
propertyStatus_rationales ApplicationRationale[] @relation("PropertyStatus")
|
|
164
171
|
|
|
165
172
|
// Company Relations
|
|
166
|
-
businessType_companies
|
|
173
|
+
businessType_companies Company[] @relation("BusinessType")
|
|
167
174
|
taxJurisdiction_companies Company[] @relation("TaxJurisdiction")
|
|
168
|
-
addressCountry_companies
|
|
175
|
+
addressCountry_companies Company[] @relation("AddressCountry")
|
|
169
176
|
applicationType_companies Company[] @relation("ApplicationType")
|
|
170
177
|
|
|
171
178
|
// ResidenceCommitment Relations
|
|
172
|
-
financeTypeHpp_residenceCommitments
|
|
179
|
+
financeTypeHpp_residenceCommitments ResidenceCommitment[] @relation("FinanceTypeHpp")
|
|
173
180
|
hppRepaymentType_residenceCommitments ResidenceCommitment[] @relation("HppRepaymentType")
|
|
174
|
-
mortgageType_residenceCommitments
|
|
175
|
-
financeHomeType_residenceCommitments
|
|
176
|
-
chargeType_residenceCommitments
|
|
177
|
-
|
|
181
|
+
mortgageType_residenceCommitments ResidenceCommitment[] @relation("MortgageType")
|
|
182
|
+
financeHomeType_residenceCommitments ResidenceCommitment[] @relation("FinanceHomeType")
|
|
183
|
+
chargeType_residenceCommitments ResidenceCommitment[] @relation("ChargeType")
|
|
178
184
|
|
|
179
185
|
// ApplicantShareholding Relations
|
|
180
186
|
directorShareholder_shareholdings ApplicantShareholding[] @relation("DirectorShareholder")
|
|
@@ -187,14 +193,14 @@ model Lookup {
|
|
|
187
193
|
|
|
188
194
|
// Security Relations
|
|
189
195
|
propertyAddressCountry_securities Security[] @relation("PropertyAddressCountry")
|
|
190
|
-
propertyTenure_securities
|
|
191
|
-
propertyType_securities
|
|
196
|
+
propertyTenure_securities Security[] @relation("PropertyTenure")
|
|
197
|
+
propertyType_securities Security[] @relation("PropertyType")
|
|
192
198
|
|
|
193
199
|
// MortgageCommitment Relations
|
|
194
|
-
repaymentType_mortgageCommitments
|
|
195
|
-
mortgageType_mortgageCommitments
|
|
200
|
+
repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
|
|
201
|
+
mortgageType_mortgageCommitments MortgageCommitment[] @relation("MortgageType")
|
|
196
202
|
commitmentType_mortgageCommitments MortgageCommitment[] @relation("CommitmentType")
|
|
197
|
-
|
|
203
|
+
|
|
198
204
|
// OtherIncome Relations
|
|
199
205
|
payFrequency1_otherIncomes ApplicantOtherIncome[] @relation("PayFrequency1")
|
|
200
206
|
payFrequency2_otherIncomes ApplicantOtherIncome[] @relation("PayFrequency2")
|
|
@@ -202,50 +208,51 @@ model Lookup {
|
|
|
202
208
|
payFrequency4_otherIncomes ApplicantOtherIncome[] @relation("PayFrequency4")
|
|
203
209
|
|
|
204
210
|
// Income Relations
|
|
205
|
-
accountantsCountry_incomes
|
|
206
|
-
businessCountry_incomes
|
|
207
|
-
businessType_incomes
|
|
211
|
+
accountantsCountry_incomes ApplicantIncome[] @relation("AccountantsCountry")
|
|
212
|
+
businessCountry_incomes ApplicantIncome[] @relation("BusinessCountry")
|
|
213
|
+
businessType_incomes ApplicantIncome[] @relation("BusinessType")
|
|
208
214
|
charteredCertifiedOrOther_incomes ApplicantIncome[] @relation("CharteredCertifiedOrOther")
|
|
209
|
-
registeredCountry_incomes
|
|
215
|
+
registeredCountry_incomes ApplicantIncome[] @relation("RegisteredCountry")
|
|
210
216
|
|
|
211
217
|
// LoanCommitment Relations
|
|
212
218
|
commitmentType_loanCommitments LoanCommitment[] @relation("CommitmentType")
|
|
213
|
-
loanType_loanCommitments
|
|
219
|
+
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
214
220
|
|
|
215
221
|
// Applicant Relations
|
|
216
|
-
addressCountry_applicants
|
|
222
|
+
addressCountry_applicants Applicant[] @relation("AddressCountry")
|
|
217
223
|
correspondenceAddressCountry_applicants Applicant[] @relation("CorrespondenceAddressCountry")
|
|
218
|
-
countryOfResidence_applicants
|
|
219
|
-
class_applicants
|
|
220
|
-
linkedJurisdictionCountry_applicants
|
|
221
|
-
maritalStatus_applicants
|
|
222
|
-
nationality_applicants
|
|
223
|
-
previous1AddressCountry_applicants
|
|
224
|
-
previous2AddressCountry_applicants
|
|
225
|
-
residentialStatus_applicants
|
|
226
|
-
taxJurisdiction_applicants
|
|
227
|
-
taxPayer_applicants
|
|
228
|
-
ukPassportProfession_applicants
|
|
229
|
-
vulnerabilityTypes_applicants
|
|
224
|
+
countryOfResidence_applicants Applicant[] @relation("CountryOfResidence")
|
|
225
|
+
class_applicants Applicant[] @relation("Class")
|
|
226
|
+
linkedJurisdictionCountry_applicants Applicant[] @relation("LinkedJurisdictionCountry")
|
|
227
|
+
maritalStatus_applicants Applicant[] @relation("MaritalStatus")
|
|
228
|
+
nationality_applicants Applicant[] @relation("Nationality")
|
|
229
|
+
previous1AddressCountry_applicants Applicant[] @relation("Previous1AddressCountry")
|
|
230
|
+
previous2AddressCountry_applicants Applicant[] @relation("Previous2AddressCountry")
|
|
231
|
+
residentialStatus_applicants Applicant[] @relation("ResidentialStatus")
|
|
232
|
+
taxJurisdiction_applicants Applicant[] @relation("TaxJurisdiction")
|
|
233
|
+
taxPayer_applicants Applicant[] @relation("TaxPayer")
|
|
234
|
+
ukPassportProfession_applicants Applicant[] @relation("UkPassportProfession")
|
|
235
|
+
vulnerabilityTypes_applicants Applicant[] @relation("VulnerabilityTypes")
|
|
230
236
|
|
|
231
237
|
// Employment Relations
|
|
232
|
-
addressCountry_employments
|
|
233
|
-
industry_employments
|
|
234
|
-
jobTitle_employments
|
|
238
|
+
addressCountry_employments ApplicantEmployment[] @relation("AddressCountry")
|
|
239
|
+
industry_employments ApplicantEmployment[] @relation("Industry")
|
|
240
|
+
jobTitle_employments ApplicantEmployment[] @relation("JobTitle")
|
|
235
241
|
acceptableIncomeTypes_employments ApplicantEmployment[] @relation("AcceptableIncomeTypes")
|
|
236
242
|
|
|
237
243
|
// CreditCardCommitment Relations
|
|
238
244
|
commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
239
|
-
repaymentType_creditCardCommitments
|
|
240
|
-
|
|
241
|
-
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
242
|
-
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|
|
243
|
-
applicantEmploymentIncome ApplicantEmploymentIncome[] @relation("ApplicantEmploymentIncomeType")
|
|
244
|
-
applicantExpenditure ApplicantExpenditure[] @relation("ExpenditureType")
|
|
245
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
245
246
|
|
|
247
|
+
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
248
|
+
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|
|
249
|
+
applicantEmploymentIncome ApplicantEmploymentIncome[] @relation("ApplicantEmploymentIncomeType")
|
|
250
|
+
applicantExpenditure ApplicantExpenditure[] @relation("ExpenditureType")
|
|
251
|
+
|
|
252
|
+
apprivoSyncJourneys ApprivoSyncJourney[] @relation("ApprivoSyncJourney")
|
|
246
253
|
|
|
247
|
-
@@map("lookups")
|
|
248
254
|
@@unique([groupId, value])
|
|
255
|
+
@@map("lookups")
|
|
249
256
|
}
|
|
250
257
|
|
|
251
258
|
// From prisma/shared/system-parameter.prisma
|
|
@@ -260,8 +267,8 @@ model SystemParameter {
|
|
|
260
267
|
updatedById String? @map("updated_by_id")
|
|
261
268
|
|
|
262
269
|
// Relations
|
|
263
|
-
createdBy
|
|
264
|
-
updatedBy
|
|
270
|
+
createdBy User? @relation("CreatedByUser", fields: [createdById], references: [id])
|
|
271
|
+
updatedBy User? @relation("UpdatedByUser", fields: [updatedById], references: [id])
|
|
265
272
|
|
|
266
273
|
@@map("system_parameters")
|
|
267
274
|
}
|
|
@@ -281,15 +288,15 @@ model AuthLog {
|
|
|
281
288
|
|
|
282
289
|
// From prisma/users/permission.prisma
|
|
283
290
|
model Permission {
|
|
284
|
-
id
|
|
285
|
-
name
|
|
286
|
-
controllerName String
|
|
287
|
-
methodName
|
|
288
|
-
createdAt
|
|
289
|
-
updatedAt
|
|
291
|
+
id String @id @default(uuid())
|
|
292
|
+
name String
|
|
293
|
+
controllerName String @map("controller_name")
|
|
294
|
+
methodName String @map("method_name")
|
|
295
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
296
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
290
297
|
|
|
291
298
|
// Relations
|
|
292
|
-
roles
|
|
299
|
+
roles Role[]
|
|
293
300
|
|
|
294
301
|
@@map("permissions")
|
|
295
302
|
}
|
|
@@ -304,8 +311,8 @@ model RoleGroup {
|
|
|
304
311
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
305
312
|
|
|
306
313
|
// Relations
|
|
307
|
-
roles
|
|
308
|
-
users
|
|
314
|
+
roles Role[] @relation("RoleToRoleGroup")
|
|
315
|
+
users User[] @relation("UserToRoleGroup")
|
|
309
316
|
|
|
310
317
|
@@map("role_groups")
|
|
311
318
|
}
|
|
@@ -321,39 +328,39 @@ model Role {
|
|
|
321
328
|
|
|
322
329
|
// Relations
|
|
323
330
|
permissions Permission[]
|
|
324
|
-
roleGroups RoleGroup[]
|
|
331
|
+
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
325
332
|
|
|
326
333
|
@@map("roles")
|
|
327
334
|
}
|
|
328
335
|
|
|
329
336
|
// From prisma/users/user.prisma
|
|
330
337
|
model User {
|
|
331
|
-
id
|
|
332
|
-
accountId
|
|
333
|
-
email
|
|
334
|
-
fullName
|
|
335
|
-
password
|
|
336
|
-
organisationId
|
|
337
|
-
status
|
|
338
|
-
modifiedOn
|
|
339
|
-
modifiedById
|
|
340
|
-
createdOnInApprivo
|
|
341
|
-
createdById
|
|
342
|
-
deletedOn
|
|
343
|
-
deletedById
|
|
344
|
-
token
|
|
345
|
-
createdAt
|
|
346
|
-
updatedAt
|
|
338
|
+
id String @id @default(uuid())
|
|
339
|
+
accountId String @unique @map("account_id")
|
|
340
|
+
email String @unique
|
|
341
|
+
fullName String @map("full_name")
|
|
342
|
+
password String
|
|
343
|
+
organisationId String? @map("organisation_id")
|
|
344
|
+
status String
|
|
345
|
+
modifiedOn DateTime? @map("modified_on")
|
|
346
|
+
modifiedById String? @map("modified_by_id")
|
|
347
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
348
|
+
createdById String? @map("created_by_id")
|
|
349
|
+
deletedOn DateTime? @map("deleted_on")
|
|
350
|
+
deletedById String? @map("deleted_by_id")
|
|
351
|
+
token String?
|
|
352
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
353
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
347
354
|
|
|
348
355
|
// Relations
|
|
349
|
-
groups
|
|
350
|
-
claims
|
|
356
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
357
|
+
claims Claim[]
|
|
351
358
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
352
359
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
353
|
-
createdNotes
|
|
354
|
-
assignedNotes
|
|
355
|
-
alerts
|
|
356
|
-
underwriters
|
|
360
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
361
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
362
|
+
alerts Alert[] @relation("UserAlerts")
|
|
363
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
357
364
|
|
|
358
365
|
@@map("users")
|
|
359
366
|
}
|
|
@@ -365,29 +372,29 @@ model Claim {
|
|
|
365
372
|
userId String @map("user_id")
|
|
366
373
|
createdAt DateTime @default(now()) @map("created_at")
|
|
367
374
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
368
|
-
|
|
375
|
+
|
|
369
376
|
// Relations
|
|
370
|
-
user
|
|
377
|
+
user User @relation(fields: [userId], references: [id])
|
|
371
378
|
|
|
372
379
|
@@map("claims")
|
|
373
380
|
}
|
|
374
381
|
|
|
375
382
|
// From prisma/product-catalogues/product-catalogue.prisma
|
|
376
383
|
model ProductCatalogue {
|
|
377
|
-
id
|
|
384
|
+
id String @id @default(uuid())
|
|
378
385
|
productCatalogueId String @map("product_catalogue_id")
|
|
379
|
-
name
|
|
380
|
-
description
|
|
381
|
-
applyFrom
|
|
382
|
-
applyUntil
|
|
383
|
-
submitUntil
|
|
384
|
-
status
|
|
385
|
-
lockedForEdit
|
|
386
|
-
baseRateName
|
|
387
|
-
baseRate
|
|
388
|
-
mapperName
|
|
389
|
-
createdAt
|
|
390
|
-
updatedAt
|
|
386
|
+
name String @map("name")
|
|
387
|
+
description String? @map("description")
|
|
388
|
+
applyFrom String @map("apply_from")
|
|
389
|
+
applyUntil String @map("apply_until")
|
|
390
|
+
submitUntil String @map("submit_until")
|
|
391
|
+
status String @map("status")
|
|
392
|
+
lockedForEdit String @map("locked_for_edit")
|
|
393
|
+
baseRateName String? @map("base_rate_name")
|
|
394
|
+
baseRate String? @map("base_rate")
|
|
395
|
+
mapperName String? @map("mapper_name")
|
|
396
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
397
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
391
398
|
|
|
392
399
|
// Relations
|
|
393
400
|
productDefinitions ProductDefinition[]
|
|
@@ -408,8 +415,8 @@ model ProductDefinition {
|
|
|
408
415
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
409
416
|
|
|
410
417
|
// Relations
|
|
411
|
-
productCatalogue
|
|
412
|
-
rules
|
|
418
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
419
|
+
rules Rule[]
|
|
413
420
|
|
|
414
421
|
@@map("product_definitions")
|
|
415
422
|
}
|
|
@@ -432,74 +439,74 @@ model Rule {
|
|
|
432
439
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
433
440
|
|
|
434
441
|
// Relations
|
|
435
|
-
productDefinition
|
|
442
|
+
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
436
443
|
|
|
437
444
|
@@map("rules")
|
|
438
445
|
}
|
|
439
446
|
|
|
440
447
|
// From prisma/product-catalogues/product-variant.prisma
|
|
441
448
|
model ProductVariant {
|
|
442
|
-
id
|
|
443
|
-
productCatalogueId
|
|
444
|
-
variantid
|
|
445
|
-
name
|
|
446
|
-
variantCode
|
|
447
|
-
label
|
|
448
|
-
createdAt
|
|
449
|
-
updatedAt
|
|
449
|
+
id String @id @default(uuid())
|
|
450
|
+
productCatalogueId String @map("product_catalogue_id")
|
|
451
|
+
variantid String @map("variant_id")
|
|
452
|
+
name String @map("name")
|
|
453
|
+
variantCode String @map("variant_code")
|
|
454
|
+
label String? @map("label")
|
|
455
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
456
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
450
457
|
|
|
451
458
|
// Relations
|
|
452
|
-
productCatalogue
|
|
459
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
453
460
|
|
|
454
461
|
@@map("product_variants")
|
|
455
462
|
}
|
|
456
463
|
|
|
457
464
|
// From prisma/product-catalogues/product.prisma
|
|
458
465
|
model Product {
|
|
459
|
-
id
|
|
460
|
-
name
|
|
461
|
-
description
|
|
462
|
-
createdAt
|
|
463
|
-
updatedAt
|
|
464
|
-
applications
|
|
466
|
+
id String @id @default(uuid())
|
|
467
|
+
name String
|
|
468
|
+
description String?
|
|
469
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
470
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
471
|
+
applications Application[]
|
|
465
472
|
|
|
466
473
|
@@map("products")
|
|
467
474
|
}
|
|
468
475
|
|
|
469
476
|
// From prisma/applicants/applicant-credit-data.prisma
|
|
470
477
|
model ApplicantCreditData {
|
|
471
|
-
id
|
|
472
|
-
bankruptcy
|
|
478
|
+
id String @id @default(uuid())
|
|
479
|
+
bankruptcy String
|
|
473
480
|
countyCourtJudgment String
|
|
474
|
-
creditDefaults
|
|
475
|
-
securedArrears
|
|
476
|
-
statusLid
|
|
477
|
-
unsecuredArrears
|
|
478
|
-
valid
|
|
479
|
-
applicantId
|
|
480
|
-
createdAt
|
|
481
|
-
updatedAt
|
|
481
|
+
creditDefaults String?
|
|
482
|
+
securedArrears String
|
|
483
|
+
statusLid String @map("status_lid")
|
|
484
|
+
unsecuredArrears String
|
|
485
|
+
valid String
|
|
486
|
+
applicantId String @unique @map("applicant_id")
|
|
487
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
488
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
482
489
|
|
|
483
490
|
// Relations
|
|
484
|
-
applicant
|
|
485
|
-
status
|
|
491
|
+
applicant Applicant @relation("ApplicantCreditData", fields: [applicantId], references: [id])
|
|
492
|
+
status Lookup @relation("CreditDataStatus", fields: [statusLid], references: [id])
|
|
486
493
|
|
|
487
494
|
@@map("applicant_credit_data")
|
|
488
495
|
}
|
|
489
496
|
|
|
490
497
|
// From prisma/applicants/applicant-credit-profile.prisma
|
|
491
498
|
model ApplicantCreditProfile {
|
|
492
|
-
id
|
|
493
|
-
anyVoluntaryEnforcedPossessionNo String
|
|
494
|
-
bankruptcyNo
|
|
495
|
-
ccjInLastThreeYearNo
|
|
496
|
-
defaultsInLastYearNo
|
|
497
|
-
createdAt
|
|
498
|
-
updatedAt
|
|
499
|
-
applicantId
|
|
499
|
+
id String @id @default(uuid())
|
|
500
|
+
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
501
|
+
bankruptcyNo String @map("bankruptcy_no")
|
|
502
|
+
ccjInLastThreeYearNo String @map("ccj_in_last_three_year_no")
|
|
503
|
+
defaultsInLastYearNo String @map("defaults_in_last_year_no")
|
|
504
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
505
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
506
|
+
applicantId String @unique @map("applicant_id")
|
|
500
507
|
|
|
501
508
|
// Relations
|
|
502
|
-
applicant
|
|
509
|
+
applicant Applicant @relation("ApplicantCreditProfile", fields: [applicantId], references: [id])
|
|
503
510
|
|
|
504
511
|
@@map("applicant_credit_profiles")
|
|
505
512
|
}
|
|
@@ -514,79 +521,79 @@ model ApplicantEmploymentIncome {
|
|
|
514
521
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
515
522
|
|
|
516
523
|
// Relations
|
|
517
|
-
applicant
|
|
518
|
-
incomeType
|
|
524
|
+
applicant Applicant @relation("ApplicantEmploymentIncome", fields: [applicantId], references: [id])
|
|
525
|
+
incomeType Lookup @relation("ApplicantEmploymentIncomeType", fields: [incomeTypeLid], references: [id])
|
|
519
526
|
|
|
520
527
|
@@map("applicant_employment_incomes")
|
|
521
528
|
}
|
|
522
529
|
|
|
523
530
|
// From prisma/applicants/applicant-employment.prisma
|
|
524
531
|
model ApplicantEmployment {
|
|
525
|
-
id
|
|
526
|
-
pageValidFlag
|
|
527
|
-
acceptableIncomeLids
|
|
528
|
-
addressCity
|
|
529
|
-
addressCountryLid
|
|
530
|
-
addressLine1
|
|
531
|
-
addressLine2
|
|
532
|
-
addressLine3
|
|
533
|
-
addressPostCode
|
|
534
|
-
averageBonusPreviousTwoYears Decimal
|
|
535
|
-
basicGrossIncome
|
|
536
|
-
contractRemaining
|
|
537
|
-
dateJoined
|
|
538
|
-
disabilityLiving
|
|
539
|
-
employerName
|
|
540
|
-
employerTelephone
|
|
541
|
-
housingAllowance
|
|
542
|
-
industryLid
|
|
543
|
-
isUnderTerminationNotice
|
|
544
|
-
jobTitleLid
|
|
545
|
-
maintenance
|
|
546
|
-
maternityIncome
|
|
547
|
-
natureOfBusiness
|
|
548
|
-
pensionIncome
|
|
549
|
-
previousAddressCity
|
|
550
|
-
previousAddressCountry
|
|
551
|
-
previousAddressLine1
|
|
552
|
-
previousAddressLine2
|
|
553
|
-
previousAddressLine3
|
|
554
|
-
previousAddressPostCode
|
|
555
|
-
previousBasicGrossIncome
|
|
556
|
-
previousDateJoined
|
|
557
|
-
previousDateLeft
|
|
558
|
-
previousEmployerName
|
|
559
|
-
previousEmployerTelephone
|
|
560
|
-
previousJobTitle
|
|
561
|
-
previousNatureOfBusiness
|
|
562
|
-
referenceContact
|
|
563
|
-
referenceContactEmail
|
|
564
|
-
underTerminationNoticeNote
|
|
565
|
-
applicantId
|
|
566
|
-
createdAt
|
|
567
|
-
updatedAt
|
|
532
|
+
id String @id @default(uuid())
|
|
533
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
534
|
+
acceptableIncomeLids String[] @map("acceptable_income_lids")
|
|
535
|
+
addressCity String? @map("address_city")
|
|
536
|
+
addressCountryLid String @map("address_country_lid")
|
|
537
|
+
addressLine1 String @map("address_line1")
|
|
538
|
+
addressLine2 String? @map("address_line2")
|
|
539
|
+
addressLine3 String? @map("address_line3")
|
|
540
|
+
addressPostCode String @map("address_post_code")
|
|
541
|
+
averageBonusPreviousTwoYears Decimal @default(0.00) @map("average_bonus_previous_two_years")
|
|
542
|
+
basicGrossIncome Decimal @default(0.00) @map("basic_gross_income")
|
|
543
|
+
contractRemaining String? @map("contract_remaining")
|
|
544
|
+
dateJoined String @map("date_joined")
|
|
545
|
+
disabilityLiving Decimal @default(0.00) @map("disability_living")
|
|
546
|
+
employerName String @map("employer_name")
|
|
547
|
+
employerTelephone String? @map("employer_telephone")
|
|
548
|
+
housingAllowance Decimal @default(0.00) @map("housing_allowance")
|
|
549
|
+
industryLid String @map("industry_lid")
|
|
550
|
+
isUnderTerminationNotice Boolean @default(false) @map("is_under_termination_notice")
|
|
551
|
+
jobTitleLid String @map("job_title_lid")
|
|
552
|
+
maintenance Decimal @default(0.00) @map("maintenance")
|
|
553
|
+
maternityIncome Decimal @default(0.00) @map("maternity_income")
|
|
554
|
+
natureOfBusiness String @map("nature_of_business")
|
|
555
|
+
pensionIncome Decimal @default(0.00) @map("pension_income")
|
|
556
|
+
previousAddressCity String? @map("previous_address_city")
|
|
557
|
+
previousAddressCountry String @map("previous_address_country")
|
|
558
|
+
previousAddressLine1 String @map("previous_address_line1")
|
|
559
|
+
previousAddressLine2 String? @map("previous_address_line2")
|
|
560
|
+
previousAddressLine3 String? @map("previous_address_line3")
|
|
561
|
+
previousAddressPostCode String @map("previous_address_post_code")
|
|
562
|
+
previousBasicGrossIncome Decimal @default(0.00) @map("previous_basic_gross_income")
|
|
563
|
+
previousDateJoined String @map("previous_date_joined")
|
|
564
|
+
previousDateLeft String @map("previous_date_left")
|
|
565
|
+
previousEmployerName String @map("previous_employer_name")
|
|
566
|
+
previousEmployerTelephone String? @map("previous_employer_telephone")
|
|
567
|
+
previousJobTitle String @map("previous_job_title")
|
|
568
|
+
previousNatureOfBusiness String @map("previous_nature_of_business")
|
|
569
|
+
referenceContact String? @map("reference_contact")
|
|
570
|
+
referenceContactEmail String @map("reference_contact_email")
|
|
571
|
+
underTerminationNoticeNote String? @map("under_termination_notice_note")
|
|
572
|
+
applicantId String @unique @map("applicant_id")
|
|
573
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
574
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
568
575
|
|
|
569
576
|
// Relations
|
|
570
|
-
applicant
|
|
571
|
-
addressCountry
|
|
572
|
-
industry
|
|
573
|
-
jobTitle
|
|
574
|
-
acceptableIncomeTypes
|
|
577
|
+
applicant Applicant @relation("ApplicantEmployment", fields: [applicantId], references: [id])
|
|
578
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
579
|
+
industry Lookup @relation("Industry", fields: [industryLid], references: [id])
|
|
580
|
+
jobTitle Lookup @relation("JobTitle", fields: [jobTitleLid], references: [id])
|
|
581
|
+
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
575
582
|
|
|
576
583
|
@@map("applicant_employments")
|
|
577
584
|
}
|
|
578
585
|
|
|
579
586
|
// From prisma/applicants/applicant-expenditure.prisma
|
|
580
587
|
model ApplicantExpenditure {
|
|
581
|
-
id
|
|
582
|
-
applicantId
|
|
588
|
+
id String @id @default(uuid())
|
|
589
|
+
applicantId String @map("applicant_id")
|
|
583
590
|
expenditureTypeLid String @map("expenditure_type_lid")
|
|
584
|
-
amount
|
|
585
|
-
createdAt
|
|
586
|
-
updatedAt
|
|
591
|
+
amount Decimal @map("amount")
|
|
592
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
593
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
587
594
|
|
|
588
595
|
// Relations
|
|
589
|
-
applicant Applicant @relation("ApplicantExpenditures",fields: [applicantId], references: [id])
|
|
596
|
+
applicant Applicant @relation("ApplicantExpenditures", fields: [applicantId], references: [id])
|
|
590
597
|
expenditureType Lookup @relation("ExpenditureType", fields: [expenditureTypeLid], references: [id])
|
|
591
598
|
|
|
592
599
|
@@map("applicant_expenditures")
|
|
@@ -594,80 +601,80 @@ model ApplicantExpenditure {
|
|
|
594
601
|
|
|
595
602
|
// From prisma/applicants/applicant-income-source.prisma
|
|
596
603
|
model ApplicantIncomeSource {
|
|
597
|
-
id
|
|
598
|
-
employmentStatusLid
|
|
604
|
+
id String @id @default(uuid())
|
|
605
|
+
employmentStatusLid String? @map("employment_status_lid")
|
|
599
606
|
incomeFromEmployment String?
|
|
600
|
-
incomeFromPension
|
|
601
|
-
incomeFromProperty
|
|
602
|
-
incomeFromSavings
|
|
603
|
-
applicantId
|
|
604
|
-
createdAt
|
|
605
|
-
updatedAt
|
|
607
|
+
incomeFromPension String?
|
|
608
|
+
incomeFromProperty String?
|
|
609
|
+
incomeFromSavings String?
|
|
610
|
+
applicantId String @unique @map("applicant_id")
|
|
611
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
612
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
606
613
|
|
|
607
614
|
// Relations
|
|
608
|
-
applicant
|
|
609
|
-
employmentStatus
|
|
615
|
+
applicant Applicant @relation("ApplicantIncomeSource", fields: [applicantId], references: [id])
|
|
616
|
+
employmentStatus Lookup? @relation("IncomeSourceEmploymentStatus", fields: [employmentStatusLid], references: [id])
|
|
610
617
|
|
|
611
618
|
@@map("applicant_income_source")
|
|
612
619
|
}
|
|
613
620
|
|
|
614
621
|
// From prisma/applicants/applicant-income.prisma
|
|
615
622
|
model ApplicantIncome {
|
|
616
|
-
id
|
|
617
|
-
applicantId
|
|
618
|
-
accountantsAddressLine1
|
|
619
|
-
accountantsAddressLine2
|
|
620
|
-
accountantsAddressLine3
|
|
621
|
-
accountantsCity
|
|
622
|
-
accountantsCountryLid
|
|
623
|
-
accountantsEmail
|
|
624
|
-
accountantsPostCode
|
|
625
|
-
accountantsPractice
|
|
626
|
-
accountantsTelephoneNumber
|
|
627
|
-
businessAddressLine1
|
|
628
|
-
businessAddressLine2
|
|
629
|
-
businessAddressLine3
|
|
630
|
-
businessCity
|
|
631
|
-
businessCountryLid
|
|
632
|
-
businessPostCode
|
|
633
|
-
businessTelephoneNumber
|
|
634
|
-
businessTypeLid
|
|
635
|
-
charteredCertifiedOrOtherLid String
|
|
636
|
-
contactName
|
|
637
|
-
currentYearEnd
|
|
638
|
-
dateEstablished
|
|
639
|
-
doYouHaveAccountant
|
|
640
|
-
isBusinessAddressDifferent
|
|
641
|
-
nameOfBusiness
|
|
642
|
-
natureOfBusiness
|
|
643
|
-
netAssets1
|
|
644
|
-
netAssets2
|
|
645
|
-
netAssets3
|
|
646
|
-
pageValidFlag
|
|
647
|
-
percentageOfShareholding
|
|
648
|
-
registeredAddressLine1
|
|
649
|
-
registeredAddressLine2
|
|
650
|
-
registeredAddressLine3
|
|
651
|
-
registeredCity
|
|
652
|
-
registeredCountryLid
|
|
653
|
-
registeredPostCode
|
|
654
|
-
registeredTelephone
|
|
655
|
-
selfEmployedDate
|
|
656
|
-
turnover1
|
|
657
|
-
turnover2
|
|
658
|
-
turnover3
|
|
659
|
-
year1
|
|
660
|
-
year2
|
|
661
|
-
year3
|
|
662
|
-
yearEnd1
|
|
663
|
-
yearEnd2
|
|
664
|
-
yearEnd3
|
|
665
|
-
totalEmploymentGrossIncome
|
|
666
|
-
totalEmploymentNetIncome
|
|
667
|
-
isEmploymentIncomeConfirmed
|
|
668
|
-
employmentIncomeRationale
|
|
669
|
-
createdAt
|
|
670
|
-
updatedAt
|
|
623
|
+
id String @id @default(uuid())
|
|
624
|
+
applicantId String @map("applicant_id")
|
|
625
|
+
accountantsAddressLine1 String @map("accountants_address_line1")
|
|
626
|
+
accountantsAddressLine2 String @map("accountants_address_line2")
|
|
627
|
+
accountantsAddressLine3 String @map("accountants_address_line3")
|
|
628
|
+
accountantsCity String @default("") @map("accountants_city")
|
|
629
|
+
accountantsCountryLid String @map("accountants_country_lid")
|
|
630
|
+
accountantsEmail String @map("accountants_email")
|
|
631
|
+
accountantsPostCode String @map("accountants_post_code")
|
|
632
|
+
accountantsPractice String @map("accountants_practice")
|
|
633
|
+
accountantsTelephoneNumber String @map("accountants_telephone_number")
|
|
634
|
+
businessAddressLine1 String @map("business_address_line1")
|
|
635
|
+
businessAddressLine2 String @map("business_address_line2")
|
|
636
|
+
businessAddressLine3 String @map("business_address_line3")
|
|
637
|
+
businessCity String @default("") @map("business_city")
|
|
638
|
+
businessCountryLid String @map("business_country_lid")
|
|
639
|
+
businessPostCode String @map("business_post_code")
|
|
640
|
+
businessTelephoneNumber String @map("business_telephone_number")
|
|
641
|
+
businessTypeLid String @map("business_type_lid")
|
|
642
|
+
charteredCertifiedOrOtherLid String @map("chartered_certified_or_other_lid")
|
|
643
|
+
contactName String @map("contact_name")
|
|
644
|
+
currentYearEnd String @map("current_year_end")
|
|
645
|
+
dateEstablished String @map("date_established")
|
|
646
|
+
doYouHaveAccountant Boolean @map("do_you_have_accountant")
|
|
647
|
+
isBusinessAddressDifferent Boolean @map("is_business_address_different")
|
|
648
|
+
nameOfBusiness String @map("name_of_business")
|
|
649
|
+
natureOfBusiness String @map("nature_of_business")
|
|
650
|
+
netAssets1 Decimal @default(0.00) @map("net_assets1")
|
|
651
|
+
netAssets2 Decimal @default(0.00) @map("net_assets2")
|
|
652
|
+
netAssets3 Decimal @default(0.00) @map("net_assets3")
|
|
653
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
654
|
+
percentageOfShareholding Int @map("percentage_of_shareholding")
|
|
655
|
+
registeredAddressLine1 String @map("registered_address_line1")
|
|
656
|
+
registeredAddressLine2 String @map("registered_address_line2")
|
|
657
|
+
registeredAddressLine3 String @map("registered_address_line3")
|
|
658
|
+
registeredCity String @default("") @map("registered_city")
|
|
659
|
+
registeredCountryLid String @map("registered_country_lid")
|
|
660
|
+
registeredPostCode String @map("registered_post_code")
|
|
661
|
+
registeredTelephone String @map("registered_telephone")
|
|
662
|
+
selfEmployedDate String @map("self_employed_date")
|
|
663
|
+
turnover1 Decimal @default(0.00) @map("turnover1")
|
|
664
|
+
turnover2 Decimal @default(0.00) @map("turnover2")
|
|
665
|
+
turnover3 Decimal @default(0.00) @map("turnover3")
|
|
666
|
+
year1 Decimal @default(0.00) @map("year1")
|
|
667
|
+
year2 Decimal @default(0.00) @map("year2")
|
|
668
|
+
year3 Decimal @default(0.00) @map("year3")
|
|
669
|
+
yearEnd1 Int? @map("year_end1")
|
|
670
|
+
yearEnd2 Int? @map("year_end2")
|
|
671
|
+
yearEnd3 Int? @map("year_end3")
|
|
672
|
+
totalEmploymentGrossIncome Decimal @map("total_employment_gross_income")
|
|
673
|
+
totalEmploymentNetIncome Decimal @map("total_employment_net_income")
|
|
674
|
+
isEmploymentIncomeConfirmed Boolean @map("is_employment_income_confirmed")
|
|
675
|
+
employmentIncomeRationale String
|
|
676
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
677
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
671
678
|
|
|
672
679
|
// Relations
|
|
673
680
|
accountantsCountry Lookup @relation("AccountantsCountry", fields: [accountantsCountryLid], references: [id])
|
|
@@ -676,1024 +683,1023 @@ model ApplicantIncome {
|
|
|
676
683
|
charteredCertifiedOrOther Lookup @relation("CharteredCertifiedOrOther", fields: [charteredCertifiedOrOtherLid], references: [id])
|
|
677
684
|
registeredCountry Lookup @relation("RegisteredCountry", fields: [registeredCountryLid], references: [id])
|
|
678
685
|
applicant Applicant @relation("ApplicantIncome", fields: [applicantId], references: [id])
|
|
679
|
-
|
|
686
|
+
|
|
680
687
|
@@map("applicant_incomes")
|
|
681
688
|
}
|
|
682
689
|
|
|
683
690
|
// From prisma/applicants/applicant-other-income.prisma
|
|
684
691
|
model ApplicantOtherIncome {
|
|
685
|
-
id
|
|
692
|
+
id String @id @default(uuid())
|
|
686
693
|
// Income Source 1
|
|
687
|
-
sourceDetails1
|
|
688
|
-
amount1
|
|
689
|
-
payFrequency1Lid
|
|
690
|
-
guaranteed1
|
|
694
|
+
sourceDetails1 String?
|
|
695
|
+
amount1 Decimal @default(0.00)
|
|
696
|
+
payFrequency1Lid String? @map("pay_frequency1_lid")
|
|
697
|
+
guaranteed1 Boolean @default(false)
|
|
691
698
|
|
|
692
699
|
// Income Source 2
|
|
693
|
-
sourceDetails2
|
|
694
|
-
amount2
|
|
695
|
-
payFrequency2Lid
|
|
696
|
-
guaranteed2
|
|
700
|
+
sourceDetails2 String?
|
|
701
|
+
amount2 Decimal @default(0.00)
|
|
702
|
+
payFrequency2Lid String? @map("pay_frequency2_lid")
|
|
703
|
+
guaranteed2 Boolean @default(false)
|
|
697
704
|
|
|
698
705
|
// Income Source 3
|
|
699
|
-
sourceDetails3
|
|
700
|
-
amount3
|
|
701
|
-
payFrequency3Lid
|
|
702
|
-
guaranteed3
|
|
706
|
+
sourceDetails3 String?
|
|
707
|
+
amount3 Decimal @default(0.00)
|
|
708
|
+
payFrequency3Lid String? @map("pay_frequency3_lid")
|
|
709
|
+
guaranteed3 Boolean @default(false)
|
|
703
710
|
|
|
704
711
|
// Income Source 4
|
|
705
|
-
sourceDetails4
|
|
706
|
-
amount4
|
|
707
|
-
payFrequency4Lid
|
|
708
|
-
guaranteed4
|
|
709
|
-
|
|
710
|
-
taxCredits
|
|
711
|
-
maintenance
|
|
712
|
-
otherBenefits
|
|
713
|
-
grossPensionIncome
|
|
714
|
-
privatePensionIncome Decimal
|
|
715
|
-
statePensionIncome
|
|
716
|
-
applicantId
|
|
717
|
-
createdAt
|
|
718
|
-
updatedAt
|
|
712
|
+
sourceDetails4 String?
|
|
713
|
+
amount4 Decimal @default(0.00)
|
|
714
|
+
payFrequency4Lid String? @map("pay_frequency4_lid")
|
|
715
|
+
guaranteed4 Boolean @default(false)
|
|
716
|
+
|
|
717
|
+
taxCredits Decimal @default(0.00)
|
|
718
|
+
maintenance Decimal @default(0.00)
|
|
719
|
+
otherBenefits Decimal @default(0.00)
|
|
720
|
+
grossPensionIncome Decimal @default(0.00)
|
|
721
|
+
privatePensionIncome Decimal @default(0.00)
|
|
722
|
+
statePensionIncome Decimal @default(0.00)
|
|
723
|
+
applicantId String @unique @map("applicant_id")
|
|
724
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
725
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
719
726
|
|
|
720
727
|
// Relations
|
|
721
|
-
applicant
|
|
722
|
-
payFrequency1
|
|
723
|
-
payFrequency2
|
|
724
|
-
payFrequency3
|
|
725
|
-
payFrequency4
|
|
728
|
+
applicant Applicant @relation("ApplicantOtherIncome", fields: [applicantId], references: [id])
|
|
729
|
+
payFrequency1 Lookup? @relation("PayFrequency1", fields: [payFrequency1Lid], references: [id])
|
|
730
|
+
payFrequency2 Lookup? @relation("PayFrequency2", fields: [payFrequency2Lid], references: [id])
|
|
731
|
+
payFrequency3 Lookup? @relation("PayFrequency3", fields: [payFrequency3Lid], references: [id])
|
|
732
|
+
payFrequency4 Lookup? @relation("PayFrequency4", fields: [payFrequency4Lid], references: [id])
|
|
726
733
|
|
|
727
734
|
@@map("applicant_other_income")
|
|
728
735
|
}
|
|
729
736
|
|
|
730
737
|
// From prisma/applicants/applicant-property-income.prisma
|
|
731
738
|
model ApplicantPropertyIncome {
|
|
732
|
-
id
|
|
733
|
-
pageValidFlag
|
|
734
|
-
yearEnd1
|
|
735
|
-
rentalIncome1
|
|
736
|
-
netProfit1
|
|
737
|
-
yearEnd2
|
|
738
|
-
rentalIncome2
|
|
739
|
-
netProfit2
|
|
740
|
-
yearEnd3
|
|
741
|
-
rentalIncome3
|
|
742
|
-
netProfit3
|
|
743
|
-
applicantId
|
|
744
|
-
createdAt
|
|
745
|
-
updatedAt
|
|
739
|
+
id String @id @default(uuid())
|
|
740
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
741
|
+
yearEnd1 String @map("year_end_1")
|
|
742
|
+
rentalIncome1 Decimal @map("rental_income_1")
|
|
743
|
+
netProfit1 Decimal @map("net_profit_1")
|
|
744
|
+
yearEnd2 String @map("year_end_2")
|
|
745
|
+
rentalIncome2 Decimal @map("rental_income_2")
|
|
746
|
+
netProfit2 Decimal @map("net_profit_2")
|
|
747
|
+
yearEnd3 String @map("year_end_3")
|
|
748
|
+
rentalIncome3 Decimal @map("rental_income_3")
|
|
749
|
+
netProfit3 Decimal @map("net_profit_3")
|
|
750
|
+
applicantId String @unique @map("applicant_id")
|
|
751
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
752
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
746
753
|
|
|
747
754
|
// Relations
|
|
748
|
-
applicant
|
|
755
|
+
applicant Applicant @relation("ApplicantPropertyIncome", fields: [applicantId], references: [id])
|
|
749
756
|
|
|
750
757
|
@@map("applicant_property_income")
|
|
751
758
|
}
|
|
752
759
|
|
|
753
760
|
// From prisma/applicants/applicant.prisma
|
|
754
761
|
model Applicant {
|
|
755
|
-
id
|
|
756
|
-
applicantId
|
|
757
|
-
applicationId
|
|
758
|
-
addressCity
|
|
759
|
-
addressCountryLid
|
|
760
|
-
addressLine1
|
|
761
|
-
addressLine2
|
|
762
|
-
addressLine3
|
|
763
|
-
addressMovedDate
|
|
764
|
-
addressPostCode
|
|
765
|
-
correspondenceAddressCity
|
|
766
|
-
correspondenceAddressCountryLid
|
|
767
|
-
correspondenceAddressLine1
|
|
768
|
-
correspondenceAddressLine2
|
|
769
|
-
correspondenceAddressLine3
|
|
770
|
-
correspondenceAddressPostCode
|
|
771
|
-
countryOfResidenceLid
|
|
772
|
-
dateOfBirth
|
|
773
|
-
dependant10Age
|
|
774
|
-
dependant1Age
|
|
775
|
-
dependant2Age
|
|
776
|
-
dependant3Age
|
|
777
|
-
dependant4Age
|
|
778
|
-
dependant5Age
|
|
779
|
-
dependant6Age
|
|
780
|
-
dependant7Age
|
|
781
|
-
dependant8Age
|
|
782
|
-
dependant9Age
|
|
783
|
-
email
|
|
784
|
-
employmentStatusDetails
|
|
785
|
-
firstName
|
|
786
|
-
isFirstTimelandlord
|
|
787
|
-
foreignIdForNationals
|
|
788
|
-
gdprEmail
|
|
789
|
-
gdprPost
|
|
790
|
-
gdprTelephone
|
|
791
|
-
gdprTextMessage
|
|
792
|
-
gender
|
|
762
|
+
id String @id @default(uuid())
|
|
763
|
+
applicantId String @unique
|
|
764
|
+
applicationId String @map("application_id")
|
|
765
|
+
addressCity String?
|
|
766
|
+
addressCountryLid String? @map("address_country_lid")
|
|
767
|
+
addressLine1 String?
|
|
768
|
+
addressLine2 String?
|
|
769
|
+
addressLine3 String?
|
|
770
|
+
addressMovedDate String?
|
|
771
|
+
addressPostCode String?
|
|
772
|
+
correspondenceAddressCity String?
|
|
773
|
+
correspondenceAddressCountryLid String? @map("correspondence_address_country_lid")
|
|
774
|
+
correspondenceAddressLine1 String?
|
|
775
|
+
correspondenceAddressLine2 String?
|
|
776
|
+
correspondenceAddressLine3 String?
|
|
777
|
+
correspondenceAddressPostCode String?
|
|
778
|
+
countryOfResidenceLid String @map("country_of_residence_lid")
|
|
779
|
+
dateOfBirth String
|
|
780
|
+
dependant10Age Int @default(0)
|
|
781
|
+
dependant1Age Int @default(0)
|
|
782
|
+
dependant2Age Int @default(0)
|
|
783
|
+
dependant3Age Int @default(0)
|
|
784
|
+
dependant4Age Int @default(0)
|
|
785
|
+
dependant5Age Int @default(0)
|
|
786
|
+
dependant6Age Int @default(0)
|
|
787
|
+
dependant7Age Int @default(0)
|
|
788
|
+
dependant8Age Int @default(0)
|
|
789
|
+
dependant9Age Int @default(0)
|
|
790
|
+
email String
|
|
791
|
+
employmentStatusDetails String?
|
|
792
|
+
firstName String
|
|
793
|
+
isFirstTimelandlord Boolean @default(false)
|
|
794
|
+
foreignIdForNationals String?
|
|
795
|
+
gdprEmail Boolean @default(false)
|
|
796
|
+
gdprPost Boolean @default(false)
|
|
797
|
+
gdprTelephone Boolean @default(false)
|
|
798
|
+
gdprTextMessage Boolean @default(false)
|
|
799
|
+
gender String
|
|
793
800
|
hasBrokerGivenConsentForVulnerabilities Boolean
|
|
794
|
-
hasLinkedJurisdiction
|
|
795
|
-
isCorrespondence
|
|
796
|
-
isCommitmentConfirmed
|
|
797
|
-
isCurrentContract
|
|
798
|
-
isCustomerVulnerable
|
|
799
|
-
isExpat
|
|
800
|
-
isFirstApplicant
|
|
801
|
-
isUkPassport
|
|
802
|
-
isUkResident
|
|
803
|
-
classLid
|
|
804
|
-
pageValidFlag
|
|
805
|
-
lastName
|
|
806
|
-
linkedJurisdictionCountryLid
|
|
807
|
-
linkedJurisdictionDetails
|
|
808
|
-
maidenName
|
|
809
|
-
maritalStatusLid
|
|
810
|
-
mobileNumber
|
|
811
|
-
nationalityLid
|
|
812
|
-
netIncome
|
|
813
|
-
niNumber
|
|
814
|
-
numberOfDependants
|
|
815
|
-
isOneYearPrior
|
|
816
|
-
phoneNumber
|
|
817
|
-
previous1AddressCity
|
|
818
|
-
previous1AddressCountryLid
|
|
819
|
-
previous1AddressLine1
|
|
820
|
-
previous1AddressLine2
|
|
821
|
-
previous1AddressLine3
|
|
822
|
-
previous1AddressMovedDate
|
|
823
|
-
previous1AddressPostCode
|
|
824
|
-
previous1AddressPropertyOwnedBy
|
|
825
|
-
previous2AddressCity
|
|
826
|
-
previous2AddressCountryLid
|
|
827
|
-
previous2AddressLine1
|
|
828
|
-
previous2AddressLine2
|
|
829
|
-
previous2AddressLine3
|
|
830
|
-
previous2AddressMovedDate
|
|
831
|
-
previous2AddressPostCode
|
|
832
|
-
previous2AddressPropertyOwnedBy
|
|
833
|
-
relationshipToOthers
|
|
834
|
-
residentialStatusLid
|
|
835
|
-
retirementAge
|
|
836
|
-
taxJurisdictionLid
|
|
837
|
-
taxPayerLid
|
|
838
|
-
timeResidedAtCountryOfResidence
|
|
839
|
-
title
|
|
840
|
-
isTwoYearPrior
|
|
841
|
-
understandEnglish
|
|
842
|
-
vulnerabilityNotes
|
|
843
|
-
vulnerabilityTypeLids
|
|
844
|
-
ukPassportProfessionLid
|
|
845
|
-
createdAt
|
|
846
|
-
updatedAt
|
|
801
|
+
hasLinkedJurisdiction Boolean @default(false)
|
|
802
|
+
isCorrespondence Boolean @default(true)
|
|
803
|
+
isCommitmentConfirmed Boolean @default(false)
|
|
804
|
+
isCurrentContract Boolean @default(false)
|
|
805
|
+
isCustomerVulnerable Boolean @default(false)
|
|
806
|
+
isExpat Boolean @default(false)
|
|
807
|
+
isFirstApplicant Boolean @default(false)
|
|
808
|
+
isUkPassport Boolean @default(false)
|
|
809
|
+
isUkResident Boolean
|
|
810
|
+
classLid String? @map("class_lid")
|
|
811
|
+
pageValidFlag Boolean @default(false)
|
|
812
|
+
lastName String
|
|
813
|
+
linkedJurisdictionCountryLid String? @map("linked_jurisdiction_country_lid")
|
|
814
|
+
linkedJurisdictionDetails String?
|
|
815
|
+
maidenName String?
|
|
816
|
+
maritalStatusLid String @map("marital_status_lid")
|
|
817
|
+
mobileNumber String?
|
|
818
|
+
nationalityLid String @map("nationality_lid")
|
|
819
|
+
netIncome Decimal @default(0.00)
|
|
820
|
+
niNumber String
|
|
821
|
+
numberOfDependants Int @default(0)
|
|
822
|
+
isOneYearPrior Boolean @default(false)
|
|
823
|
+
phoneNumber String?
|
|
824
|
+
previous1AddressCity String?
|
|
825
|
+
previous1AddressCountryLid String? @map("previous1_address_country_lid")
|
|
826
|
+
previous1AddressLine1 String?
|
|
827
|
+
previous1AddressLine2 String?
|
|
828
|
+
previous1AddressLine3 String?
|
|
829
|
+
previous1AddressMovedDate String?
|
|
830
|
+
previous1AddressPostCode String?
|
|
831
|
+
previous1AddressPropertyOwnedBy String?
|
|
832
|
+
previous2AddressCity String?
|
|
833
|
+
previous2AddressCountryLid String? @map("previous2_address_country_lid")
|
|
834
|
+
previous2AddressLine1 String?
|
|
835
|
+
previous2AddressLine2 String?
|
|
836
|
+
previous2AddressLine3 String?
|
|
837
|
+
previous2AddressMovedDate String?
|
|
838
|
+
previous2AddressPostCode String?
|
|
839
|
+
previous2AddressPropertyOwnedBy String?
|
|
840
|
+
relationshipToOthers String
|
|
841
|
+
residentialStatusLid String? @map("residential_status_lid")
|
|
842
|
+
retirementAge String
|
|
843
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
844
|
+
taxPayerLid String @map("tax_payer_lid")
|
|
845
|
+
timeResidedAtCountryOfResidence Int
|
|
846
|
+
title String
|
|
847
|
+
isTwoYearPrior Boolean @default(false)
|
|
848
|
+
understandEnglish Boolean
|
|
849
|
+
vulnerabilityNotes String?
|
|
850
|
+
vulnerabilityTypeLids String[] @map("vulnerability_type_lids")
|
|
851
|
+
ukPassportProfessionLid String? @map("uk_passport_profession_lid")
|
|
852
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
853
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
847
854
|
|
|
848
855
|
// Relations
|
|
849
|
-
application
|
|
850
|
-
addressCountry
|
|
851
|
-
correspondenceAddressCountry
|
|
852
|
-
countryOfResidence
|
|
853
|
-
class
|
|
854
|
-
linkedJurisdictionCountry
|
|
855
|
-
maritalStatus
|
|
856
|
-
nationality
|
|
857
|
-
previous1AddressCountry
|
|
858
|
-
previous2AddressCountry
|
|
859
|
-
residentialStatus
|
|
860
|
-
taxJurisdiction
|
|
861
|
-
taxPayer
|
|
862
|
-
ukPassportProfession
|
|
863
|
-
vulnerabilityTypes
|
|
864
|
-
otherIncome
|
|
865
|
-
incomeSource
|
|
866
|
-
creditProfile
|
|
867
|
-
propertyIncome
|
|
868
|
-
|
|
869
|
-
employment
|
|
870
|
-
creditData
|
|
871
|
-
employmentIncome
|
|
872
|
-
expenditures
|
|
873
|
-
incomes
|
|
874
|
-
creditCardCommitments
|
|
875
|
-
loanCommitments
|
|
876
|
-
mortgageCommitments
|
|
877
|
-
residenceCommitments
|
|
878
|
-
securedLoanCommitments
|
|
879
|
-
unsecuredLoanCommitments
|
|
880
|
-
shareholdings
|
|
856
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
857
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
858
|
+
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
859
|
+
countryOfResidence Lookup @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
860
|
+
class Lookup? @relation("Class", fields: [classLid], references: [id])
|
|
861
|
+
linkedJurisdictionCountry Lookup? @relation("LinkedJurisdictionCountry", fields: [linkedJurisdictionCountryLid], references: [id])
|
|
862
|
+
maritalStatus Lookup @relation("MaritalStatus", fields: [maritalStatusLid], references: [id])
|
|
863
|
+
nationality Lookup @relation("Nationality", fields: [nationalityLid], references: [id])
|
|
864
|
+
previous1AddressCountry Lookup? @relation("Previous1AddressCountry", fields: [previous1AddressCountryLid], references: [id])
|
|
865
|
+
previous2AddressCountry Lookup? @relation("Previous2AddressCountry", fields: [previous2AddressCountryLid], references: [id])
|
|
866
|
+
residentialStatus Lookup? @relation("ResidentialStatus", fields: [residentialStatusLid], references: [id])
|
|
867
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
868
|
+
taxPayer Lookup @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
869
|
+
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
870
|
+
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
871
|
+
otherIncome ApplicantOtherIncome? @relation("ApplicantOtherIncome")
|
|
872
|
+
incomeSource ApplicantIncomeSource? @relation("ApplicantIncomeSource")
|
|
873
|
+
creditProfile ApplicantCreditProfile? @relation("ApplicantCreditProfile")
|
|
874
|
+
propertyIncome ApplicantPropertyIncome? @relation("ApplicantPropertyIncome")
|
|
875
|
+
|
|
876
|
+
employment ApplicantEmployment? @relation("ApplicantEmployment")
|
|
877
|
+
creditData ApplicantCreditData? @relation("ApplicantCreditData")
|
|
878
|
+
employmentIncome ApplicantEmploymentIncome? @relation("ApplicantEmploymentIncome")
|
|
879
|
+
expenditures ApplicantExpenditure[] @relation("ApplicantExpenditures")
|
|
880
|
+
incomes ApplicantIncome[] @relation("ApplicantIncome")
|
|
881
|
+
creditCardCommitments CreditCardCommitment[] @relation("ApplicantCreditCardCommitments")
|
|
882
|
+
loanCommitments LoanCommitment[] @relation("ApplicantLoanCommitments")
|
|
883
|
+
mortgageCommitments MortgageCommitment[] @relation("ApplicantMortgageCommitments")
|
|
884
|
+
residenceCommitments ResidenceCommitment[] @relation("ApplicantResidenceCommitments")
|
|
885
|
+
securedLoanCommitments SecuredLoanCommitment[] @relation("ApplicantSecuredLoanCommitments")
|
|
886
|
+
unsecuredLoanCommitments UnsecuredLoanCommitment[] @relation("ApplicantUnsecuredLoanCommitments")
|
|
887
|
+
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
881
888
|
|
|
882
889
|
@@map("applicants")
|
|
883
890
|
}
|
|
884
891
|
|
|
885
892
|
// From prisma/applicants/credit-card-commitment.prisma
|
|
886
893
|
model CreditCardCommitment {
|
|
887
|
-
id
|
|
888
|
-
applicantId
|
|
889
|
-
commitmentId
|
|
890
|
-
commitmentTypeLid
|
|
891
|
-
lenderName
|
|
892
|
-
creditLimit
|
|
893
|
-
outstandingBalance
|
|
894
|
-
creditCardRepaymentTypeLid String
|
|
895
|
-
monthlyPayment
|
|
896
|
-
jointNames
|
|
897
|
-
createdAt
|
|
898
|
-
updatedAt
|
|
894
|
+
id String @id @default(uuid())
|
|
895
|
+
applicantId String @map("applicant_id")
|
|
896
|
+
commitmentId String @map("commitment_id")
|
|
897
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
898
|
+
lenderName String @map("lender_name")
|
|
899
|
+
creditLimit Decimal @map("credit_limit")
|
|
900
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
901
|
+
creditCardRepaymentTypeLid String @map("credit_card_repayment_type_lid")
|
|
902
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
903
|
+
jointNames Boolean @map("joint_names")
|
|
904
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
905
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
899
906
|
|
|
900
907
|
// Relations
|
|
901
|
-
applicant
|
|
902
|
-
commitmentType
|
|
903
|
-
repaymentType
|
|
908
|
+
applicant Applicant @relation("ApplicantCreditCardCommitments", fields: [applicantId], references: [id])
|
|
909
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
910
|
+
repaymentType Lookup @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
904
911
|
|
|
905
912
|
@@map("applicant_creditcard_commitments")
|
|
906
913
|
}
|
|
907
914
|
|
|
908
915
|
// From prisma/applicants/loan-commitment.prisma
|
|
909
916
|
model LoanCommitment {
|
|
910
|
-
id
|
|
911
|
-
applicantId
|
|
912
|
-
commitmentId
|
|
913
|
-
commitmentTypeLid
|
|
914
|
-
lenderName
|
|
915
|
-
loanTypeLid
|
|
916
|
-
securityDetails
|
|
917
|
-
purpose
|
|
918
|
-
doHaveSharedResponsibility Boolean
|
|
919
|
-
sharedMortgage
|
|
920
|
-
remainingTerm
|
|
921
|
-
startDate
|
|
922
|
-
outstandingBalance
|
|
923
|
-
monthlyPayment
|
|
924
|
-
jointNames
|
|
925
|
-
createdAt
|
|
926
|
-
updatedAt
|
|
917
|
+
id String @id @default(uuid())
|
|
918
|
+
applicantId String @map("applicant_id")
|
|
919
|
+
commitmentId String @map("commitment_id")
|
|
920
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
921
|
+
lenderName String @map("lender_name")
|
|
922
|
+
loanTypeLid String @map("loan_type_lid")
|
|
923
|
+
securityDetails String @map("security_details")
|
|
924
|
+
purpose String? @map("purpose")
|
|
925
|
+
doHaveSharedResponsibility Boolean @map("do_have_shared_responsibility")
|
|
926
|
+
sharedMortgage String @map("shared_mortgage")
|
|
927
|
+
remainingTerm String? @map("remaining_term")
|
|
928
|
+
startDate String @map("start_date")
|
|
929
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
930
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
931
|
+
jointNames Boolean @map("joint_names")
|
|
932
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
933
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
927
934
|
|
|
928
935
|
// Relations
|
|
929
|
-
applicant
|
|
930
|
-
commitmentType
|
|
931
|
-
loanType
|
|
936
|
+
applicant Applicant @relation("ApplicantLoanCommitments", fields: [applicantId], references: [id])
|
|
937
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
938
|
+
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
932
939
|
|
|
933
940
|
@@map("applicant_loan_commitments")
|
|
934
941
|
}
|
|
935
942
|
|
|
936
943
|
// From prisma/applicants/mortgage-commitment.prisma
|
|
937
944
|
model MortgageCommitment {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
945
|
+
id String @id @default(uuid())
|
|
946
|
+
applicantId String @map("applicant_id")
|
|
947
|
+
lenderName String @map("lender_name")
|
|
948
|
+
propertyValue Decimal @map("property_value")
|
|
949
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
950
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
951
|
+
fixedTerm String
|
|
952
|
+
originalLoanAmount Decimal
|
|
953
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
954
|
+
startDate String
|
|
955
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
956
|
+
commitmentId String @map("commitment_id")
|
|
957
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
958
|
+
furtherAdvances Boolean
|
|
959
|
+
furtherAdvanceDetails String
|
|
960
|
+
accountUptoDate Boolean
|
|
961
|
+
accountUptoDateFailDetails String
|
|
962
|
+
accountInArrears Boolean
|
|
963
|
+
accountInArrearsDetails String
|
|
964
|
+
doHaveSharedResponsibility Boolean
|
|
965
|
+
sharedMortgage String
|
|
966
|
+
jointNames Boolean @map("joint_names")
|
|
967
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
968
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
969
|
+
|
|
970
|
+
// Relations
|
|
971
|
+
applicant Applicant @relation("ApplicantMortgageCommitments", fields: [applicantId], references: [id])
|
|
972
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
973
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
974
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
975
|
+
|
|
976
|
+
@@map("applicant_mortgage_commitments")
|
|
970
977
|
}
|
|
971
978
|
|
|
972
979
|
// From prisma/applicants/residence-commitment.prisma
|
|
973
980
|
model ResidenceCommitment {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
981
|
+
id String @id @default(uuid())
|
|
982
|
+
applicantId String @map("applicant_id")
|
|
983
|
+
pageValidFlag Boolean @default(false)
|
|
984
|
+
financeTypeHppLid String? @map("finance_type_hpp_lid")
|
|
985
|
+
lenderName String @map("lender_name")
|
|
986
|
+
propertyValue Decimal @map("property_value")
|
|
987
|
+
hppRepaymentTypeLid String @map("hpp_repayment_type_lid")
|
|
988
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
989
|
+
fixedTerm String
|
|
990
|
+
commitmentId String @map("commitment_id")
|
|
991
|
+
originalLoanAmount Decimal
|
|
992
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
993
|
+
startDate String
|
|
994
|
+
mortgageRate Float
|
|
995
|
+
remainingTermMonth Int
|
|
996
|
+
financeHomeTypeLid String @map("finance_home_type_lid")
|
|
997
|
+
chargeTypeLid String @map("charge_type_lid")
|
|
998
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
999
|
+
furtherAdvances Boolean
|
|
1000
|
+
furtherAdvanceDetails String
|
|
1001
|
+
accountUptoDate Boolean
|
|
1002
|
+
accountUptoDateFailDetails String
|
|
1003
|
+
accountInArrears Boolean
|
|
1004
|
+
accountInArrearsDetails String
|
|
1005
|
+
doHaveSharedResponsibility Boolean
|
|
1006
|
+
sharedMortgage String
|
|
1007
|
+
jointNames Boolean @map("joint_names")
|
|
1008
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1009
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1010
|
+
|
|
1011
|
+
// Relations
|
|
1012
|
+
applicant Applicant @relation("ApplicantResidenceCommitments", fields: [applicantId], references: [id])
|
|
1013
|
+
financeTypeHpp Lookup? @relation("FinanceTypeHpp", fields: [financeTypeHppLid], references: [id])
|
|
1014
|
+
hppRepaymentType Lookup @relation("HppRepaymentType", fields: [hppRepaymentTypeLid], references: [id])
|
|
1015
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
1016
|
+
financeHomeType Lookup @relation("FinanceHomeType", fields: [financeHomeTypeLid], references: [id])
|
|
1017
|
+
chargeType Lookup @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
1018
|
+
|
|
1019
|
+
@@map("applicant_residence_commitments")
|
|
1013
1020
|
}
|
|
1014
1021
|
|
|
1015
1022
|
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1016
1023
|
model SecuredLoanCommitment {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1024
|
+
id String @id @default(uuid())
|
|
1025
|
+
applicantId String @map("applicant_id")
|
|
1026
|
+
lenderName String
|
|
1027
|
+
commitmentId String
|
|
1028
|
+
securityDetails String
|
|
1029
|
+
purpose String
|
|
1030
|
+
doHaveSharedResponsibility Boolean
|
|
1031
|
+
sharedMortgage String
|
|
1032
|
+
remainingTerm String?
|
|
1033
|
+
startDate String
|
|
1034
|
+
outstandingBalance Decimal
|
|
1035
|
+
monthlyPayment Decimal
|
|
1036
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1037
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1038
|
+
|
|
1039
|
+
// Relations
|
|
1040
|
+
applicant Applicant @relation("ApplicantSecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1041
|
+
|
|
1042
|
+
@@map("applicant_secured_loan_commitments")
|
|
1036
1043
|
}
|
|
1037
1044
|
|
|
1038
1045
|
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1039
1046
|
model UnsecuredLoanCommitment {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1047
|
+
id String @id @default(uuid())
|
|
1048
|
+
applicantId String @map("applicant_id")
|
|
1049
|
+
lenderName String
|
|
1050
|
+
commitmentId String
|
|
1051
|
+
purpose String
|
|
1052
|
+
doHaveSharedResponsibility Boolean
|
|
1053
|
+
sharedMortgage String
|
|
1054
|
+
remainingTerm String?
|
|
1055
|
+
startDate String
|
|
1056
|
+
outstandingBalance Decimal
|
|
1057
|
+
monthlyPayment Decimal
|
|
1058
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1059
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1060
|
+
|
|
1061
|
+
// Relations
|
|
1062
|
+
applicant Applicant @relation("ApplicantUnsecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1063
|
+
|
|
1064
|
+
@@map("applicant_unsecured_loan_commitments")
|
|
1058
1065
|
}
|
|
1059
1066
|
|
|
1060
1067
|
// From prisma/applications/application-audit.prisma
|
|
1061
1068
|
model ApplicationAudit {
|
|
1062
|
-
id
|
|
1063
|
-
auditId
|
|
1064
|
-
accountId
|
|
1069
|
+
id String @id @default(uuid())
|
|
1070
|
+
auditId String @map("audit_id")
|
|
1071
|
+
accountId String @map("account_id")
|
|
1065
1072
|
auditCorrelationId String @map("audit_correlation_id")
|
|
1066
|
-
auditDate
|
|
1067
|
-
changeType
|
|
1068
|
-
applicationId
|
|
1069
|
-
name
|
|
1070
|
-
oldValue
|
|
1071
|
-
newValue
|
|
1072
|
-
createdAt
|
|
1073
|
-
updatedAt
|
|
1073
|
+
auditDate DateTime @map("audit_date")
|
|
1074
|
+
changeType String @map("change_type")
|
|
1075
|
+
applicationId String @map("application_id")
|
|
1076
|
+
name String
|
|
1077
|
+
oldValue String @map("old_value")
|
|
1078
|
+
newValue String @map("new_value")
|
|
1079
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1080
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1074
1081
|
|
|
1075
1082
|
// Relations
|
|
1076
|
-
application
|
|
1083
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1077
1084
|
|
|
1078
1085
|
@@map("application_audits")
|
|
1079
1086
|
}
|
|
1080
1087
|
|
|
1081
1088
|
// From prisma/applications/application-company.prisma
|
|
1082
1089
|
model ApplicationCompany {
|
|
1083
|
-
id
|
|
1084
|
-
applicationId
|
|
1090
|
+
id String @id @default(uuid())
|
|
1091
|
+
applicationId String @unique @map("application_id")
|
|
1085
1092
|
name String
|
|
1086
1093
|
registrationNumber String? @map("registration_number")
|
|
1087
|
-
createdAt
|
|
1088
|
-
updatedAt
|
|
1094
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1095
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1089
1096
|
|
|
1090
1097
|
// Relations
|
|
1091
|
-
application
|
|
1098
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1092
1099
|
|
|
1093
1100
|
@@map("application_companies")
|
|
1094
1101
|
}
|
|
1095
1102
|
|
|
1096
1103
|
// From prisma/applications/application-credit-profile.prisma
|
|
1097
1104
|
model ApplicationCreditProfile {
|
|
1098
|
-
id
|
|
1105
|
+
id String @id @default(uuid())
|
|
1099
1106
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
1100
|
-
bankruptcyNo
|
|
1101
|
-
ccjInLastThreeYearNo
|
|
1102
|
-
defaultsInLastYearNo
|
|
1103
|
-
applicationId
|
|
1104
|
-
createdAt
|
|
1105
|
-
updatedAt
|
|
1107
|
+
bankruptcyNo String @map("bankruptcy_no")
|
|
1108
|
+
ccjInLastThreeYearNo String @map("ccj_in_last_three_year_no")
|
|
1109
|
+
defaultsInLastYearNo String @map("defaults_in_last_year_no")
|
|
1110
|
+
applicationId String @unique @map("application_id")
|
|
1111
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1112
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1106
1113
|
|
|
1107
1114
|
// Relations
|
|
1108
|
-
application
|
|
1115
|
+
application Application @relation("ApplicationCreditProfile", fields: [applicationId], references: [id])
|
|
1109
1116
|
|
|
1110
1117
|
@@map("application_credit_profiles")
|
|
1111
1118
|
}
|
|
1112
1119
|
|
|
1113
1120
|
// From prisma/applications/application-direct-debit.prisma
|
|
1114
1121
|
model ApplicationDirectDebit {
|
|
1115
|
-
id
|
|
1116
|
-
applicationId
|
|
1117
|
-
accountNumber
|
|
1118
|
-
sortCode
|
|
1119
|
-
createdAt
|
|
1120
|
-
updatedAt
|
|
1122
|
+
id String @id @default(uuid())
|
|
1123
|
+
applicationId String @unique @map("application_id")
|
|
1124
|
+
accountNumber String @map("account_number")
|
|
1125
|
+
sortCode String @map("sort_code")
|
|
1126
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1127
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1121
1128
|
|
|
1122
1129
|
// Relations
|
|
1123
|
-
application
|
|
1130
|
+
application Application @relation("ApplicationDirectDebit", fields: [applicationId], references: [id])
|
|
1124
1131
|
|
|
1125
1132
|
@@map("application_direct_debits")
|
|
1126
1133
|
}
|
|
1127
1134
|
|
|
1128
1135
|
// From prisma/applications/application-document.prisma
|
|
1129
1136
|
model ApplicationDocument {
|
|
1130
|
-
id
|
|
1131
|
-
applicationId
|
|
1132
|
-
documentId
|
|
1133
|
-
owningEntityId
|
|
1134
|
-
documentTypeLid
|
|
1135
|
-
documentTypeId
|
|
1136
|
-
fileName
|
|
1137
|
-
contentType
|
|
1138
|
-
created
|
|
1139
|
-
createdBy
|
|
1140
|
-
isGenerated
|
|
1141
|
-
data
|
|
1142
|
-
envelopeId
|
|
1143
|
-
signers
|
|
1144
|
-
documentTypeDisplayName String?
|
|
1145
|
-
documentTypeValue
|
|
1146
|
-
documentTypeData
|
|
1147
|
-
documentUrl
|
|
1148
|
-
createdAt
|
|
1149
|
-
updatedAt
|
|
1137
|
+
id String @id @default(uuid())
|
|
1138
|
+
applicationId String? @map("application_id")
|
|
1139
|
+
documentId String @map("document_id")
|
|
1140
|
+
owningEntityId String? @map("owning_entity_id")
|
|
1141
|
+
documentTypeLid String? @map("document_type_lid")
|
|
1142
|
+
documentTypeId String? @map("document_type_id")
|
|
1143
|
+
fileName String? @map("file_name")
|
|
1144
|
+
contentType String? @map("content_type")
|
|
1145
|
+
created String? @map("created")
|
|
1146
|
+
createdBy String? @map("created_by")
|
|
1147
|
+
isGenerated String? @map("is_generated")
|
|
1148
|
+
data String? @map("data")
|
|
1149
|
+
envelopeId String? @map("envelope_id")
|
|
1150
|
+
signers Json @default("[]") @map("signers")
|
|
1151
|
+
documentTypeDisplayName String? @map("document_type_display_name")
|
|
1152
|
+
documentTypeValue String? @map("document_type_value")
|
|
1153
|
+
documentTypeData Json? @map("document_type_data")
|
|
1154
|
+
documentUrl String? @map("document_url")
|
|
1155
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1156
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1150
1157
|
|
|
1151
1158
|
// Relations
|
|
1152
|
-
application
|
|
1153
|
-
documentType
|
|
1159
|
+
application Application? @relation(fields: [applicationId], references: [id])
|
|
1160
|
+
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1154
1161
|
|
|
1155
1162
|
@@map("application_documents")
|
|
1156
1163
|
}
|
|
1157
1164
|
|
|
1158
1165
|
// From prisma/applications/application-fieldconfig.prisma
|
|
1159
1166
|
model ApplicationFieldConfig {
|
|
1160
|
-
id
|
|
1161
|
-
fieldName
|
|
1167
|
+
id String @id @default(uuid())
|
|
1168
|
+
fieldName String @unique @map("field_name")
|
|
1162
1169
|
validateProductOnChange String @default("true") @map("validate_product_on_change")
|
|
1163
|
-
createdAt
|
|
1164
|
-
updatedAt
|
|
1170
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1171
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1165
1172
|
|
|
1166
1173
|
@@map("application_field_configs")
|
|
1167
1174
|
}
|
|
1168
1175
|
|
|
1169
1176
|
// From prisma/applications/application-illustration.prisma
|
|
1170
1177
|
model ApplicationIllustration {
|
|
1171
|
-
id String
|
|
1172
|
-
date DateTime
|
|
1173
|
-
createdAt DateTime
|
|
1174
|
-
updatedAt DateTime
|
|
1178
|
+
id String @id @default(uuid())
|
|
1179
|
+
date DateTime @map("date")
|
|
1180
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1181
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1175
1182
|
|
|
1176
1183
|
@@map("application_illustrations")
|
|
1177
1184
|
}
|
|
1178
1185
|
|
|
1179
1186
|
// From prisma/applications/application-legal.prisma
|
|
1180
1187
|
model ApplicationLegal {
|
|
1181
|
-
id String
|
|
1182
|
-
assignedSolicitor String
|
|
1183
|
-
solicitorsReference String
|
|
1184
|
-
createdAt DateTime
|
|
1185
|
-
updatedAt DateTime
|
|
1188
|
+
id String @id @default(uuid())
|
|
1189
|
+
assignedSolicitor String @default("") @map("assigned_solicitor")
|
|
1190
|
+
solicitorsReference String @default("") @map("solicitors_reference")
|
|
1191
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1192
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1186
1193
|
|
|
1187
1194
|
@@map("application_legals")
|
|
1188
1195
|
}
|
|
1189
1196
|
|
|
1190
1197
|
// From prisma/applications/application-mortgage.prisma
|
|
1191
1198
|
model ApplicationMortgage {
|
|
1192
|
-
id
|
|
1193
|
-
applicationId
|
|
1194
|
-
pageValidFlag
|
|
1195
|
-
existingMortgageLender
|
|
1196
|
-
topSlicing
|
|
1197
|
-
purposeOfMortgage
|
|
1198
|
-
depositComeFromLids
|
|
1199
|
-
ifOtherDetails
|
|
1200
|
-
purchasePrice
|
|
1201
|
-
repaymentTypeLid
|
|
1202
|
-
exitStrategyLid
|
|
1203
|
-
isCapitalRaise
|
|
1204
|
-
purchaseDate
|
|
1205
|
-
estimatedValue
|
|
1206
|
-
loanRequired
|
|
1207
|
-
monthlyRentalIncome
|
|
1208
|
-
outstandingBalance
|
|
1209
|
-
fundRaisedFor
|
|
1210
|
-
sourceOfFundsLid
|
|
1211
|
-
sourceOfFundDetails
|
|
1212
|
-
propertyValuationDetails
|
|
1213
|
-
telephoneNumber
|
|
1214
|
-
isDistressedSale
|
|
1215
|
-
isPurchasedBelowMarketValue Boolean
|
|
1216
|
-
isPurchasedAsSale
|
|
1217
|
-
isReadyToSell
|
|
1218
|
-
isGovernmentInitiative
|
|
1219
|
-
vendorsName
|
|
1220
|
-
saleMadeLid
|
|
1221
|
-
isTheIntentionToLet
|
|
1222
|
-
proposedTenantsLids
|
|
1223
|
-
leaseTypeLid
|
|
1224
|
-
createdAt
|
|
1225
|
-
updatedAt
|
|
1199
|
+
id String @id @default(uuid())
|
|
1200
|
+
applicationId String @unique @map("application_id")
|
|
1201
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
1202
|
+
existingMortgageLender String? @map("existing_mortgage_lender")
|
|
1203
|
+
topSlicing Boolean @default(false) @map("top_slicing")
|
|
1204
|
+
purposeOfMortgage String @map("purpose_of_mortgage")
|
|
1205
|
+
depositComeFromLids String[] @map("deposit_come_from_lids")
|
|
1206
|
+
ifOtherDetails String @map("if_other_details")
|
|
1207
|
+
purchasePrice Decimal @map("purchase_price")
|
|
1208
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1209
|
+
exitStrategyLid String @map("exit_strategy_lid")
|
|
1210
|
+
isCapitalRaise Boolean @default(false) @map("is_capital_raise")
|
|
1211
|
+
purchaseDate String @map("purchase_date")
|
|
1212
|
+
estimatedValue Decimal @map("estimated_value")
|
|
1213
|
+
loanRequired Decimal @map("loan_required")
|
|
1214
|
+
monthlyRentalIncome Decimal @map("monthly_rental_income")
|
|
1215
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
1216
|
+
fundRaisedFor String @map("fund_raised_for")
|
|
1217
|
+
sourceOfFundsLid String @map("source_of_funds_lid")
|
|
1218
|
+
sourceOfFundDetails String @map("source_of_fund_details")
|
|
1219
|
+
propertyValuationDetails String @map("property_valuation_details")
|
|
1220
|
+
telephoneNumber String @map("telephone_number")
|
|
1221
|
+
isDistressedSale Boolean @default(false) @map("is_distressed_sale")
|
|
1222
|
+
isPurchasedBelowMarketValue Boolean @default(false) @map("is_purchased_below_market_value")
|
|
1223
|
+
isPurchasedAsSale Boolean @default(false) @map("is_purchased_as_sale")
|
|
1224
|
+
isReadyToSell Boolean @default(false) @map("is_ready_to_sell")
|
|
1225
|
+
isGovernmentInitiative Boolean @default(false) @map("is_government_initiative")
|
|
1226
|
+
vendorsName String? @map("vendors_name")
|
|
1227
|
+
saleMadeLid String? @map("sale_made_lid")
|
|
1228
|
+
isTheIntentionToLet Boolean @default(false) @map("is_the_intention_to_let")
|
|
1229
|
+
proposedTenantsLids String[] @map("proposed_tenants_lids")
|
|
1230
|
+
leaseTypeLid String @map("lease_type_lid")
|
|
1231
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1232
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1226
1233
|
|
|
1227
1234
|
// Relations
|
|
1228
|
-
application
|
|
1229
|
-
repaymentType
|
|
1230
|
-
exitStrategy
|
|
1231
|
-
sourceOfFunds
|
|
1232
|
-
saleMade
|
|
1233
|
-
leaseType
|
|
1234
|
-
depositComeFrom
|
|
1235
|
-
proposedTenants
|
|
1235
|
+
application Application @relation("ApplicationMortgage", fields: [applicationId], references: [id])
|
|
1236
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1237
|
+
exitStrategy Lookup @relation("ExitStrategy", fields: [exitStrategyLid], references: [id])
|
|
1238
|
+
sourceOfFunds Lookup @relation("SourceOfFunds", fields: [sourceOfFundsLid], references: [id])
|
|
1239
|
+
saleMade Lookup? @relation("SaleMade", fields: [saleMadeLid], references: [id])
|
|
1240
|
+
leaseType Lookup @relation("LeaseType", fields: [leaseTypeLid], references: [id])
|
|
1241
|
+
depositComeFrom Lookup[] @relation("DepositComeFrom")
|
|
1242
|
+
proposedTenants Lookup[] @relation("ProposedTenants")
|
|
1236
1243
|
|
|
1237
1244
|
@@map("application_mortgages")
|
|
1238
1245
|
}
|
|
1239
1246
|
|
|
1240
1247
|
// From prisma/applications/application-note.prisma
|
|
1241
1248
|
model ApplicationNote {
|
|
1242
|
-
id
|
|
1243
|
-
applicationId
|
|
1244
|
-
noteId
|
|
1245
|
-
createdOn
|
|
1246
|
-
createdBy
|
|
1247
|
-
username
|
|
1248
|
-
createdByUserId
|
|
1249
|
-
typeLid
|
|
1250
|
-
subTypeLid
|
|
1251
|
-
subject
|
|
1252
|
-
note
|
|
1253
|
-
reminderDate
|
|
1249
|
+
id String @id @default(uuid())
|
|
1250
|
+
applicationId String @map("application_id")
|
|
1251
|
+
noteId String? @map("note_id")
|
|
1252
|
+
createdOn String? @map("created_on")
|
|
1253
|
+
createdBy String? @map("created_by")
|
|
1254
|
+
username String? @map("username")
|
|
1255
|
+
createdByUserId String? @map("created_by_user_id")
|
|
1256
|
+
typeLid String? @map("type_lid")
|
|
1257
|
+
subTypeLid String? @map("sub_type_lid")
|
|
1258
|
+
subject String? @map("subject")
|
|
1259
|
+
note String @map("note")
|
|
1260
|
+
reminderDate String? @map("reminder_date")
|
|
1254
1261
|
attachmentDocumentId String? @map("attachment_document_id")
|
|
1255
|
-
assignedOperation
|
|
1256
|
-
autoCreated
|
|
1257
|
-
additionalData
|
|
1258
|
-
autoCreatedId
|
|
1259
|
-
assignedTo
|
|
1260
|
-
assignedBy
|
|
1261
|
-
assignedByUserId
|
|
1262
|
-
comment
|
|
1263
|
-
reminderStatus
|
|
1264
|
-
createdAt
|
|
1265
|
-
updatedAt
|
|
1262
|
+
assignedOperation String @default("") @map("assigned_operation")
|
|
1263
|
+
autoCreated String @default("false") @map("auto_created")
|
|
1264
|
+
additionalData Json? @map("additional_data")
|
|
1265
|
+
autoCreatedId String? @map("auto_created_id")
|
|
1266
|
+
assignedTo String @default("") @map("assigned_to")
|
|
1267
|
+
assignedBy String? @map("assigned_by")
|
|
1268
|
+
assignedByUserId String? @map("assigned_by_user_id")
|
|
1269
|
+
comment String? @map("comment")
|
|
1270
|
+
reminderStatus String @default("None") @map("reminder_status")
|
|
1271
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1272
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1266
1273
|
|
|
1267
1274
|
// Relations
|
|
1268
|
-
application
|
|
1269
|
-
type
|
|
1270
|
-
subType
|
|
1271
|
-
createdByUser
|
|
1272
|
-
assignedByUser
|
|
1275
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1276
|
+
type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
|
|
1277
|
+
subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
|
|
1278
|
+
createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
|
|
1279
|
+
assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
|
|
1273
1280
|
|
|
1274
1281
|
@@map("application_notes")
|
|
1275
1282
|
}
|
|
1276
1283
|
|
|
1277
1284
|
// From prisma/applications/application-offer.prisma
|
|
1278
1285
|
model ApplicationOffer {
|
|
1279
|
-
id String
|
|
1280
|
-
date String
|
|
1281
|
-
createdAt DateTime
|
|
1282
|
-
updatedAt DateTime
|
|
1286
|
+
id String @id @default(uuid())
|
|
1287
|
+
date String @map("date")
|
|
1288
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1289
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1283
1290
|
|
|
1284
1291
|
@@map("application_offers")
|
|
1285
1292
|
}
|
|
1286
1293
|
|
|
1287
1294
|
// From prisma/applications/application-onboarding.prisma
|
|
1288
1295
|
model ApplicationOnboarding {
|
|
1289
|
-
id
|
|
1290
|
-
errors
|
|
1291
|
-
status
|
|
1292
|
-
statusDate
|
|
1293
|
-
warnings
|
|
1294
|
-
createdAt
|
|
1295
|
-
updatedAt
|
|
1296
|
+
id String @id @default(uuid())
|
|
1297
|
+
errors String @default("")
|
|
1298
|
+
status String @default("")
|
|
1299
|
+
statusDate String?
|
|
1300
|
+
warnings String @default("")
|
|
1301
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1302
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1296
1303
|
|
|
1297
1304
|
@@map("application_onboardings")
|
|
1298
1305
|
}
|
|
1299
1306
|
|
|
1300
1307
|
// From prisma/applications/application-product.prisma
|
|
1301
1308
|
model ApplicationProduct {
|
|
1302
|
-
id
|
|
1303
|
-
applicationId
|
|
1304
|
-
selectedProduct
|
|
1305
|
-
lendingTypeLid
|
|
1306
|
-
pageValidFlag
|
|
1307
|
-
repaymentTypeLid
|
|
1308
|
-
numberOfYearsToRepay
|
|
1309
|
-
repaymentVehicle
|
|
1310
|
-
fixedAmount
|
|
1309
|
+
id String @id @default(uuid())
|
|
1310
|
+
applicationId String @map("application_id")
|
|
1311
|
+
selectedProduct String @default("") @map("selected_product")
|
|
1312
|
+
lendingTypeLid String? @map("lending_type_lid")
|
|
1313
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
1314
|
+
repaymentTypeLid String? @map("repayment_type_lid")
|
|
1315
|
+
numberOfYearsToRepay Int @default(0) @map("number_of_years_to_repay")
|
|
1316
|
+
repaymentVehicle String @map("repayment_vehicle")
|
|
1317
|
+
fixedAmount Decimal @default(0.00) @map("fixed_amount")
|
|
1311
1318
|
isFinanceRecommendedToApplicantLid String? @map("is_finance_recommended_to_applicant_lid")
|
|
1312
|
-
procFeeRateLid
|
|
1313
|
-
networkClubSubmission
|
|
1314
|
-
clubNetworkNameLid
|
|
1315
|
-
introducerSubmission
|
|
1316
|
-
introducer
|
|
1317
|
-
bdm
|
|
1318
|
-
tempAppFee
|
|
1319
|
-
productFeePaymentTypeLid
|
|
1320
|
-
createdAt
|
|
1321
|
-
updatedAt
|
|
1319
|
+
procFeeRateLid String? @map("proc_fee_rate_lid")
|
|
1320
|
+
networkClubSubmission Boolean @default(false) @map("network_club_submission")
|
|
1321
|
+
clubNetworkNameLid String? @map("club_network_name_lid")
|
|
1322
|
+
introducerSubmission Boolean @default(false) @map("introducer_submission")
|
|
1323
|
+
introducer String @default("") @map("introducer")
|
|
1324
|
+
bdm String @map("bdm")
|
|
1325
|
+
tempAppFee Decimal @default(0.00) @map("temp_app_fee")
|
|
1326
|
+
productFeePaymentTypeLid String? @map("product_fee_payment_type_lid")
|
|
1327
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1328
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1322
1329
|
|
|
1323
1330
|
// Relations
|
|
1324
|
-
application
|
|
1325
|
-
lendingType
|
|
1326
|
-
repaymentType
|
|
1327
|
-
isFinanceRecommendedToApplicant
|
|
1328
|
-
procFeeRate
|
|
1329
|
-
clubNetworkName
|
|
1330
|
-
productFeePaymentType
|
|
1331
|
+
application Application @relation("ApplicationProducts", fields: [applicationId], references: [id])
|
|
1332
|
+
lendingType Lookup? @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
1333
|
+
repaymentType Lookup? @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1334
|
+
isFinanceRecommendedToApplicant Lookup? @relation("FinanceRecommended", fields: [isFinanceRecommendedToApplicantLid], references: [id])
|
|
1335
|
+
procFeeRate Lookup? @relation("ProcFeeRate", fields: [procFeeRateLid], references: [id])
|
|
1336
|
+
clubNetworkName Lookup? @relation("ClubNetworkName", fields: [clubNetworkNameLid], references: [id])
|
|
1337
|
+
productFeePaymentType Lookup? @relation("ProductFeePaymentType", fields: [productFeePaymentTypeLid], references: [id])
|
|
1331
1338
|
|
|
1332
1339
|
@@map("application_products")
|
|
1333
1340
|
}
|
|
1334
1341
|
|
|
1335
1342
|
// From prisma/applications/application-rationale.prisma
|
|
1336
1343
|
model ApplicationRationale {
|
|
1337
|
-
id String
|
|
1338
|
-
applicationId String
|
|
1339
|
-
affordabilityDescription String
|
|
1340
|
-
affordabilityAreaOfOfferCondition String
|
|
1341
|
-
affordabilityAreaOfConcern String
|
|
1342
|
-
affordabilityStatusLid String?
|
|
1343
|
-
applicantsDescription String
|
|
1344
|
-
applicantsAreaOfOfferCondition String
|
|
1345
|
-
applicantsAreaOfConcern String
|
|
1346
|
-
applicantsStatusLid String?
|
|
1347
|
-
creditConductDescription String
|
|
1348
|
-
creditConductAreaOfOfferCondition String
|
|
1349
|
-
creditConductAreaOfConcern String
|
|
1350
|
-
creditConductStatusLid String?
|
|
1351
|
-
fraudCheckDescription String
|
|
1352
|
-
fraudCheckAreaOfOfferCondition String
|
|
1353
|
-
fraudCheckAreaOfConcern String
|
|
1354
|
-
fraudCheckStatusLid String?
|
|
1355
|
-
incomeSourceDescription String
|
|
1356
|
-
incomeSourceAreaOfOfferCondition String
|
|
1357
|
-
incomeSourceAreaOfConcern String
|
|
1358
|
-
incomeSourceStatusLid String?
|
|
1359
|
-
loanDescription String
|
|
1360
|
-
loanAreaOfOfferCondition String
|
|
1361
|
-
loanAreaOfConcern String
|
|
1362
|
-
loanStatusLid String?
|
|
1363
|
-
securityDescription String
|
|
1364
|
-
securityAreaOfOfferCondition String
|
|
1365
|
-
securityAreaOfConcern String
|
|
1366
|
-
securityStatusLid String?
|
|
1367
|
-
propertyDescription String
|
|
1368
|
-
propertyAreaOfOfferCondition String
|
|
1369
|
-
propertyAreaOfConcern String
|
|
1370
|
-
propertyStatusLid String?
|
|
1371
|
-
createdAt DateTime
|
|
1372
|
-
updatedAt DateTime
|
|
1344
|
+
id String @id @default(uuid())
|
|
1345
|
+
applicationId String @unique @map("application_id")
|
|
1346
|
+
affordabilityDescription String @default("") @map("affordability_description")
|
|
1347
|
+
affordabilityAreaOfOfferCondition String @default("") @map("affordability_area_of_offer_condition")
|
|
1348
|
+
affordabilityAreaOfConcern String @default("") @map("affordability_area_of_concern")
|
|
1349
|
+
affordabilityStatusLid String? @map("affordability_status_lid")
|
|
1350
|
+
applicantsDescription String @default("") @map("applicants_description")
|
|
1351
|
+
applicantsAreaOfOfferCondition String @default("") @map("applicants_area_of_offer_condition")
|
|
1352
|
+
applicantsAreaOfConcern String @default("") @map("applicants_area_of_concern")
|
|
1353
|
+
applicantsStatusLid String? @map("applicants_status_lid")
|
|
1354
|
+
creditConductDescription String @default("") @map("credit_conduct_description")
|
|
1355
|
+
creditConductAreaOfOfferCondition String @default("") @map("credit_conduct_area_of_offer_condition")
|
|
1356
|
+
creditConductAreaOfConcern String @default("") @map("credit_conduct_area_of_concern")
|
|
1357
|
+
creditConductStatusLid String? @map("credit_conduct_status_lid")
|
|
1358
|
+
fraudCheckDescription String @default("") @map("fraud_check_description")
|
|
1359
|
+
fraudCheckAreaOfOfferCondition String @default("") @map("fraud_check_area_of_offer_condition")
|
|
1360
|
+
fraudCheckAreaOfConcern String @default("") @map("fraud_check_area_of_concern")
|
|
1361
|
+
fraudCheckStatusLid String? @map("fraud_check_status_lid")
|
|
1362
|
+
incomeSourceDescription String @default("") @map("income_source_description")
|
|
1363
|
+
incomeSourceAreaOfOfferCondition String @default("") @map("income_source_area_of_offer_condition")
|
|
1364
|
+
incomeSourceAreaOfConcern String @default("") @map("income_source_area_of_concern")
|
|
1365
|
+
incomeSourceStatusLid String? @map("income_source_status_lid")
|
|
1366
|
+
loanDescription String @default("") @map("loan_description")
|
|
1367
|
+
loanAreaOfOfferCondition String @default("") @map("loan_area_of_offer_condition")
|
|
1368
|
+
loanAreaOfConcern String @default("") @map("loan_area_of_concern")
|
|
1369
|
+
loanStatusLid String? @map("loan_status_lid")
|
|
1370
|
+
securityDescription String @default("") @map("security_description")
|
|
1371
|
+
securityAreaOfOfferCondition String @default("") @map("security_area_of_offer_condition")
|
|
1372
|
+
securityAreaOfConcern String @default("") @map("security_area_of_concern")
|
|
1373
|
+
securityStatusLid String? @map("security_status_lid")
|
|
1374
|
+
propertyDescription String @default("") @map("property_description")
|
|
1375
|
+
propertyAreaOfOfferCondition String @default("") @map("property_area_of_offer_condition")
|
|
1376
|
+
propertyAreaOfConcern String @default("") @map("property_area_of_concern")
|
|
1377
|
+
propertyStatusLid String? @map("property_status_lid")
|
|
1378
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1379
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1373
1380
|
|
|
1374
1381
|
// Relations
|
|
1375
|
-
application
|
|
1376
|
-
affordabilityStatus
|
|
1377
|
-
applicantsStatus
|
|
1378
|
-
creditConductStatus
|
|
1379
|
-
fraudCheckStatus
|
|
1380
|
-
incomeSourceStatus
|
|
1381
|
-
loanStatus
|
|
1382
|
-
securityStatus
|
|
1383
|
-
propertyStatus
|
|
1382
|
+
application Application @relation("ApplicationRationale", fields: [applicationId], references: [id])
|
|
1383
|
+
affordabilityStatus Lookup? @relation("AffordabilityStatus", fields: [affordabilityStatusLid], references: [id])
|
|
1384
|
+
applicantsStatus Lookup? @relation("ApplicantsStatus", fields: [applicantsStatusLid], references: [id])
|
|
1385
|
+
creditConductStatus Lookup? @relation("CreditConductStatus", fields: [creditConductStatusLid], references: [id])
|
|
1386
|
+
fraudCheckStatus Lookup? @relation("FraudCheckStatus", fields: [fraudCheckStatusLid], references: [id])
|
|
1387
|
+
incomeSourceStatus Lookup? @relation("IncomeSourceStatus", fields: [incomeSourceStatusLid], references: [id])
|
|
1388
|
+
loanStatus Lookup? @relation("LoanStatus", fields: [loanStatusLid], references: [id])
|
|
1389
|
+
securityStatus Lookup? @relation("SecurityStatus", fields: [securityStatusLid], references: [id])
|
|
1390
|
+
propertyStatus Lookup? @relation("PropertyStatus", fields: [propertyStatusLid], references: [id])
|
|
1384
1391
|
|
|
1385
1392
|
@@map("application_rationales")
|
|
1386
1393
|
}
|
|
1387
1394
|
|
|
1388
1395
|
// From prisma/applications/application.prisma
|
|
1389
1396
|
model Application {
|
|
1390
|
-
id
|
|
1391
|
-
queueId
|
|
1392
|
-
assignedToUserId
|
|
1393
|
-
applicationId
|
|
1394
|
-
isApplicationFeePaid
|
|
1395
|
-
applicationNumber
|
|
1396
|
-
applicationTypeLid
|
|
1397
|
-
bankSolicitor
|
|
1398
|
-
brokerId
|
|
1399
|
-
caseManager
|
|
1400
|
-
caseManagerAccepted
|
|
1401
|
-
completedReason
|
|
1402
|
-
isIntendToOccupy
|
|
1403
|
-
introducer
|
|
1404
|
-
isIntroducerSubmission
|
|
1405
|
-
isBrokerAssigned
|
|
1406
|
-
isFinanceRecommendedToApplicant
|
|
1407
|
-
isWorkflowTaskCreated
|
|
1408
|
-
lastUpdated
|
|
1409
|
-
lendingTypeLid
|
|
1410
|
-
networkClubName
|
|
1411
|
-
isNetworkClubSubmission
|
|
1412
|
-
newReason
|
|
1413
|
-
purchaseTypeLid
|
|
1414
|
-
rejectedReason
|
|
1415
|
-
repaymentTypeLid
|
|
1416
|
-
selectedProduct
|
|
1417
|
-
sourceOfWealthLids
|
|
1418
|
-
sowBusiness
|
|
1419
|
-
sowInheritance
|
|
1420
|
-
sowOther
|
|
1421
|
-
sowProperty
|
|
1422
|
-
sowSalary
|
|
1423
|
-
statusLid
|
|
1424
|
-
submitReason
|
|
1425
|
-
submittedDate
|
|
1426
|
-
underwriter
|
|
1427
|
-
isValuationFeePaid
|
|
1428
|
-
withdrawalReason
|
|
1429
|
-
withdrawalReasonCode
|
|
1430
|
-
productId
|
|
1431
|
-
securityId
|
|
1432
|
-
solicitorId
|
|
1433
|
-
isActive
|
|
1434
|
-
isUkResident
|
|
1435
|
-
riskRating
|
|
1436
|
-
directDebitId
|
|
1437
|
-
mortgageId
|
|
1438
|
-
companyId
|
|
1439
|
-
rationaleId
|
|
1440
|
-
newAuditRecordsCount
|
|
1441
|
-
currentApprivoAuditId
|
|
1442
|
-
propertyIds
|
|
1443
|
-
createdAt
|
|
1444
|
-
updatedAt
|
|
1445
|
-
pageValidFlag
|
|
1446
|
-
applicationStatusLid
|
|
1447
|
-
applicationSubTypeLid
|
|
1448
|
-
applicationSubTypeOther
|
|
1449
|
-
applicationSubTypeOtherDetails
|
|
1450
|
-
applicationSubTypeOtherLid
|
|
1451
|
-
applicationSubTypeOtherLidDetails
|
|
1452
|
-
applicationSubTypeOtherLidOther
|
|
1453
|
-
applicationSubTypeOtherLidOtherDetails String?
|
|
1397
|
+
id String @id @default(uuid())
|
|
1398
|
+
queueId String[] @map("queue_id")
|
|
1399
|
+
assignedToUserId String? @map("assigned_to_user_id")
|
|
1400
|
+
applicationId String @unique @map("application_id")
|
|
1401
|
+
isApplicationFeePaid String @map("is_application_fee_paid")
|
|
1402
|
+
applicationNumber String @map("application_number")
|
|
1403
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1404
|
+
bankSolicitor String @default("") @map("bank_solicitor")
|
|
1405
|
+
brokerId String @map("broker_id")
|
|
1406
|
+
caseManager String @default("") @map("case_manager")
|
|
1407
|
+
caseManagerAccepted String @default("false") @map("case_manager_accepted")
|
|
1408
|
+
completedReason String @default("") @map("completed_reason")
|
|
1409
|
+
isIntendToOccupy String @map("is_intend_to_occupy")
|
|
1410
|
+
introducer String @default("") @map("introducer")
|
|
1411
|
+
isIntroducerSubmission String @map("is_introducer_submission")
|
|
1412
|
+
isBrokerAssigned String @default("false") @map("is_broker_assigned")
|
|
1413
|
+
isFinanceRecommendedToApplicant String @map("is_finance_recommended_to_applicant")
|
|
1414
|
+
isWorkflowTaskCreated String @map("is_workflow_task_created")
|
|
1415
|
+
lastUpdated String? @map("last_updated")
|
|
1416
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
1417
|
+
networkClubName String @default("") @map("network_club_name")
|
|
1418
|
+
isNetworkClubSubmission String @map("is_network_club_submission")
|
|
1419
|
+
newReason String @default("") @map("new_reason")
|
|
1420
|
+
purchaseTypeLid String @map("purchase_type_lid")
|
|
1421
|
+
rejectedReason String @default("") @map("rejected_reason")
|
|
1422
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1423
|
+
selectedProduct String? @map("selected_product")
|
|
1424
|
+
sourceOfWealthLids String[] @map("source_of_wealth_lids")
|
|
1425
|
+
sowBusiness String @default("") @map("sow_business")
|
|
1426
|
+
sowInheritance String @default("") @map("sow_inheritance")
|
|
1427
|
+
sowOther String @default("") @map("sow_other")
|
|
1428
|
+
sowProperty String @default("") @map("sow_property")
|
|
1429
|
+
sowSalary String @default("") @map("sow_salary")
|
|
1430
|
+
statusLid String @map("status_lid")
|
|
1431
|
+
submitReason String @default("") @map("submit_reason")
|
|
1432
|
+
submittedDate String? @map("submitted_date")
|
|
1433
|
+
underwriter String @default("") @map("underwriter")
|
|
1434
|
+
isValuationFeePaid String @map("is_valuation_fee_paid")
|
|
1435
|
+
withdrawalReason String @default("") @map("withdrawal_reason")
|
|
1436
|
+
withdrawalReasonCode String @default("") @map("withdrawal_reason_code")
|
|
1437
|
+
productId String? @map("product_id")
|
|
1438
|
+
securityId String @unique @map("security_id")
|
|
1439
|
+
solicitorId String @unique @map("solicitor_id")
|
|
1440
|
+
isActive String @default("false") @map("is_active")
|
|
1441
|
+
isUkResident String @default("true") @map("is_uk_resident")
|
|
1442
|
+
riskRating String? @map("risk_rating")
|
|
1443
|
+
directDebitId String? @unique @map("direct_debit_id")
|
|
1444
|
+
mortgageId String? @unique @map("mortgage_id")
|
|
1445
|
+
companyId String? @unique @map("company_id")
|
|
1446
|
+
rationaleId String? @unique @map("rationale_id")
|
|
1447
|
+
newAuditRecordsCount String @default("0") @map("new_audit_records_count")
|
|
1448
|
+
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
1449
|
+
propertyIds String[] @map("property_ids")
|
|
1450
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1451
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1452
|
+
pageValidFlag Boolean @default(false)
|
|
1453
|
+
applicationStatusLid String @map("application_status_lid")
|
|
1454
|
+
applicationSubTypeLid String @map("application_sub_type_lid")
|
|
1455
|
+
applicationSubTypeOther String? @map("application_sub_type_other")
|
|
1456
|
+
applicationSubTypeOtherDetails String? @map("application_sub_type_other_details")
|
|
1457
|
+
applicationSubTypeOtherLid String? @map("application_sub_type_other_lid")
|
|
1458
|
+
applicationSubTypeOtherLidDetails String? @map("application_sub_type_other_lid_details")
|
|
1459
|
+
applicationSubTypeOtherLidOther String? @map("application_sub_type_other_lid_other")
|
|
1460
|
+
applicationSubTypeOtherLidOtherDetails String? @map("application_sub_type_other_lid_other_details")
|
|
1454
1461
|
|
|
1455
1462
|
// Relations
|
|
1456
|
-
broker
|
|
1457
|
-
security
|
|
1458
|
-
solicitor
|
|
1459
|
-
product
|
|
1460
|
-
directDebit
|
|
1463
|
+
broker Broker @relation("BrokerApplications", fields: [brokerId], references: [id])
|
|
1464
|
+
security Security?
|
|
1465
|
+
solicitor Solicitor?
|
|
1466
|
+
product Product? @relation(fields: [productId], references: [id])
|
|
1467
|
+
directDebit ApplicationDirectDebit? @relation("ApplicationDirectDebit")
|
|
1461
1468
|
creditProfile ApplicationCreditProfile? @relation("ApplicationCreditProfile")
|
|
1462
|
-
mortgage
|
|
1463
|
-
company
|
|
1464
|
-
rationale
|
|
1465
|
-
applicants
|
|
1466
|
-
properties
|
|
1467
|
-
documents
|
|
1468
|
-
notes
|
|
1469
|
-
audits
|
|
1470
|
-
underwriters
|
|
1471
|
-
status
|
|
1472
|
-
products
|
|
1473
|
-
companies
|
|
1474
|
-
|
|
1469
|
+
mortgage ApplicationMortgage? @relation("ApplicationMortgage")
|
|
1470
|
+
company ApplicationCompany? @relation("ApplicationCompany")
|
|
1471
|
+
rationale ApplicationRationale? @relation("ApplicationRationale")
|
|
1472
|
+
applicants Applicant[]
|
|
1473
|
+
properties Property[] @relation("ApplicationProperties")
|
|
1474
|
+
documents ApplicationDocument[]
|
|
1475
|
+
notes ApplicationNote[]
|
|
1476
|
+
audits ApplicationAudit[]
|
|
1477
|
+
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
1478
|
+
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
1479
|
+
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
1480
|
+
companies Company[] @relation("ApplicationCompany")
|
|
1481
|
+
|
|
1475
1482
|
// Lookup relations
|
|
1476
|
-
applicationType
|
|
1477
|
-
lendingType
|
|
1478
|
-
purchaseType
|
|
1479
|
-
repaymentType
|
|
1483
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1484
|
+
lendingType Lookup @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
1485
|
+
purchaseType Lookup @relation("PurchaseType", fields: [purchaseTypeLid], references: [id])
|
|
1486
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1480
1487
|
|
|
1481
|
-
@@map("applications")
|
|
1482
1488
|
@@index([applicationTypeLid])
|
|
1483
1489
|
@@index([lendingTypeLid])
|
|
1484
1490
|
@@index([purchaseTypeLid])
|
|
1485
1491
|
@@index([statusLid])
|
|
1486
1492
|
@@index([repaymentTypeLid])
|
|
1493
|
+
@@map("applications")
|
|
1487
1494
|
}
|
|
1488
1495
|
|
|
1489
1496
|
// From prisma/applications/broker.prisma
|
|
1490
1497
|
model Broker {
|
|
1491
|
-
id String
|
|
1492
|
-
brokerId String?
|
|
1493
|
-
landlinePhone String?
|
|
1494
|
-
mobileTelephone String?
|
|
1495
|
-
addressPostCode String?
|
|
1496
|
-
addressLine1 String?
|
|
1497
|
-
addressLine2 String?
|
|
1498
|
-
addressLine3 String?
|
|
1499
|
-
addressCity String?
|
|
1500
|
-
addressCountry String?
|
|
1501
|
-
tradingName String?
|
|
1502
|
-
fcaNumber String?
|
|
1503
|
-
brokerType String?
|
|
1504
|
-
email String?
|
|
1505
|
-
network String?
|
|
1506
|
-
firstName String?
|
|
1507
|
-
lastName String?
|
|
1508
|
-
createdAt DateTime
|
|
1509
|
-
updatedAt DateTime
|
|
1510
|
-
|
|
1498
|
+
id String @id @default(uuid())
|
|
1499
|
+
brokerId String? @map("broker_id")
|
|
1500
|
+
landlinePhone String? @map("landline_phone")
|
|
1501
|
+
mobileTelephone String? @map("mobile_telephone")
|
|
1502
|
+
addressPostCode String? @map("address_post_code")
|
|
1503
|
+
addressLine1 String? @map("address_line1")
|
|
1504
|
+
addressLine2 String? @map("address_line2")
|
|
1505
|
+
addressLine3 String? @map("address_line3")
|
|
1506
|
+
addressCity String? @map("address_city")
|
|
1507
|
+
addressCountry String? @map("address_country")
|
|
1508
|
+
tradingName String? @map("trading_name")
|
|
1509
|
+
fcaNumber String? @map("fca_number")
|
|
1510
|
+
brokerType String? @map("broker_type")
|
|
1511
|
+
email String? @map("email")
|
|
1512
|
+
network String? @map("network")
|
|
1513
|
+
firstName String? @map("first_name")
|
|
1514
|
+
lastName String? @map("last_name")
|
|
1515
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1516
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1517
|
+
|
|
1511
1518
|
// Relations
|
|
1512
1519
|
applications Application[] @relation("BrokerApplications")
|
|
1513
1520
|
|
|
1514
|
-
|
|
1515
1521
|
@@map("brokers")
|
|
1516
1522
|
}
|
|
1517
1523
|
|
|
1518
1524
|
// From prisma/applications/checklist-item.prisma
|
|
1519
1525
|
model ChecklistItem {
|
|
1520
|
-
id
|
|
1521
|
-
additionalOfferConditions
|
|
1522
|
-
appFormSignedNotes
|
|
1523
|
-
applicationCompletionDate
|
|
1524
|
-
buildingInsuranceInsurerName
|
|
1526
|
+
id String @id @default(uuid())
|
|
1527
|
+
additionalOfferConditions String @default("") @map("additional_offer_conditions")
|
|
1528
|
+
appFormSignedNotes String @default("") @map("app_form_signed_notes")
|
|
1529
|
+
applicationCompletionDate String? @map("application_completion_date")
|
|
1530
|
+
buildingInsuranceInsurerName String @default("") @map("building_insurance_insurer_name")
|
|
1525
1531
|
buildingInsurancePolicyNumber String @default("") @map("building_insurance_policy_number")
|
|
1526
|
-
buildingInsuranceReceived
|
|
1527
|
-
buildingInsuranceRenewalDate
|
|
1528
|
-
dateOfValuationReceived
|
|
1529
|
-
feePaidDocumentsDownloaded
|
|
1530
|
-
feePaidNotes
|
|
1531
|
-
fundsNotes
|
|
1532
|
-
fundsReleasedDate
|
|
1532
|
+
buildingInsuranceReceived String @default("") @map("building_insurance_received")
|
|
1533
|
+
buildingInsuranceRenewalDate String? @map("building_insurance_renewal_date")
|
|
1534
|
+
dateOfValuationReceived String? @map("date_of_valuation_received")
|
|
1535
|
+
feePaidDocumentsDownloaded String @default("") @map("fee_paid_documents_downloaded")
|
|
1536
|
+
feePaidNotes String @default("") @map("fee_paid_notes")
|
|
1537
|
+
fundsNotes String @default("") @map("funds_notes")
|
|
1538
|
+
fundsReleasedDate String? @map("funds_released_date")
|
|
1533
1539
|
hasAllDocsReviewedAndAccepted String @default("") @map("has_all_docs_reviewed_and_accepted")
|
|
1534
|
-
idnPorReceived
|
|
1535
|
-
legalCompletionDate
|
|
1536
|
-
legalDocsReceived
|
|
1537
|
-
legalNotes
|
|
1538
|
-
ninetyDaysValuationAmount
|
|
1539
|
-
offerConditionsItems
|
|
1540
|
-
offerConditionsMet
|
|
1541
|
-
offerNotes
|
|
1542
|
-
offerOfferPrepared
|
|
1543
|
-
offerOfferReviewed
|
|
1544
|
-
offerSignedNotes
|
|
1545
|
-
offerSolicitorInstructedDate
|
|
1546
|
-
packagingNotes
|
|
1547
|
-
preOfferNotes
|
|
1548
|
-
reinstatementAmount
|
|
1549
|
-
rotReceived
|
|
1550
|
-
rotReceivedDate
|
|
1551
|
-
salesContractReceived
|
|
1552
|
-
underwritingNotes
|
|
1553
|
-
underwritingValuationNotes
|
|
1554
|
-
valuationAccepted
|
|
1555
|
-
valuationFurtherConditions
|
|
1556
|
-
valuationNotes
|
|
1557
|
-
valuationReceived
|
|
1558
|
-
valuationRequestedDate
|
|
1559
|
-
valuationScheduledDate
|
|
1560
|
-
valuationSurveyorDetails
|
|
1561
|
-
createdAt
|
|
1562
|
-
updatedAt
|
|
1540
|
+
idnPorReceived String @default("") @map("idn_por_received")
|
|
1541
|
+
legalCompletionDate String? @map("legal_completion_date")
|
|
1542
|
+
legalDocsReceived String @default("") @map("legal_docs_received")
|
|
1543
|
+
legalNotes String @default("") @map("legal_notes")
|
|
1544
|
+
ninetyDaysValuationAmount String @default("") @map("ninety_days_valuation_amount")
|
|
1545
|
+
offerConditionsItems String @default("") @map("offer_conditions_items")
|
|
1546
|
+
offerConditionsMet String @default("") @map("offer_conditions_met")
|
|
1547
|
+
offerNotes String @default("") @map("offer_notes")
|
|
1548
|
+
offerOfferPrepared String @default("") @map("offer_offer_prepared")
|
|
1549
|
+
offerOfferReviewed String @default("") @map("offer_offer_reviewed")
|
|
1550
|
+
offerSignedNotes String @default("") @map("offer_signed_notes")
|
|
1551
|
+
offerSolicitorInstructedDate String? @map("offer_solicitor_instructed_date")
|
|
1552
|
+
packagingNotes String @default("") @map("packaging_notes")
|
|
1553
|
+
preOfferNotes String @default("") @map("pre_offer_notes")
|
|
1554
|
+
reinstatementAmount String @default("") @map("reinstatement_amount")
|
|
1555
|
+
rotReceived String @default("") @map("rot_received")
|
|
1556
|
+
rotReceivedDate String? @map("rot_received_date")
|
|
1557
|
+
salesContractReceived String @default("") @map("sales_contract_received")
|
|
1558
|
+
underwritingNotes String @default("") @map("underwriting_notes")
|
|
1559
|
+
underwritingValuationNotes String @default("") @map("underwriting_valuation_notes")
|
|
1560
|
+
valuationAccepted String? @map("valuation_accepted")
|
|
1561
|
+
valuationFurtherConditions String @default("") @map("valuation_further_conditions")
|
|
1562
|
+
valuationNotes String @default("") @map("valuation_notes")
|
|
1563
|
+
valuationReceived String? @map("valuation_received")
|
|
1564
|
+
valuationRequestedDate String? @map("valuation_requested_date")
|
|
1565
|
+
valuationScheduledDate String? @map("valuation_scheduled_date")
|
|
1566
|
+
valuationSurveyorDetails String @default("") @map("valuation_surveyor_details")
|
|
1567
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1568
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1563
1569
|
|
|
1564
1570
|
@@map("checklist_items")
|
|
1565
1571
|
}
|
|
1566
1572
|
|
|
1567
1573
|
// From prisma/applications/company.prisma
|
|
1568
1574
|
model Company {
|
|
1569
|
-
id
|
|
1570
|
-
applicationId
|
|
1571
|
-
pageValidFlag
|
|
1572
|
-
registeredName
|
|
1573
|
-
businessTypeLid
|
|
1574
|
-
registeredNumber
|
|
1575
|
-
taxJurisdictionLid
|
|
1576
|
-
tradingSince
|
|
1577
|
-
natureOfBusiness
|
|
1578
|
-
yearEnd
|
|
1579
|
-
addressPostCode
|
|
1580
|
-
addressLine1
|
|
1581
|
-
addressLine2
|
|
1582
|
-
addressLine3
|
|
1583
|
-
addressCity
|
|
1584
|
-
addressCountryLid
|
|
1585
|
-
applicationTypeLid
|
|
1586
|
-
yearEnd1
|
|
1587
|
-
turnoverYear1
|
|
1588
|
-
netProfitYear1
|
|
1589
|
-
yearEnd2
|
|
1590
|
-
turnoverYear2
|
|
1591
|
-
netProfitYear2
|
|
1592
|
-
yearEnd3
|
|
1593
|
-
turnoverYear3
|
|
1594
|
-
netProfitYear3
|
|
1595
|
-
companyCreditDefaults
|
|
1596
|
-
companyCountyCourtJudgment
|
|
1597
|
-
companySecuredArrears
|
|
1598
|
-
companyUnsecuredArrears
|
|
1599
|
-
companyBankruptcy
|
|
1600
|
-
companyBankruptcyYes
|
|
1601
|
-
companyBankruptcyNo
|
|
1602
|
-
companyCCJInLastThreeYearYes
|
|
1603
|
-
companyCCJInLastThreeYearNo
|
|
1604
|
-
companyDefaultsInLastYearYes
|
|
1605
|
-
companyDefaultsInLastYearNo
|
|
1606
|
-
companyAnyVoluntaryEnforcedPossessionYes Boolean
|
|
1607
|
-
companyAnyVoluntaryEnforcedPossessionNo Boolean
|
|
1608
|
-
doYouKnowRegisteredNumber
|
|
1609
|
-
sicCodes
|
|
1610
|
-
epc
|
|
1611
|
-
remainingLease
|
|
1612
|
-
dateOfIncorporation
|
|
1613
|
-
createdAt
|
|
1614
|
-
updatedAt
|
|
1575
|
+
id String @id @default(uuid())
|
|
1576
|
+
applicationId String @map("application_id")
|
|
1577
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1578
|
+
registeredName String @map("registered_name")
|
|
1579
|
+
businessTypeLid String @map("business_type_lid")
|
|
1580
|
+
registeredNumber Int @map("registered_number")
|
|
1581
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
1582
|
+
tradingSince String? @map("trading_since")
|
|
1583
|
+
natureOfBusiness String @default("") @map("nature_of_business")
|
|
1584
|
+
yearEnd String? @map("year_end")
|
|
1585
|
+
addressPostCode String @default("") @map("address_post_code")
|
|
1586
|
+
addressLine1 String @map("address_line1")
|
|
1587
|
+
addressLine2 String? @map("address_line2")
|
|
1588
|
+
addressLine3 String? @map("address_line3")
|
|
1589
|
+
addressCity String? @map("address_city")
|
|
1590
|
+
addressCountryLid String @map("address_country_lid")
|
|
1591
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1592
|
+
yearEnd1 Int @map("year_end1")
|
|
1593
|
+
turnoverYear1 Decimal @default(0.00) @map("turnover_year1")
|
|
1594
|
+
netProfitYear1 Decimal @default(0.00) @map("net_profit_year1")
|
|
1595
|
+
yearEnd2 Int @map("year_end2")
|
|
1596
|
+
turnoverYear2 Decimal @default(0.00) @map("turnover_year2")
|
|
1597
|
+
netProfitYear2 Decimal @default(0.00) @map("net_profit_year2")
|
|
1598
|
+
yearEnd3 Int @map("year_end3")
|
|
1599
|
+
turnoverYear3 Decimal @default(0.00) @map("turnover_year3")
|
|
1600
|
+
netProfitYear3 Decimal @default(0.00) @map("net_profit_year3")
|
|
1601
|
+
companyCreditDefaults String @default("") @map("company_credit_defaults")
|
|
1602
|
+
companyCountyCourtJudgment String @default("") @map("company_county_court_judgment")
|
|
1603
|
+
companySecuredArrears String @default("") @map("company_secured_arrears")
|
|
1604
|
+
companyUnsecuredArrears String @default("") @map("company_unsecured_arrears")
|
|
1605
|
+
companyBankruptcy String @default("") @map("company_bankruptcy")
|
|
1606
|
+
companyBankruptcyYes Boolean @default(false) @map("company_bankruptcy_yes")
|
|
1607
|
+
companyBankruptcyNo Boolean @default(true) @map("company_bankruptcy_no")
|
|
1608
|
+
companyCCJInLastThreeYearYes Boolean @default(false) @map("company_ccj_in_last_three_year_yes")
|
|
1609
|
+
companyCCJInLastThreeYearNo Boolean @default(true) @map("company_ccj_in_last_three_year_no")
|
|
1610
|
+
companyDefaultsInLastYearYes Boolean @default(false) @map("company_defaults_in_last_year_yes")
|
|
1611
|
+
companyDefaultsInLastYearNo Boolean @default(true) @map("company_defaults_in_last_year_no")
|
|
1612
|
+
companyAnyVoluntaryEnforcedPossessionYes Boolean @default(false) @map("company_any_voluntary_enforced_possession_yes")
|
|
1613
|
+
companyAnyVoluntaryEnforcedPossessionNo Boolean @default(true) @map("company_any_voluntary_enforced_possession_no")
|
|
1614
|
+
doYouKnowRegisteredNumber Boolean @default(true) @map("do_you_know_registered_number")
|
|
1615
|
+
sicCodes String[] @map("sic_codes")
|
|
1616
|
+
epc String @default("") @map("epc")
|
|
1617
|
+
remainingLease String @default("") @map("remaining_lease")
|
|
1618
|
+
dateOfIncorporation String? @map("date_of_incorporation")
|
|
1619
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1620
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1615
1621
|
|
|
1616
1622
|
// Relations
|
|
1617
|
-
application
|
|
1618
|
-
businessType
|
|
1619
|
-
taxJurisdiction
|
|
1620
|
-
addressCountry
|
|
1621
|
-
applicationType
|
|
1623
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1624
|
+
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
1625
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
1626
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1627
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1622
1628
|
applicantShareholdings ApplicantShareholding[]
|
|
1623
1629
|
|
|
1624
1630
|
@@map("companies")
|
|
1625
1631
|
}
|
|
1626
1632
|
|
|
1627
1633
|
model ApplicantShareholding {
|
|
1628
|
-
id
|
|
1629
|
-
companyId
|
|
1630
|
-
applicantId
|
|
1631
|
-
applicantName
|
|
1634
|
+
id String @id @default(uuid())
|
|
1635
|
+
companyId String @map("company_id")
|
|
1636
|
+
applicantId String @map("applicant_id")
|
|
1637
|
+
applicantName String @default("") @map("applicant_name")
|
|
1632
1638
|
directorShareholderLid String? @map("director_shareholder_lid")
|
|
1633
|
-
shareholding
|
|
1634
|
-
createdAt
|
|
1635
|
-
updatedAt
|
|
1639
|
+
shareholding Int? @map("shareholding")
|
|
1640
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1641
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1636
1642
|
|
|
1637
1643
|
// Relations
|
|
1638
|
-
company
|
|
1639
|
-
applicant
|
|
1640
|
-
directorShareholder
|
|
1644
|
+
company Company @relation(fields: [companyId], references: [id])
|
|
1645
|
+
applicant Applicant @relation("ApplicantShareholdings", fields: [applicantId], references: [id])
|
|
1646
|
+
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
1641
1647
|
|
|
1642
1648
|
@@map("applicant_shareholdings")
|
|
1643
1649
|
}
|
|
1644
1650
|
|
|
1645
1651
|
// From prisma/applications/product-features.prisma
|
|
1646
1652
|
model ProductFeatures {
|
|
1647
|
-
id
|
|
1648
|
-
name
|
|
1649
|
-
clientAdvance
|
|
1650
|
-
ltv
|
|
1651
|
-
repayment
|
|
1652
|
-
variableRepayment
|
|
1653
|
-
reversionRateWithoutBaseRate
|
|
1654
|
-
totalReversionRate
|
|
1655
|
-
initialRate
|
|
1656
|
-
fixedTerm
|
|
1657
|
-
fixedTermEndDate
|
|
1658
|
-
baseRate
|
|
1659
|
-
productRate
|
|
1660
|
-
apr
|
|
1661
|
-
rentalCoverage
|
|
1662
|
-
repaymentType
|
|
1663
|
-
applicationCategory
|
|
1664
|
-
securityType
|
|
1665
|
-
erc
|
|
1666
|
-
loanType
|
|
1667
|
-
maxLtvLimit
|
|
1668
|
-
reimbursement
|
|
1669
|
-
reimbursementPerPound
|
|
1670
|
-
stressedApr
|
|
1671
|
-
stressedRate
|
|
1672
|
-
stressedRepayment
|
|
1673
|
-
liborFloorRate
|
|
1674
|
-
totalTermInMonths
|
|
1675
|
-
chargeType
|
|
1676
|
-
productCategory
|
|
1677
|
-
ercCode
|
|
1678
|
-
variableTerm
|
|
1679
|
-
totalFeePayable
|
|
1680
|
-
dipIssueDate
|
|
1681
|
-
estimatedCompletionDate
|
|
1682
|
-
dipExpiryDate
|
|
1683
|
-
fixedRepaymentUntillDate
|
|
1684
|
-
rentalReviewDate
|
|
1685
|
-
totalReimbursementWithFee
|
|
1686
|
-
finalRentPayment
|
|
1687
|
-
clientDeposit
|
|
1688
|
-
firstRentPayment
|
|
1689
|
-
ercFeatures
|
|
1690
|
-
icr
|
|
1691
|
-
ufssProductCode
|
|
1692
|
-
ufssInterestRateCode
|
|
1693
|
-
stressedPayment
|
|
1694
|
-
stressedPaymentRate
|
|
1695
|
-
createdAt
|
|
1696
|
-
updatedAt
|
|
1653
|
+
id String @id @default(uuid())
|
|
1654
|
+
name String @map("name")
|
|
1655
|
+
clientAdvance String @map("client_advance")
|
|
1656
|
+
ltv String @map("ltv")
|
|
1657
|
+
repayment String @map("repayment")
|
|
1658
|
+
variableRepayment String @map("variable_repayment")
|
|
1659
|
+
reversionRateWithoutBaseRate String? @map("reversion_rate_without_base_rate")
|
|
1660
|
+
totalReversionRate String? @map("total_reversion_rate")
|
|
1661
|
+
initialRate String @map("initial_rate")
|
|
1662
|
+
fixedTerm String @map("fixed_term")
|
|
1663
|
+
fixedTermEndDate String? @map("fixed_term_end_date")
|
|
1664
|
+
baseRate String? @map("base_rate")
|
|
1665
|
+
productRate String? @map("product_rate")
|
|
1666
|
+
apr String? @map("apr")
|
|
1667
|
+
rentalCoverage String? @map("rental_coverage")
|
|
1668
|
+
repaymentType String? @map("repayment_type")
|
|
1669
|
+
applicationCategory String? @map("application_category")
|
|
1670
|
+
securityType String? @map("security_type")
|
|
1671
|
+
erc String? @map("erc")
|
|
1672
|
+
loanType String? @map("loan_type")
|
|
1673
|
+
maxLtvLimit String? @map("max_ltv_limit")
|
|
1674
|
+
reimbursement String? @map("reimbursement")
|
|
1675
|
+
reimbursementPerPound String? @map("reimbursement_per_pound")
|
|
1676
|
+
stressedApr String? @map("stressed_apr")
|
|
1677
|
+
stressedRate String? @map("stressed_rate")
|
|
1678
|
+
stressedRepayment String? @map("stressed_repayment")
|
|
1679
|
+
liborFloorRate String? @map("libor_floor_rate")
|
|
1680
|
+
totalTermInMonths String? @map("total_term_in_months")
|
|
1681
|
+
chargeType String @default("") @map("charge_type")
|
|
1682
|
+
productCategory String @default("") @map("product_category")
|
|
1683
|
+
ercCode String @default("") @map("erc_code")
|
|
1684
|
+
variableTerm String? @map("variable_term")
|
|
1685
|
+
totalFeePayable String? @map("total_fee_payable")
|
|
1686
|
+
dipIssueDate String? @map("dip_issue_date")
|
|
1687
|
+
estimatedCompletionDate String? @map("estimated_completion_date")
|
|
1688
|
+
dipExpiryDate String? @map("dip_expiry_date")
|
|
1689
|
+
fixedRepaymentUntillDate String? @map("fixed_repayment_untill_date")
|
|
1690
|
+
rentalReviewDate String? @map("rental_review_date")
|
|
1691
|
+
totalReimbursementWithFee String? @map("total_reimbursement_with_fee")
|
|
1692
|
+
finalRentPayment String? @map("final_rent_payment")
|
|
1693
|
+
clientDeposit String? @map("client_deposit")
|
|
1694
|
+
firstRentPayment String? @map("first_rent_payment")
|
|
1695
|
+
ercFeatures Json? @map("erc_features")
|
|
1696
|
+
icr String? @map("icr")
|
|
1697
|
+
ufssProductCode String? @map("ufss_product_code")
|
|
1698
|
+
ufssInterestRateCode String? @map("ufss_interest_rate_code")
|
|
1699
|
+
stressedPayment String? @map("stressed_payment")
|
|
1700
|
+
stressedPaymentRate String? @map("stressed_payment_rate")
|
|
1701
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1702
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1697
1703
|
|
|
1698
1704
|
@@map("product_features")
|
|
1699
1705
|
}
|
|
@@ -1727,40 +1733,40 @@ model Solicitor {
|
|
|
1727
1733
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1728
1734
|
|
|
1729
1735
|
// Relations
|
|
1730
|
-
application
|
|
1731
|
-
addressCountry
|
|
1736
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1737
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1732
1738
|
|
|
1733
1739
|
@@map("solicitors")
|
|
1734
1740
|
}
|
|
1735
1741
|
|
|
1736
1742
|
// From prisma/properties/property.prisma
|
|
1737
1743
|
model Property {
|
|
1738
|
-
id
|
|
1739
|
-
applicationId
|
|
1740
|
-
pageValidFlag
|
|
1741
|
-
propertyId
|
|
1742
|
-
addressLine1
|
|
1743
|
-
addressLine2
|
|
1744
|
-
addressLine3
|
|
1744
|
+
id String @id @default(uuid())
|
|
1745
|
+
applicationId String @map("application_id")
|
|
1746
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1747
|
+
propertyId String @unique @map("property_id")
|
|
1748
|
+
addressLine1 String @map("address_line1")
|
|
1749
|
+
addressLine2 String? @map("address_line2")
|
|
1750
|
+
addressLine3 String? @map("address_line3")
|
|
1745
1751
|
associatedLoanPartiesIds String[] @map("associated_loan_parties_ids")
|
|
1746
|
-
city
|
|
1747
|
-
countryLid
|
|
1748
|
-
lender
|
|
1749
|
-
marketValue
|
|
1750
|
-
monthlyRent
|
|
1751
|
-
monthlyRepayment
|
|
1752
|
-
originalLoanBalance
|
|
1753
|
-
outstandingBalance
|
|
1754
|
-
otherOwnershipParties
|
|
1755
|
-
postCode
|
|
1756
|
-
remainingTerm
|
|
1757
|
-
portfolioFile
|
|
1758
|
-
createdAt
|
|
1759
|
-
updatedAt
|
|
1752
|
+
city String? @map("city")
|
|
1753
|
+
countryLid String @map("country_lid")
|
|
1754
|
+
lender String @map("lender")
|
|
1755
|
+
marketValue Decimal @default(0.00) @map("market_value")
|
|
1756
|
+
monthlyRent Decimal @default(0.00) @map("monthly_rent")
|
|
1757
|
+
monthlyRepayment Decimal @default(0.00) @map("monthly_repayment")
|
|
1758
|
+
originalLoanBalance Decimal @default(0.00) @map("original_loan_balance")
|
|
1759
|
+
outstandingBalance Decimal @default(0.00) @map("outstanding_balance")
|
|
1760
|
+
otherOwnershipParties String? @map("other_ownership_parties")
|
|
1761
|
+
postCode String @map("post_code")
|
|
1762
|
+
remainingTerm Int @map("remaining_term")
|
|
1763
|
+
portfolioFile String? @map("portfolio_file")
|
|
1764
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1765
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1760
1766
|
|
|
1761
1767
|
// Relations
|
|
1762
|
-
application
|
|
1763
|
-
country
|
|
1768
|
+
application Application @relation("ApplicationProperties", fields: [applicationId], references: [id])
|
|
1769
|
+
country Lookup @relation("PropertyCountry", fields: [countryLid], references: [id])
|
|
1764
1770
|
|
|
1765
1771
|
@@map("properties")
|
|
1766
1772
|
}
|
|
@@ -1814,11 +1820,11 @@ model Security {
|
|
|
1814
1820
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1815
1821
|
|
|
1816
1822
|
// Relations
|
|
1817
|
-
application
|
|
1818
|
-
propertyAddressCountry
|
|
1819
|
-
propertyTenure
|
|
1820
|
-
propertyType
|
|
1821
|
-
dataStreet
|
|
1823
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1824
|
+
propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
|
|
1825
|
+
propertyTenure Lookup @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
|
|
1826
|
+
propertyType Lookup? @relation("PropertyType", fields: [propertyTypeLid], references: [id])
|
|
1827
|
+
dataStreet DataStreet?
|
|
1822
1828
|
|
|
1823
1829
|
@@map("securities")
|
|
1824
1830
|
}
|
|
@@ -1842,30 +1848,30 @@ model DataStreet {
|
|
|
1842
1848
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1843
1849
|
|
|
1844
1850
|
// Relations
|
|
1845
|
-
security
|
|
1851
|
+
security Security @relation(fields: [securityId], references: [id])
|
|
1846
1852
|
|
|
1847
1853
|
@@map("data_streets")
|
|
1848
1854
|
}
|
|
1849
1855
|
|
|
1850
1856
|
// From prisma/underwriter/underwriter.prisma
|
|
1851
1857
|
model Underwriter {
|
|
1852
|
-
id
|
|
1853
|
-
applicationId
|
|
1854
|
-
status
|
|
1855
|
-
decision
|
|
1856
|
-
decisionDate
|
|
1857
|
-
decisionNotes
|
|
1858
|
-
riskRating
|
|
1859
|
-
riskNotes
|
|
1860
|
-
underwriterId
|
|
1861
|
-
assignedDate
|
|
1862
|
-
completedDate
|
|
1863
|
-
createdAt
|
|
1864
|
-
updatedAt
|
|
1858
|
+
id String @id @default(uuid())
|
|
1859
|
+
applicationId String @map("application_id")
|
|
1860
|
+
status String
|
|
1861
|
+
decision String?
|
|
1862
|
+
decisionDate DateTime? @map("decision_date")
|
|
1863
|
+
decisionNotes String? @map("decision_notes")
|
|
1864
|
+
riskRating String? @map("risk_rating")
|
|
1865
|
+
riskNotes String? @map("risk_notes")
|
|
1866
|
+
underwriterId String @map("underwriter_id")
|
|
1867
|
+
assignedDate DateTime @map("assigned_date")
|
|
1868
|
+
completedDate DateTime? @map("completed_date")
|
|
1869
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1870
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1865
1871
|
|
|
1866
1872
|
// Relations
|
|
1867
|
-
application
|
|
1868
|
-
underwriter
|
|
1873
|
+
application Application @relation("ApplicationUnderwriters", fields: [applicationId], references: [id])
|
|
1874
|
+
underwriter User @relation("UserUnderwriters", fields: [underwriterId], references: [id])
|
|
1869
1875
|
|
|
1870
1876
|
@@map("underwriters")
|
|
1871
|
-
}
|
|
1877
|
+
}
|