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