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