@dynamatix/gb-schemas 2.0.0 → 2.0.2
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/company.entity.ts +2 -2
- 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 +1 -1
- package/prisma/applicants/{credit-data.prisma → applicant-credit-data.prisma} +3 -3
- 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} +3 -3
- package/prisma/applicants/{income.prisma → applicant-income.prisma} +10 -4
- package/prisma/applicants/{other-income.prisma → applicant-other-income.prisma} +2 -2
- package/prisma/applicants/applicant-property-income.prisma +21 -0
- package/prisma/applicants/applicant.prisma +17 -12
- package/prisma/applicants/credit-card-commitment.prisma +1 -1
- package/prisma/applicants/loan-commitment.prisma +2 -1
- package/prisma/applicants/mortgage-commitment.prisma +7 -6
- package/prisma/applicants/residence-commitment.prisma +7 -6
- package/prisma/applicants/secured-loan-commitment.prisma +1 -1
- package/prisma/applicants/unsecured-loan-commitment.prisma +1 -1
- package/prisma/applications/application-company.prisma +7 -5
- package/prisma/applications/{credit-profile.prisma → application-credit-profile.prisma} +6 -2
- package/prisma/applications/application-direct-debit.prisma +7 -5
- package/prisma/applications/application-mortgage.prisma +1 -1
- package/prisma/applications/application-product.prisma +1 -1
- package/prisma/applications/application-rationale.prisma +1 -1
- package/prisma/applications/application.prisma +28 -12
- package/prisma/applications/broker.prisma +4 -0
- package/prisma/applications/company.prisma +7 -7
- package/prisma/broker.entity.ts +8 -0
- package/prisma/migrations/{20250430085825_initial_migration → 20250501070203_initial_migration}/migration.sql +355 -401
- package/prisma/properties/property.prisma +1 -1
- package/prisma/schema.prisma +1229 -1283
- package/prisma/shared/alert.prisma +1 -1
- package/prisma/shared/lookup.prisma +19 -24
- package/prisma/underwriter/underwriter.prisma +2 -2
- package/prisma/users/user.prisma +2 -2
- 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 -25
- package/prisma/applicants/employment.prisma +0 -59
- package/prisma/applicants/expenditure.prisma +0 -26
- package/prisma/applicants/property-income.prisma +0 -17
- 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/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,61 +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
|
|
245
|
-
|
|
246
|
-
|
|
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
|
+
|
|
247
246
|
|
|
248
|
-
@@unique([groupId, value])
|
|
249
247
|
@@map("lookups")
|
|
248
|
+
@@unique([groupId, value])
|
|
250
249
|
}
|
|
251
250
|
|
|
252
251
|
// From prisma/shared/system-parameter.prisma
|
|
@@ -261,8 +260,8 @@ model SystemParameter {
|
|
|
261
260
|
updatedById String? @map("updated_by_id")
|
|
262
261
|
|
|
263
262
|
// Relations
|
|
264
|
-
createdBy
|
|
265
|
-
updatedBy
|
|
263
|
+
createdBy User? @relation("CreatedByUser", fields: [createdById], references: [id])
|
|
264
|
+
updatedBy User? @relation("UpdatedByUser", fields: [updatedById], references: [id])
|
|
266
265
|
|
|
267
266
|
@@map("system_parameters")
|
|
268
267
|
}
|
|
@@ -282,15 +281,15 @@ model AuthLog {
|
|
|
282
281
|
|
|
283
282
|
// From prisma/users/permission.prisma
|
|
284
283
|
model Permission {
|
|
285
|
-
id
|
|
286
|
-
name
|
|
287
|
-
controllerName String
|
|
288
|
-
methodName
|
|
289
|
-
createdAt
|
|
290
|
-
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")
|
|
291
290
|
|
|
292
291
|
// Relations
|
|
293
|
-
roles
|
|
292
|
+
roles Role[]
|
|
294
293
|
|
|
295
294
|
@@map("permissions")
|
|
296
295
|
}
|
|
@@ -305,8 +304,8 @@ model RoleGroup {
|
|
|
305
304
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
306
305
|
|
|
307
306
|
// Relations
|
|
308
|
-
roles
|
|
309
|
-
users
|
|
307
|
+
roles Role[] @relation("RoleToRoleGroup")
|
|
308
|
+
users User[] @relation("UserToRoleGroup")
|
|
310
309
|
|
|
311
310
|
@@map("role_groups")
|
|
312
311
|
}
|
|
@@ -322,39 +321,39 @@ model Role {
|
|
|
322
321
|
|
|
323
322
|
// Relations
|
|
324
323
|
permissions Permission[]
|
|
325
|
-
roleGroups RoleGroup[]
|
|
324
|
+
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
326
325
|
|
|
327
326
|
@@map("roles")
|
|
328
327
|
}
|
|
329
328
|
|
|
330
329
|
// From prisma/users/user.prisma
|
|
331
330
|
model User {
|
|
332
|
-
id
|
|
333
|
-
accountId
|
|
334
|
-
email
|
|
335
|
-
fullName
|
|
336
|
-
password
|
|
337
|
-
organisationId
|
|
338
|
-
status
|
|
339
|
-
modifiedOn
|
|
340
|
-
modifiedById
|
|
341
|
-
createdOnInApprivo
|
|
342
|
-
createdById
|
|
343
|
-
deletedOn
|
|
344
|
-
deletedById
|
|
345
|
-
token
|
|
346
|
-
createdAt
|
|
347
|
-
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")
|
|
348
347
|
|
|
349
348
|
// Relations
|
|
350
|
-
groups
|
|
351
|
-
claims
|
|
349
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
350
|
+
claims Claim[]
|
|
352
351
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
353
352
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
354
|
-
createdNotes
|
|
355
|
-
assignedNotes
|
|
356
|
-
alerts
|
|
357
|
-
underwriters
|
|
353
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
354
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
355
|
+
alerts Alert[] @relation("UserAlerts")
|
|
356
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
358
357
|
|
|
359
358
|
@@map("users")
|
|
360
359
|
}
|
|
@@ -366,29 +365,29 @@ model Claim {
|
|
|
366
365
|
userId String @map("user_id")
|
|
367
366
|
createdAt DateTime @default(now()) @map("created_at")
|
|
368
367
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
369
|
-
|
|
368
|
+
|
|
370
369
|
// Relations
|
|
371
|
-
user
|
|
370
|
+
user User @relation(fields: [userId], references: [id])
|
|
372
371
|
|
|
373
372
|
@@map("claims")
|
|
374
373
|
}
|
|
375
374
|
|
|
376
375
|
// From prisma/product-catalogues/product-catalogue.prisma
|
|
377
376
|
model ProductCatalogue {
|
|
378
|
-
id
|
|
377
|
+
id String @id @default(uuid())
|
|
379
378
|
productCatalogueId String @map("product_catalogue_id")
|
|
380
|
-
name
|
|
381
|
-
description
|
|
382
|
-
applyFrom
|
|
383
|
-
applyUntil
|
|
384
|
-
submitUntil
|
|
385
|
-
status
|
|
386
|
-
lockedForEdit
|
|
387
|
-
baseRateName
|
|
388
|
-
baseRate
|
|
389
|
-
mapperName
|
|
390
|
-
createdAt
|
|
391
|
-
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")
|
|
392
391
|
|
|
393
392
|
// Relations
|
|
394
393
|
productDefinitions ProductDefinition[]
|
|
@@ -409,8 +408,8 @@ model ProductDefinition {
|
|
|
409
408
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
410
409
|
|
|
411
410
|
// Relations
|
|
412
|
-
productCatalogue
|
|
413
|
-
rules
|
|
411
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
412
|
+
rules Rule[]
|
|
414
413
|
|
|
415
414
|
@@map("product_definitions")
|
|
416
415
|
}
|
|
@@ -433,1321 +432,1268 @@ model Rule {
|
|
|
433
432
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
434
433
|
|
|
435
434
|
// Relations
|
|
436
|
-
productDefinition
|
|
435
|
+
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
437
436
|
|
|
438
437
|
@@map("rules")
|
|
439
438
|
}
|
|
440
439
|
|
|
441
440
|
// From prisma/product-catalogues/product-variant.prisma
|
|
442
441
|
model ProductVariant {
|
|
443
|
-
id
|
|
444
|
-
productCatalogueId
|
|
445
|
-
variantid
|
|
446
|
-
name
|
|
447
|
-
variantCode
|
|
448
|
-
label
|
|
449
|
-
createdAt
|
|
450
|
-
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")
|
|
451
450
|
|
|
452
451
|
// Relations
|
|
453
|
-
productCatalogue
|
|
452
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
454
453
|
|
|
455
454
|
@@map("product_variants")
|
|
456
455
|
}
|
|
457
456
|
|
|
458
457
|
// From prisma/product-catalogues/product.prisma
|
|
459
458
|
model Product {
|
|
460
|
-
id
|
|
461
|
-
name
|
|
462
|
-
description
|
|
463
|
-
createdAt
|
|
464
|
-
updatedAt
|
|
465
|
-
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[]
|
|
466
465
|
|
|
467
466
|
@@map("products")
|
|
468
467
|
}
|
|
469
468
|
|
|
470
|
-
// From prisma/applicants/applicant.prisma
|
|
471
|
-
model
|
|
472
|
-
id
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
correspondenceAddressCountryLid String? @map("correspondence_address_country_lid")
|
|
484
|
-
correspondenceAddressLine1 String?
|
|
485
|
-
correspondenceAddressLine2 String?
|
|
486
|
-
correspondenceAddressLine3 String?
|
|
487
|
-
correspondenceAddressPostCode String?
|
|
488
|
-
countryOfResidenceLid String @map("country_of_residence_lid")
|
|
489
|
-
dateOfBirth String
|
|
490
|
-
dependant10Age Int @default(0)
|
|
491
|
-
dependant1Age Int @default(0)
|
|
492
|
-
dependant2Age Int @default(0)
|
|
493
|
-
dependant3Age Int @default(0)
|
|
494
|
-
dependant4Age Int @default(0)
|
|
495
|
-
dependant5Age Int @default(0)
|
|
496
|
-
dependant6Age Int @default(0)
|
|
497
|
-
dependant7Age Int @default(0)
|
|
498
|
-
dependant8Age Int @default(0)
|
|
499
|
-
dependant9Age Int @default(0)
|
|
500
|
-
email String
|
|
501
|
-
employmentStatusDetails String?
|
|
502
|
-
firstName String
|
|
503
|
-
isFirstTimelandlord Boolean @default(false)
|
|
504
|
-
foreignIdForNationals String?
|
|
505
|
-
gdprEmail Boolean @default(false)
|
|
506
|
-
gdprPost Boolean @default(false)
|
|
507
|
-
gdprTelephone Boolean @default(false)
|
|
508
|
-
gdprTextMessage Boolean @default(false)
|
|
509
|
-
gender String
|
|
510
|
-
hasBrokerGivenConsentForVulnerabilities Boolean
|
|
511
|
-
hasLinkedJurisdiction Boolean @default(false)
|
|
512
|
-
isCorrespondence Boolean @default(true)
|
|
513
|
-
isCommitmentConfirmed Boolean @default(false)
|
|
514
|
-
isCurrentContract Boolean @default(false)
|
|
515
|
-
isCustomerVulnerable Boolean @default(false)
|
|
516
|
-
isExpat Boolean @default(false)
|
|
517
|
-
isFirstApplicant Boolean @default(false)
|
|
518
|
-
isUkPassport Boolean @default(false)
|
|
519
|
-
isUkResident Boolean
|
|
520
|
-
classLid String? @map("class_lid")
|
|
521
|
-
pageValidFlag Boolean @default(false)
|
|
522
|
-
lastName String
|
|
523
|
-
linkedJurisdictionCountryLid String? @map("linked_jurisdiction_country_lid")
|
|
524
|
-
linkedJurisdictionDetails String?
|
|
525
|
-
maidenName String?
|
|
526
|
-
maritalStatusLid String @map("marital_status_lid")
|
|
527
|
-
mobileNumber String?
|
|
528
|
-
nationalityLid String @map("nationality_lid")
|
|
529
|
-
netIncome Decimal @default(0.00)
|
|
530
|
-
niNumber String
|
|
531
|
-
numberOfDependants Int @default(0)
|
|
532
|
-
isOneYearPrior Boolean @default(false)
|
|
533
|
-
phoneNumber String?
|
|
534
|
-
previous1AddressCity String?
|
|
535
|
-
previous1AddressCountryLid String? @map("previous1_address_country_lid")
|
|
536
|
-
previous1AddressLine1 String?
|
|
537
|
-
previous1AddressLine2 String?
|
|
538
|
-
previous1AddressLine3 String?
|
|
539
|
-
previous1AddressMovedDate String?
|
|
540
|
-
previous1AddressPostCode String?
|
|
541
|
-
previous1AddressPropertyOwnedBy String?
|
|
542
|
-
previous2AddressCity String?
|
|
543
|
-
previous2AddressCountryLid String? @map("previous2_address_country_lid")
|
|
544
|
-
previous2AddressLine1 String?
|
|
545
|
-
previous2AddressLine2 String?
|
|
546
|
-
previous2AddressLine3 String?
|
|
547
|
-
previous2AddressMovedDate String?
|
|
548
|
-
previous2AddressPostCode String?
|
|
549
|
-
previous2AddressPropertyOwnedBy String?
|
|
550
|
-
relationshipToOthers String
|
|
551
|
-
residentialStatusLid String? @map("residential_status_lid")
|
|
552
|
-
retirementAge String
|
|
553
|
-
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
554
|
-
taxPayerLid String @map("tax_payer_lid")
|
|
555
|
-
timeResidedAtCountryOfResidence Int
|
|
556
|
-
title String
|
|
557
|
-
isTwoYearPrior Boolean @default(false)
|
|
558
|
-
understandEnglish Boolean
|
|
559
|
-
vulnerabilityNotes String?
|
|
560
|
-
vulnerabilityTypeLids String[] @map("vulnerability_type_lids")
|
|
561
|
-
ukPassportProfessionLid String? @map("uk_passport_profession_lid")
|
|
562
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
563
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
469
|
+
// From prisma/applicants/applicant-credit-data.prisma
|
|
470
|
+
model ApplicantCreditData {
|
|
471
|
+
id String @id @default(uuid())
|
|
472
|
+
bankruptcy String
|
|
473
|
+
countyCourtJudgment String
|
|
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")
|
|
564
482
|
|
|
565
483
|
// Relations
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
569
|
-
countryOfResidence Lookup @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
570
|
-
class Lookup? @relation("Class", fields: [classLid], references: [id])
|
|
571
|
-
linkedJurisdictionCountry Lookup? @relation("LinkedJurisdictionCountry", fields: [linkedJurisdictionCountryLid], references: [id])
|
|
572
|
-
maritalStatus Lookup @relation("MaritalStatus", fields: [maritalStatusLid], references: [id])
|
|
573
|
-
nationality Lookup @relation("Nationality", fields: [nationalityLid], references: [id])
|
|
574
|
-
previous1AddressCountry Lookup? @relation("Previous1AddressCountry", fields: [previous1AddressCountryLid], references: [id])
|
|
575
|
-
previous2AddressCountry Lookup? @relation("Previous2AddressCountry", fields: [previous2AddressCountryLid], references: [id])
|
|
576
|
-
residentialStatus Lookup? @relation("ResidentialStatus", fields: [residentialStatusLid], references: [id])
|
|
577
|
-
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
578
|
-
taxPayer Lookup @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
579
|
-
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
580
|
-
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
581
|
-
|
|
582
|
-
// Nested schemas
|
|
583
|
-
creditData CreditData?
|
|
584
|
-
riskNarrative RiskNarrative?
|
|
585
|
-
otherIncome OtherIncome?
|
|
586
|
-
incomeSource IncomeSource?
|
|
587
|
-
expenditure Expenditure?
|
|
588
|
-
employment Employment?
|
|
589
|
-
directDebit DirectDebit?
|
|
590
|
-
creditProfile CreditProfile? @relation(fields: [creditProfileId], references: [id])
|
|
591
|
-
propertyIncome PropertyIncome? @relation(fields: [propertyIncomeId], references: [id])
|
|
592
|
-
income Income? @relation(fields: [incomeId], references: [id])
|
|
593
|
-
creditProfileId String?
|
|
594
|
-
propertyIncomeId String?
|
|
595
|
-
incomeId String?
|
|
596
|
-
CreditCardCommitment CreditCardCommitment[]
|
|
597
|
-
LoanCommitment LoanCommitment[]
|
|
598
|
-
MortgageCommitment MortgageCommitment[]
|
|
599
|
-
ResidenceCommitment ResidenceCommitment[]
|
|
600
|
-
SecuredLoanCommitment SecuredLoanCommitment[]
|
|
601
|
-
UnsecuredLoanCommitment UnsecuredLoanCommitment[]
|
|
602
|
-
ApplicantShareholding ApplicantShareholding[]
|
|
484
|
+
applicant Applicant @relation("ApplicantCreditData", fields: [applicantId], references: [id])
|
|
485
|
+
status Lookup @relation("CreditDataStatus", fields: [statusLid], references: [id])
|
|
603
486
|
|
|
604
|
-
@@map("
|
|
487
|
+
@@map("applicant_credit_data")
|
|
605
488
|
}
|
|
606
489
|
|
|
607
|
-
// From prisma/applicants/credit-
|
|
608
|
-
model
|
|
609
|
-
id
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
monthlyPayment Decimal @map("monthly_payment")
|
|
618
|
-
jointNames Boolean @map("joint_names")
|
|
619
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
620
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
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")
|
|
621
500
|
|
|
622
501
|
// Relations
|
|
623
|
-
applicant
|
|
624
|
-
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
625
|
-
repaymentType Lookup @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
502
|
+
applicant Applicant @relation("ApplicantCreditProfile", fields: [applicantId], references: [id])
|
|
626
503
|
|
|
627
|
-
@@map("
|
|
504
|
+
@@map("applicant_credit_profiles")
|
|
628
505
|
}
|
|
629
506
|
|
|
630
|
-
// From prisma/applicants/
|
|
631
|
-
model
|
|
632
|
-
id
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
unsecuredArrears String
|
|
639
|
-
valid String
|
|
640
|
-
applicantId String @unique @map("applicant_id")
|
|
641
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
642
|
-
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")
|
|
643
515
|
|
|
644
516
|
// Relations
|
|
645
|
-
applicant
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
@@map("
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
// From prisma/applicants/
|
|
652
|
-
model
|
|
653
|
-
id
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
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")
|
|
660
568
|
|
|
661
569
|
// Relations
|
|
662
|
-
|
|
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")
|
|
663
575
|
|
|
664
|
-
@@map("
|
|
576
|
+
@@map("applicant_employments")
|
|
665
577
|
}
|
|
666
578
|
|
|
667
|
-
// From prisma/applicants/
|
|
668
|
-
model
|
|
669
|
-
id
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
branch String?
|
|
676
|
-
city String?
|
|
677
|
-
contactPostcode String?
|
|
678
|
-
institution String?
|
|
679
|
-
isConfirmDeclaration String? @default("false")
|
|
680
|
-
nameOfAccountHolder String?
|
|
681
|
-
selectedPaymentDay String?
|
|
682
|
-
sortCode String?
|
|
683
|
-
applicantId String @unique @map("applicant_id")
|
|
684
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
685
|
-
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")
|
|
686
587
|
|
|
687
588
|
// Relations
|
|
688
|
-
applicant
|
|
689
|
-
|
|
589
|
+
applicant Applicant @relation("ApplicantExpenditures",fields: [applicantId], references: [id])
|
|
590
|
+
expenditureType Lookup @relation("ExpenditureType", fields: [expenditureTypeLid], references: [id])
|
|
690
591
|
|
|
691
|
-
@@map("
|
|
592
|
+
@@map("applicant_expenditures")
|
|
692
593
|
}
|
|
693
594
|
|
|
694
|
-
// From prisma/applicants/
|
|
695
|
-
model
|
|
696
|
-
id
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
basicGrossIncome Decimal @default(0.00)
|
|
706
|
-
basicPay Decimal @default(0.00)
|
|
707
|
-
carAllowance Decimal @default(0.00)
|
|
708
|
-
childBenefit Decimal @default(0.00)
|
|
709
|
-
childBenefitOrSchoolAllowance Decimal @default(0.00)
|
|
710
|
-
contractRemaining String?
|
|
711
|
-
dateJoined String
|
|
712
|
-
disabilityLiving Decimal @default(0.00)
|
|
713
|
-
employerName String
|
|
714
|
-
employerTelephone String?
|
|
715
|
-
housingAllowance Decimal @default(0.00)
|
|
716
|
-
industryLid String @map("industry_lid")
|
|
717
|
-
isUnderTerminationNotice Boolean @default(false)
|
|
718
|
-
jobTitleLid String @map("job_title_lid")
|
|
719
|
-
maintenance Decimal @default(0.00)
|
|
720
|
-
maternityIncome Decimal @default(0.00)
|
|
721
|
-
natureOfBusiness String
|
|
722
|
-
pensionIncome Decimal @default(0.00)
|
|
723
|
-
previousAddressCity String?
|
|
724
|
-
previousAddressCountry String
|
|
725
|
-
previousAddressLine1 String
|
|
726
|
-
previousAddressLine2 String?
|
|
727
|
-
previousAddressLine3 String?
|
|
728
|
-
previousAddressPostCode String
|
|
729
|
-
previousBasicGrossIncome Decimal @default(0.00)
|
|
730
|
-
previousDateJoined String
|
|
731
|
-
previousDateLeft String
|
|
732
|
-
previousEmployerName String
|
|
733
|
-
previousEmployerTelephone String?
|
|
734
|
-
previousJobTitle String
|
|
735
|
-
previousNatureOfBusiness String
|
|
736
|
-
referenceContact String?
|
|
737
|
-
referenceContactEmail String
|
|
738
|
-
secondJob Decimal @default(0.00)
|
|
739
|
-
travelAllowance Decimal @default(0.00)
|
|
740
|
-
underTerminationNoticeNote String?
|
|
741
|
-
applicantId String @unique @map("applicant_id")
|
|
742
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
743
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
595
|
+
// From prisma/applicants/applicant-income-source.prisma
|
|
596
|
+
model ApplicantIncomeSource {
|
|
597
|
+
id String @id @default(uuid())
|
|
598
|
+
employmentStatusLid String? @map("employment_status_lid")
|
|
599
|
+
incomeFromEmployment String?
|
|
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")
|
|
744
606
|
|
|
745
607
|
// Relations
|
|
746
|
-
applicant
|
|
747
|
-
|
|
748
|
-
industry Lookup @relation("Industry", fields: [industryLid], references: [id])
|
|
749
|
-
jobTitle Lookup @relation("JobTitle", fields: [jobTitleLid], references: [id])
|
|
750
|
-
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
608
|
+
applicant Applicant @relation("ApplicantIncomeSource", fields: [applicantId], references: [id])
|
|
609
|
+
employmentStatus Lookup? @relation("IncomeSourceEmploymentStatus", fields: [employmentStatusLid], references: [id])
|
|
751
610
|
|
|
752
|
-
@@map("
|
|
611
|
+
@@map("applicant_income_source")
|
|
753
612
|
}
|
|
754
613
|
|
|
755
|
-
// From prisma/applicants/
|
|
756
|
-
model
|
|
757
|
-
id String
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
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")
|
|
776
671
|
|
|
777
672
|
// Relations
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
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")
|
|
781
681
|
}
|
|
782
682
|
|
|
783
|
-
// From prisma/applicants/income
|
|
784
|
-
model
|
|
785
|
-
id
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
applicantId String @unique @map("applicant_id")
|
|
792
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
793
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
683
|
+
// From prisma/applicants/applicant-other-income.prisma
|
|
684
|
+
model ApplicantOtherIncome {
|
|
685
|
+
id String @id @default(uuid())
|
|
686
|
+
// Income Source 1
|
|
687
|
+
sourceDetails1 String?
|
|
688
|
+
amount1 Decimal @default(0.00)
|
|
689
|
+
payFrequency1Lid String? @map("pay_frequency1_lid")
|
|
690
|
+
guaranteed1 Boolean @default(false)
|
|
794
691
|
|
|
795
|
-
//
|
|
796
|
-
|
|
797
|
-
|
|
692
|
+
// Income Source 2
|
|
693
|
+
sourceDetails2 String?
|
|
694
|
+
amount2 Decimal @default(0.00)
|
|
695
|
+
payFrequency2Lid String? @map("pay_frequency2_lid")
|
|
696
|
+
guaranteed2 Boolean @default(false)
|
|
798
697
|
|
|
799
|
-
|
|
800
|
-
|
|
698
|
+
// Income Source 3
|
|
699
|
+
sourceDetails3 String?
|
|
700
|
+
amount3 Decimal @default(0.00)
|
|
701
|
+
payFrequency3Lid String? @map("pay_frequency3_lid")
|
|
702
|
+
guaranteed3 Boolean @default(false)
|
|
801
703
|
|
|
802
|
-
//
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
businessCity String @default("") @map("business_city")
|
|
818
|
-
businessCountryLid String @map("business_country_lid")
|
|
819
|
-
businessPostCode String @map("business_post_code")
|
|
820
|
-
businessTelephoneNumber String @map("business_telephone_number")
|
|
821
|
-
businessTypeLid String @map("business_type_lid")
|
|
822
|
-
charteredCertifiedOrOtherLid String @map("chartered_certified_or_other_lid")
|
|
823
|
-
contactName String @map("contact_name")
|
|
824
|
-
currentYearEnd String @map("current_year_end")
|
|
825
|
-
dateEstablished String @map("date_established")
|
|
826
|
-
doYouHaveAccountant Boolean @map("do_you_have_accountant")
|
|
827
|
-
isBusinessAddressDifferent Boolean @map("is_business_address_different")
|
|
828
|
-
nameOfBusiness String @map("name_of_business")
|
|
829
|
-
natureOfBusiness String @map("nature_of_business")
|
|
830
|
-
netAssets1 Decimal @default(0.00) @map("net_assets1")
|
|
831
|
-
netAssets2 Decimal @default(0.00) @map("net_assets2")
|
|
832
|
-
netAssets3 Decimal @default(0.00) @map("net_assets3")
|
|
833
|
-
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
834
|
-
percentageOfShareholding Int @map("percentage_of_shareholding")
|
|
835
|
-
registeredAddressLine1 String @map("registered_address_line1")
|
|
836
|
-
registeredAddressLine2 String @map("registered_address_line2")
|
|
837
|
-
registeredAddressLine3 String @map("registered_address_line3")
|
|
838
|
-
registeredCity String @default("") @map("registered_city")
|
|
839
|
-
registeredCountryLid String @map("registered_country_lid")
|
|
840
|
-
registeredPostCode String @map("registered_post_code")
|
|
841
|
-
registeredTelephone String @map("registered_telephone")
|
|
842
|
-
selfEmployedDate String @map("self_employed_date")
|
|
843
|
-
turnover1 Decimal @default(0.00) @map("turnover1")
|
|
844
|
-
turnover2 Decimal @default(0.00) @map("turnover2")
|
|
845
|
-
turnover3 Decimal @default(0.00) @map("turnover3")
|
|
846
|
-
year1 Decimal @default(0.00) @map("year1")
|
|
847
|
-
year2 Decimal @default(0.00) @map("year2")
|
|
848
|
-
year3 Decimal @default(0.00) @map("year3")
|
|
849
|
-
yearEnd1 Int? @map("year_end1")
|
|
850
|
-
yearEnd2 Int? @map("year_end2")
|
|
851
|
-
yearEnd3 Int? @map("year_end3")
|
|
852
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
853
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
704
|
+
// Income Source 4
|
|
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")
|
|
854
719
|
|
|
855
720
|
// Relations
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
Applicant Applicant[]
|
|
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])
|
|
862
726
|
|
|
863
|
-
@@map("
|
|
727
|
+
@@map("applicant_other_income")
|
|
864
728
|
}
|
|
865
729
|
|
|
866
|
-
// From prisma/applicants/
|
|
867
|
-
model
|
|
868
|
-
id
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
883
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
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")
|
|
884
746
|
|
|
885
747
|
// Relations
|
|
886
|
-
applicant
|
|
887
|
-
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
888
|
-
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
748
|
+
applicant Applicant @relation("ApplicantPropertyIncome", fields: [applicantId], references: [id])
|
|
889
749
|
|
|
890
|
-
@@map("
|
|
750
|
+
@@map("applicant_property_income")
|
|
891
751
|
}
|
|
892
752
|
|
|
893
|
-
// From prisma/applicants/
|
|
894
|
-
model
|
|
895
|
-
id
|
|
896
|
-
applicantId
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
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")
|
|
918
847
|
|
|
919
848
|
// Relations
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
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")
|
|
924
881
|
|
|
925
|
-
@@map("
|
|
882
|
+
@@map("applicants")
|
|
926
883
|
}
|
|
927
884
|
|
|
928
|
-
// From prisma/applicants/
|
|
929
|
-
model
|
|
930
|
-
id
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
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")
|
|
936
899
|
|
|
937
|
-
//
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
guaranteed2 Boolean @default(false)
|
|
900
|
+
// Relations
|
|
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])
|
|
942
904
|
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
amount3 Decimal @default(0.00)
|
|
946
|
-
payFrequency3Lid String? @map("pay_frequency3_lid")
|
|
947
|
-
guaranteed3 Boolean @default(false)
|
|
905
|
+
@@map("applicant_creditcard_commitments")
|
|
906
|
+
}
|
|
948
907
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
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")
|
|
964
927
|
|
|
965
928
|
// Relations
|
|
966
|
-
applicant
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
payFrequency3 Lookup? @relation("PayFrequency3", fields: [payFrequency3Lid], references: [id])
|
|
970
|
-
payFrequency4 Lookup? @relation("PayFrequency4", fields: [payFrequency4Lid], references: [id])
|
|
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])
|
|
971
932
|
|
|
972
|
-
@@map("
|
|
933
|
+
@@map("applicant_loan_commitments")
|
|
973
934
|
}
|
|
974
935
|
|
|
975
|
-
// From prisma/applicants/
|
|
976
|
-
model
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
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")
|
|
993
970
|
}
|
|
994
971
|
|
|
995
972
|
// From prisma/applicants/residence-commitment.prisma
|
|
996
973
|
model ResidenceCommitment {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
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
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
// From prisma/applicants/risk-narrative.prisma
|
|
1038
|
-
model RiskNarrative {
|
|
1039
|
-
id String @id @default(uuid())
|
|
1040
|
-
call2StatusLid String? @map("call2_status_lid")
|
|
1041
|
-
clientReference String?
|
|
1042
|
-
docVerificationStatusLid String? @map("doc_verification_status_lid")
|
|
1043
|
-
isPoaTaskGenerated String?
|
|
1044
|
-
link String?
|
|
1045
|
-
riskLevel String?
|
|
1046
|
-
riskRating String?
|
|
1047
|
-
statusLid String? @map("status_lid")
|
|
1048
|
-
verificationLinkSentOn String?
|
|
1049
|
-
applicantId String @unique @map("applicant_id")
|
|
1050
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
1051
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1052
|
-
|
|
1053
|
-
// Relations
|
|
1054
|
-
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1055
|
-
call2Status Lookup? @relation("Call2Status", fields: [call2StatusLid], references: [id])
|
|
1056
|
-
docVerificationStatus Lookup? @relation("DocVerificationStatus", fields: [docVerificationStatusLid], references: [id])
|
|
1057
|
-
status Lookup? @relation("Status", fields: [statusLid], references: [id])
|
|
1058
|
-
|
|
1059
|
-
@@map("applicant_risk_narrative")
|
|
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")
|
|
1060
1013
|
}
|
|
1061
1014
|
|
|
1062
1015
|
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1063
1016
|
model SecuredLoanCommitment {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
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")
|
|
1083
1036
|
}
|
|
1084
1037
|
|
|
1085
1038
|
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1086
1039
|
model UnsecuredLoanCommitment {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
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")
|
|
1105
1058
|
}
|
|
1106
1059
|
|
|
1107
1060
|
// From prisma/applications/application-audit.prisma
|
|
1108
1061
|
model ApplicationAudit {
|
|
1109
|
-
id
|
|
1110
|
-
auditId
|
|
1111
|
-
accountId
|
|
1062
|
+
id String @id @default(uuid())
|
|
1063
|
+
auditId String @map("audit_id")
|
|
1064
|
+
accountId String @map("account_id")
|
|
1112
1065
|
auditCorrelationId String @map("audit_correlation_id")
|
|
1113
|
-
auditDate
|
|
1114
|
-
changeType
|
|
1115
|
-
applicationId
|
|
1116
|
-
name
|
|
1117
|
-
oldValue
|
|
1118
|
-
newValue
|
|
1119
|
-
createdAt
|
|
1120
|
-
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")
|
|
1121
1074
|
|
|
1122
1075
|
// Relations
|
|
1123
|
-
application
|
|
1076
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1124
1077
|
|
|
1125
1078
|
@@map("application_audits")
|
|
1126
1079
|
}
|
|
1127
1080
|
|
|
1128
1081
|
// From prisma/applications/application-company.prisma
|
|
1129
1082
|
model ApplicationCompany {
|
|
1130
|
-
id
|
|
1131
|
-
applicationId
|
|
1083
|
+
id String @id @default(uuid())
|
|
1084
|
+
applicationId String @unique @map("application_id")
|
|
1132
1085
|
name String
|
|
1133
|
-
registrationNumber String?
|
|
1134
|
-
createdAt
|
|
1135
|
-
updatedAt
|
|
1136
|
-
|
|
1086
|
+
registrationNumber String? @map("registration_number")
|
|
1087
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1088
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1089
|
+
|
|
1090
|
+
// Relations
|
|
1091
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1137
1092
|
|
|
1138
1093
|
@@map("application_companies")
|
|
1139
1094
|
}
|
|
1140
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
|
+
|
|
1141
1113
|
// From prisma/applications/application-direct-debit.prisma
|
|
1142
1114
|
model ApplicationDirectDebit {
|
|
1143
|
-
id
|
|
1144
|
-
applicationId
|
|
1145
|
-
accountNumber
|
|
1146
|
-
sortCode
|
|
1147
|
-
createdAt
|
|
1148
|
-
updatedAt
|
|
1149
|
-
|
|
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")
|
|
1121
|
+
|
|
1122
|
+
// Relations
|
|
1123
|
+
application Application @relation("ApplicationDirectDebit", fields: [applicationId], references: [id])
|
|
1150
1124
|
|
|
1151
1125
|
@@map("application_direct_debits")
|
|
1152
1126
|
}
|
|
1153
1127
|
|
|
1154
1128
|
// From prisma/applications/application-document.prisma
|
|
1155
1129
|
model ApplicationDocument {
|
|
1156
|
-
id
|
|
1157
|
-
applicationId
|
|
1158
|
-
documentId
|
|
1159
|
-
owningEntityId
|
|
1160
|
-
documentTypeLid
|
|
1161
|
-
documentTypeId
|
|
1162
|
-
fileName
|
|
1163
|
-
contentType
|
|
1164
|
-
created
|
|
1165
|
-
createdBy
|
|
1166
|
-
isGenerated
|
|
1167
|
-
data
|
|
1168
|
-
envelopeId
|
|
1169
|
-
signers
|
|
1170
|
-
documentTypeDisplayName String?
|
|
1171
|
-
documentTypeValue
|
|
1172
|
-
documentTypeData
|
|
1173
|
-
documentUrl
|
|
1174
|
-
createdAt
|
|
1175
|
-
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")
|
|
1176
1150
|
|
|
1177
1151
|
// Relations
|
|
1178
|
-
application
|
|
1179
|
-
documentType
|
|
1152
|
+
application Application? @relation(fields: [applicationId], references: [id])
|
|
1153
|
+
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1180
1154
|
|
|
1181
1155
|
@@map("application_documents")
|
|
1182
1156
|
}
|
|
1183
1157
|
|
|
1184
1158
|
// From prisma/applications/application-fieldconfig.prisma
|
|
1185
1159
|
model ApplicationFieldConfig {
|
|
1186
|
-
id
|
|
1187
|
-
fieldName
|
|
1160
|
+
id String @id @default(uuid())
|
|
1161
|
+
fieldName String @unique @map("field_name")
|
|
1188
1162
|
validateProductOnChange String @default("true") @map("validate_product_on_change")
|
|
1189
|
-
createdAt
|
|
1190
|
-
updatedAt
|
|
1163
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1164
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1191
1165
|
|
|
1192
1166
|
@@map("application_field_configs")
|
|
1193
1167
|
}
|
|
1194
1168
|
|
|
1195
1169
|
// From prisma/applications/application-illustration.prisma
|
|
1196
1170
|
model ApplicationIllustration {
|
|
1197
|
-
id String
|
|
1198
|
-
date DateTime
|
|
1199
|
-
createdAt DateTime
|
|
1200
|
-
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")
|
|
1201
1175
|
|
|
1202
1176
|
@@map("application_illustrations")
|
|
1203
1177
|
}
|
|
1204
1178
|
|
|
1205
1179
|
// From prisma/applications/application-legal.prisma
|
|
1206
1180
|
model ApplicationLegal {
|
|
1207
|
-
id String
|
|
1208
|
-
assignedSolicitor String
|
|
1209
|
-
solicitorsReference String
|
|
1210
|
-
createdAt DateTime
|
|
1211
|
-
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")
|
|
1212
1186
|
|
|
1213
1187
|
@@map("application_legals")
|
|
1214
1188
|
}
|
|
1215
1189
|
|
|
1216
1190
|
// From prisma/applications/application-mortgage.prisma
|
|
1217
1191
|
model ApplicationMortgage {
|
|
1218
|
-
id
|
|
1219
|
-
applicationId
|
|
1220
|
-
pageValidFlag
|
|
1221
|
-
existingMortgageLender
|
|
1222
|
-
topSlicing
|
|
1223
|
-
purposeOfMortgage
|
|
1224
|
-
depositComeFromLids
|
|
1225
|
-
ifOtherDetails
|
|
1226
|
-
purchasePrice
|
|
1227
|
-
repaymentTypeLid
|
|
1228
|
-
exitStrategyLid
|
|
1229
|
-
isCapitalRaise
|
|
1230
|
-
purchaseDate
|
|
1231
|
-
estimatedValue
|
|
1232
|
-
loanRequired
|
|
1233
|
-
monthlyRentalIncome
|
|
1234
|
-
outstandingBalance
|
|
1235
|
-
fundRaisedFor
|
|
1236
|
-
sourceOfFundsLid
|
|
1237
|
-
sourceOfFundDetails
|
|
1238
|
-
propertyValuationDetails
|
|
1239
|
-
telephoneNumber
|
|
1240
|
-
isDistressedSale
|
|
1241
|
-
isPurchasedBelowMarketValue Boolean
|
|
1242
|
-
isPurchasedAsSale
|
|
1243
|
-
isReadyToSell
|
|
1244
|
-
isGovernmentInitiative
|
|
1245
|
-
vendorsName
|
|
1246
|
-
saleMadeLid
|
|
1247
|
-
isTheIntentionToLet
|
|
1248
|
-
proposedTenantsLids
|
|
1249
|
-
leaseTypeLid
|
|
1250
|
-
createdAt
|
|
1251
|
-
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")
|
|
1252
1226
|
|
|
1253
1227
|
// Relations
|
|
1254
|
-
application
|
|
1255
|
-
repaymentType
|
|
1256
|
-
exitStrategy
|
|
1257
|
-
sourceOfFunds
|
|
1258
|
-
saleMade
|
|
1259
|
-
leaseType
|
|
1260
|
-
depositComeFrom
|
|
1261
|
-
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")
|
|
1262
1236
|
|
|
1263
1237
|
@@map("application_mortgages")
|
|
1264
1238
|
}
|
|
1265
1239
|
|
|
1266
1240
|
// From prisma/applications/application-note.prisma
|
|
1267
1241
|
model ApplicationNote {
|
|
1268
|
-
id
|
|
1269
|
-
applicationId
|
|
1270
|
-
noteId
|
|
1271
|
-
createdOn
|
|
1272
|
-
createdBy
|
|
1273
|
-
username
|
|
1274
|
-
createdByUserId
|
|
1275
|
-
typeLid
|
|
1276
|
-
subTypeLid
|
|
1277
|
-
subject
|
|
1278
|
-
note
|
|
1279
|
-
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")
|
|
1280
1254
|
attachmentDocumentId String? @map("attachment_document_id")
|
|
1281
|
-
assignedOperation
|
|
1282
|
-
autoCreated
|
|
1283
|
-
additionalData
|
|
1284
|
-
autoCreatedId
|
|
1285
|
-
assignedTo
|
|
1286
|
-
assignedBy
|
|
1287
|
-
assignedByUserId
|
|
1288
|
-
comment
|
|
1289
|
-
reminderStatus
|
|
1290
|
-
createdAt
|
|
1291
|
-
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")
|
|
1292
1266
|
|
|
1293
1267
|
// Relations
|
|
1294
|
-
application
|
|
1295
|
-
type
|
|
1296
|
-
subType
|
|
1297
|
-
createdByUser
|
|
1298
|
-
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])
|
|
1299
1273
|
|
|
1300
1274
|
@@map("application_notes")
|
|
1301
1275
|
}
|
|
1302
1276
|
|
|
1303
1277
|
// From prisma/applications/application-offer.prisma
|
|
1304
1278
|
model ApplicationOffer {
|
|
1305
|
-
id String
|
|
1306
|
-
date String
|
|
1307
|
-
createdAt DateTime
|
|
1308
|
-
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")
|
|
1309
1283
|
|
|
1310
1284
|
@@map("application_offers")
|
|
1311
1285
|
}
|
|
1312
1286
|
|
|
1313
1287
|
// From prisma/applications/application-onboarding.prisma
|
|
1314
1288
|
model ApplicationOnboarding {
|
|
1315
|
-
id
|
|
1316
|
-
errors
|
|
1317
|
-
status
|
|
1318
|
-
statusDate
|
|
1319
|
-
warnings
|
|
1320
|
-
createdAt
|
|
1321
|
-
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")
|
|
1322
1296
|
|
|
1323
1297
|
@@map("application_onboardings")
|
|
1324
1298
|
}
|
|
1325
1299
|
|
|
1326
1300
|
// From prisma/applications/application-product.prisma
|
|
1327
1301
|
model ApplicationProduct {
|
|
1328
|
-
id
|
|
1329
|
-
applicationId
|
|
1330
|
-
selectedProduct
|
|
1331
|
-
lendingTypeLid
|
|
1332
|
-
pageValidFlag
|
|
1333
|
-
repaymentTypeLid
|
|
1334
|
-
numberOfYearsToRepay
|
|
1335
|
-
repaymentVehicle
|
|
1336
|
-
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")
|
|
1337
1311
|
isFinanceRecommendedToApplicantLid String? @map("is_finance_recommended_to_applicant_lid")
|
|
1338
|
-
procFeeRateLid
|
|
1339
|
-
networkClubSubmission
|
|
1340
|
-
clubNetworkNameLid
|
|
1341
|
-
introducerSubmission
|
|
1342
|
-
introducer
|
|
1343
|
-
bdm
|
|
1344
|
-
tempAppFee
|
|
1345
|
-
productFeePaymentTypeLid
|
|
1346
|
-
createdAt
|
|
1347
|
-
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")
|
|
1348
1322
|
|
|
1349
1323
|
// Relations
|
|
1350
|
-
application
|
|
1351
|
-
lendingType
|
|
1352
|
-
repaymentType
|
|
1353
|
-
isFinanceRecommendedToApplicant
|
|
1354
|
-
procFeeRate
|
|
1355
|
-
clubNetworkName
|
|
1356
|
-
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])
|
|
1357
1331
|
|
|
1358
1332
|
@@map("application_products")
|
|
1359
1333
|
}
|
|
1360
1334
|
|
|
1361
1335
|
// From prisma/applications/application-rationale.prisma
|
|
1362
1336
|
model ApplicationRationale {
|
|
1363
|
-
id String
|
|
1364
|
-
applicationId String
|
|
1365
|
-
affordabilityDescription String
|
|
1366
|
-
affordabilityAreaOfOfferCondition String
|
|
1367
|
-
affordabilityAreaOfConcern String
|
|
1368
|
-
affordabilityStatusLid String?
|
|
1369
|
-
applicantsDescription String
|
|
1370
|
-
applicantsAreaOfOfferCondition String
|
|
1371
|
-
applicantsAreaOfConcern String
|
|
1372
|
-
applicantsStatusLid String?
|
|
1373
|
-
creditConductDescription String
|
|
1374
|
-
creditConductAreaOfOfferCondition String
|
|
1375
|
-
creditConductAreaOfConcern String
|
|
1376
|
-
creditConductStatusLid String?
|
|
1377
|
-
fraudCheckDescription String
|
|
1378
|
-
fraudCheckAreaOfOfferCondition String
|
|
1379
|
-
fraudCheckAreaOfConcern String
|
|
1380
|
-
fraudCheckStatusLid String?
|
|
1381
|
-
incomeSourceDescription String
|
|
1382
|
-
incomeSourceAreaOfOfferCondition String
|
|
1383
|
-
incomeSourceAreaOfConcern String
|
|
1384
|
-
incomeSourceStatusLid String?
|
|
1385
|
-
loanDescription String
|
|
1386
|
-
loanAreaOfOfferCondition String
|
|
1387
|
-
loanAreaOfConcern String
|
|
1388
|
-
loanStatusLid String?
|
|
1389
|
-
securityDescription String
|
|
1390
|
-
securityAreaOfOfferCondition String
|
|
1391
|
-
securityAreaOfConcern String
|
|
1392
|
-
securityStatusLid String?
|
|
1393
|
-
propertyDescription String
|
|
1394
|
-
propertyAreaOfOfferCondition String
|
|
1395
|
-
propertyAreaOfConcern String
|
|
1396
|
-
propertyStatusLid String?
|
|
1397
|
-
createdAt DateTime
|
|
1398
|
-
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")
|
|
1399
1373
|
|
|
1400
1374
|
// Relations
|
|
1401
|
-
application
|
|
1402
|
-
affordabilityStatus
|
|
1403
|
-
applicantsStatus
|
|
1404
|
-
creditConductStatus
|
|
1405
|
-
fraudCheckStatus
|
|
1406
|
-
incomeSourceStatus
|
|
1407
|
-
loanStatus
|
|
1408
|
-
securityStatus
|
|
1409
|
-
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])
|
|
1410
1384
|
|
|
1411
1385
|
@@map("application_rationales")
|
|
1412
1386
|
}
|
|
1413
1387
|
|
|
1414
|
-
// From prisma/applications/application-risk-narrative.prisma
|
|
1415
|
-
model ApplicationRiskNarrative {
|
|
1416
|
-
id String @id @default(uuid())
|
|
1417
|
-
call1RequestedOn String? @map("call1_requested_on")
|
|
1418
|
-
call2RequestedOn String? @map("call2_requested_on")
|
|
1419
|
-
call2StatusLid String? @map("call2_status_lid")
|
|
1420
|
-
rationaleForRiskRating String? @map("rationale_for_risk_rating")
|
|
1421
|
-
retryCount String? @map("retry_count")
|
|
1422
|
-
riskRating String? @map("risk_rating")
|
|
1423
|
-
statusLid String? @map("status_lid")
|
|
1424
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
1425
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1426
|
-
|
|
1427
|
-
// Relations
|
|
1428
|
-
call2Status Lookup? @relation("Call2Status", fields: [call2StatusLid], references: [id])
|
|
1429
|
-
status Lookup? @relation("Status", fields: [statusLid], references: [id])
|
|
1430
|
-
|
|
1431
|
-
@@map("application_risk_narratives")
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
// From prisma/applications/application-valuation.prisma
|
|
1435
|
-
model ApplicationValuation {
|
|
1436
|
-
id String @id @default(uuid())
|
|
1437
|
-
amount String? @map("amount")
|
|
1438
|
-
epcRating String @default("") @map("epc_rating")
|
|
1439
|
-
epcScore String? @map("epc_score")
|
|
1440
|
-
estimatedRentalValue String? @map("estimated_rental_value")
|
|
1441
|
-
instructionId String @default("") @map("instruction_id")
|
|
1442
|
-
instructionStatus String @default("") @map("instruction_status")
|
|
1443
|
-
instructionStatusComment String @default("") @map("instruction_status_comment")
|
|
1444
|
-
isManual String @default("false") @map("is_manual")
|
|
1445
|
-
squareMetres String? @map("square_metres")
|
|
1446
|
-
valuerNotes String @default("") @map("valuer_notes")
|
|
1447
|
-
version String @default("") @map("version")
|
|
1448
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
1449
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1450
|
-
|
|
1451
|
-
@@map("application_valuations")
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
1388
|
// From prisma/applications/application.prisma
|
|
1455
1389
|
model Application {
|
|
1456
|
-
id
|
|
1457
|
-
queueId
|
|
1458
|
-
assignedToUserId
|
|
1459
|
-
applicationId
|
|
1460
|
-
isApplicationFeePaid
|
|
1461
|
-
applicationNumber
|
|
1462
|
-
applicationTypeLid
|
|
1463
|
-
bankSolicitor
|
|
1464
|
-
brokerId
|
|
1465
|
-
caseManager
|
|
1466
|
-
caseManagerAccepted
|
|
1467
|
-
completedReason
|
|
1468
|
-
isIntendToOccupy
|
|
1469
|
-
introducer
|
|
1470
|
-
isIntroducerSubmission
|
|
1471
|
-
isBrokerAssigned
|
|
1472
|
-
isFinanceRecommendedToApplicant
|
|
1473
|
-
isWorkflowTaskCreated
|
|
1474
|
-
lastUpdated
|
|
1475
|
-
lendingTypeLid
|
|
1476
|
-
networkClubName
|
|
1477
|
-
isNetworkClubSubmission
|
|
1478
|
-
newReason
|
|
1479
|
-
purchaseTypeLid
|
|
1480
|
-
rejectedReason
|
|
1481
|
-
repaymentTypeLid
|
|
1482
|
-
selectedProduct
|
|
1483
|
-
sourceOfWealthLids
|
|
1484
|
-
sowBusiness
|
|
1485
|
-
sowInheritance
|
|
1486
|
-
sowOther
|
|
1487
|
-
sowProperty
|
|
1488
|
-
sowSalary
|
|
1489
|
-
statusLid
|
|
1490
|
-
submitReason
|
|
1491
|
-
submittedDate
|
|
1492
|
-
underwriter
|
|
1493
|
-
isValuationFeePaid
|
|
1494
|
-
withdrawalReason
|
|
1495
|
-
withdrawalReasonCode
|
|
1496
|
-
productId
|
|
1497
|
-
securityId
|
|
1498
|
-
solicitorId
|
|
1499
|
-
isActive
|
|
1500
|
-
isUkResident
|
|
1501
|
-
riskRating
|
|
1502
|
-
directDebitId
|
|
1503
|
-
mortgageId
|
|
1504
|
-
companyId
|
|
1505
|
-
rationaleId
|
|
1506
|
-
newAuditRecordsCount
|
|
1507
|
-
currentApprivoAuditId
|
|
1508
|
-
propertyIds
|
|
1509
|
-
createdAt
|
|
1510
|
-
updatedAt
|
|
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")
|
|
1511
1454
|
|
|
1512
1455
|
// Relations
|
|
1513
|
-
broker
|
|
1514
|
-
security
|
|
1515
|
-
solicitor
|
|
1516
|
-
product
|
|
1517
|
-
directDebit
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1456
|
+
broker Broker @relation("BrokerApplications", fields: [brokerId], references: [id])
|
|
1457
|
+
security Security?
|
|
1458
|
+
solicitor Solicitor?
|
|
1459
|
+
product Product? @relation(fields: [productId], references: [id])
|
|
1460
|
+
directDebit ApplicationDirectDebit? @relation("ApplicationDirectDebit")
|
|
1461
|
+
creditProfile ApplicationCreditProfile? @relation("ApplicationCreditProfile")
|
|
1462
|
+
mortgage ApplicationMortgage? @relation("ApplicationMortgage")
|
|
1463
|
+
company ApplicationCompany? @relation("ApplicationCompany")
|
|
1464
|
+
rationale ApplicationRationale? @relation("ApplicationRationale")
|
|
1465
|
+
applicants Applicant[]
|
|
1466
|
+
properties Property[] @relation("ApplicationProperties")
|
|
1467
|
+
documents ApplicationDocument[]
|
|
1468
|
+
notes ApplicationNote[]
|
|
1469
|
+
audits ApplicationAudit[]
|
|
1470
|
+
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
1471
|
+
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
1472
|
+
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
1473
|
+
companies Company[] @relation("ApplicationCompany")
|
|
1474
|
+
|
|
1524
1475
|
// Lookup relations
|
|
1525
|
-
applicationType
|
|
1526
|
-
lendingType
|
|
1527
|
-
purchaseType
|
|
1528
|
-
repaymentType
|
|
1529
|
-
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
1530
|
-
DirectDebit DirectDebit[]
|
|
1531
|
-
ApplicationAudit ApplicationAudit[]
|
|
1532
|
-
ApplicationDocument ApplicationDocument[]
|
|
1533
|
-
ApplicationNote ApplicationNote[]
|
|
1534
|
-
ApplicationProduct ApplicationProduct[]
|
|
1535
|
-
Company Company[]
|
|
1536
|
-
Underwriter Underwriter[]
|
|
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])
|
|
1537
1480
|
|
|
1481
|
+
@@map("applications")
|
|
1538
1482
|
@@index([applicationTypeLid])
|
|
1539
1483
|
@@index([lendingTypeLid])
|
|
1540
1484
|
@@index([purchaseTypeLid])
|
|
1541
1485
|
@@index([statusLid])
|
|
1542
1486
|
@@index([repaymentTypeLid])
|
|
1543
|
-
@@map("applications")
|
|
1544
1487
|
}
|
|
1545
1488
|
|
|
1546
1489
|
// From prisma/applications/broker.prisma
|
|
1547
1490
|
model Broker {
|
|
1548
|
-
id String
|
|
1549
|
-
brokerId String?
|
|
1550
|
-
landlinePhone String?
|
|
1551
|
-
mobileTelephone String?
|
|
1552
|
-
addressPostCode String?
|
|
1553
|
-
addressLine1 String?
|
|
1554
|
-
addressLine2 String?
|
|
1555
|
-
addressLine3 String?
|
|
1556
|
-
addressCity String?
|
|
1557
|
-
addressCountry String?
|
|
1558
|
-
tradingName String?
|
|
1559
|
-
fcaNumber String?
|
|
1560
|
-
brokerType String?
|
|
1561
|
-
email String?
|
|
1562
|
-
network String?
|
|
1563
|
-
firstName String?
|
|
1564
|
-
lastName String?
|
|
1565
|
-
createdAt DateTime
|
|
1566
|
-
updatedAt DateTime
|
|
1567
|
-
|
|
1491
|
+
id String @id @default(uuid())
|
|
1492
|
+
brokerId String? @map("broker_id")
|
|
1493
|
+
landlinePhone String? @map("landline_phone")
|
|
1494
|
+
mobileTelephone String? @map("mobile_telephone")
|
|
1495
|
+
addressPostCode String? @map("address_post_code")
|
|
1496
|
+
addressLine1 String? @map("address_line1")
|
|
1497
|
+
addressLine2 String? @map("address_line2")
|
|
1498
|
+
addressLine3 String? @map("address_line3")
|
|
1499
|
+
addressCity String? @map("address_city")
|
|
1500
|
+
addressCountry String? @map("address_country")
|
|
1501
|
+
tradingName String? @map("trading_name")
|
|
1502
|
+
fcaNumber String? @map("fca_number")
|
|
1503
|
+
brokerType String? @map("broker_type")
|
|
1504
|
+
email String? @map("email")
|
|
1505
|
+
network String? @map("network")
|
|
1506
|
+
firstName String? @map("first_name")
|
|
1507
|
+
lastName String? @map("last_name")
|
|
1508
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1509
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1510
|
+
|
|
1511
|
+
// Relations
|
|
1512
|
+
applications Application[] @relation("BrokerApplications")
|
|
1513
|
+
|
|
1568
1514
|
|
|
1569
1515
|
@@map("brokers")
|
|
1570
1516
|
}
|
|
1571
1517
|
|
|
1572
1518
|
// From prisma/applications/checklist-item.prisma
|
|
1573
1519
|
model ChecklistItem {
|
|
1574
|
-
id
|
|
1575
|
-
additionalOfferConditions
|
|
1576
|
-
appFormSignedNotes
|
|
1577
|
-
applicationCompletionDate
|
|
1578
|
-
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")
|
|
1579
1525
|
buildingInsurancePolicyNumber String @default("") @map("building_insurance_policy_number")
|
|
1580
|
-
buildingInsuranceReceived
|
|
1581
|
-
buildingInsuranceRenewalDate
|
|
1582
|
-
dateOfValuationReceived
|
|
1583
|
-
feePaidDocumentsDownloaded
|
|
1584
|
-
feePaidNotes
|
|
1585
|
-
fundsNotes
|
|
1586
|
-
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")
|
|
1587
1533
|
hasAllDocsReviewedAndAccepted String @default("") @map("has_all_docs_reviewed_and_accepted")
|
|
1588
|
-
idnPorReceived
|
|
1589
|
-
legalCompletionDate
|
|
1590
|
-
legalDocsReceived
|
|
1591
|
-
legalNotes
|
|
1592
|
-
ninetyDaysValuationAmount
|
|
1593
|
-
offerConditionsItems
|
|
1594
|
-
offerConditionsMet
|
|
1595
|
-
offerNotes
|
|
1596
|
-
offerOfferPrepared
|
|
1597
|
-
offerOfferReviewed
|
|
1598
|
-
offerSignedNotes
|
|
1599
|
-
offerSolicitorInstructedDate
|
|
1600
|
-
packagingNotes
|
|
1601
|
-
preOfferNotes
|
|
1602
|
-
reinstatementAmount
|
|
1603
|
-
rotReceived
|
|
1604
|
-
rotReceivedDate
|
|
1605
|
-
salesContractReceived
|
|
1606
|
-
underwritingNotes
|
|
1607
|
-
underwritingValuationNotes
|
|
1608
|
-
valuationAccepted
|
|
1609
|
-
valuationFurtherConditions
|
|
1610
|
-
valuationNotes
|
|
1611
|
-
valuationReceived
|
|
1612
|
-
valuationRequestedDate
|
|
1613
|
-
valuationScheduledDate
|
|
1614
|
-
valuationSurveyorDetails
|
|
1615
|
-
createdAt
|
|
1616
|
-
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")
|
|
1617
1563
|
|
|
1618
1564
|
@@map("checklist_items")
|
|
1619
1565
|
}
|
|
1620
1566
|
|
|
1621
1567
|
// From prisma/applications/company.prisma
|
|
1622
1568
|
model Company {
|
|
1623
|
-
id
|
|
1624
|
-
applicationId
|
|
1625
|
-
pageValidFlag
|
|
1626
|
-
registeredName
|
|
1627
|
-
businessTypeLid
|
|
1628
|
-
registeredNumber
|
|
1629
|
-
taxJurisdictionLid
|
|
1630
|
-
tradingSince
|
|
1631
|
-
natureOfBusiness
|
|
1632
|
-
yearEnd
|
|
1633
|
-
addressPostCode
|
|
1634
|
-
addressLine1
|
|
1635
|
-
addressLine2
|
|
1636
|
-
addressLine3
|
|
1637
|
-
addressCity
|
|
1638
|
-
addressCountryLid
|
|
1639
|
-
applicationTypeLid
|
|
1640
|
-
yearEnd1
|
|
1641
|
-
turnoverYear1
|
|
1642
|
-
netProfitYear1
|
|
1643
|
-
yearEnd2
|
|
1644
|
-
turnoverYear2
|
|
1645
|
-
netProfitYear2
|
|
1646
|
-
yearEnd3
|
|
1647
|
-
turnoverYear3
|
|
1648
|
-
netProfitYear3
|
|
1649
|
-
companyCreditDefaults
|
|
1650
|
-
companyCountyCourtJudgment
|
|
1651
|
-
companySecuredArrears
|
|
1652
|
-
companyUnsecuredArrears
|
|
1653
|
-
companyBankruptcy
|
|
1654
|
-
companyBankruptcyYes
|
|
1655
|
-
companyBankruptcyNo
|
|
1656
|
-
companyCCJInLastThreeYearYes
|
|
1657
|
-
companyCCJInLastThreeYearNo
|
|
1658
|
-
companyDefaultsInLastYearYes
|
|
1659
|
-
companyDefaultsInLastYearNo
|
|
1660
|
-
companyAnyVoluntaryEnforcedPossessionYes Boolean
|
|
1661
|
-
companyAnyVoluntaryEnforcedPossessionNo Boolean
|
|
1662
|
-
doYouKnowRegisteredNumber
|
|
1663
|
-
sicCodes
|
|
1664
|
-
epc
|
|
1665
|
-
remainingLease
|
|
1666
|
-
dateOfIncorporation
|
|
1667
|
-
createdAt
|
|
1668
|
-
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")
|
|
1669
1615
|
|
|
1670
1616
|
// Relations
|
|
1671
|
-
application
|
|
1672
|
-
businessType
|
|
1673
|
-
taxJurisdiction
|
|
1674
|
-
addressCountry
|
|
1675
|
-
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])
|
|
1676
1622
|
applicantShareholdings ApplicantShareholding[]
|
|
1677
1623
|
|
|
1678
1624
|
@@map("companies")
|
|
1679
1625
|
}
|
|
1680
1626
|
|
|
1681
1627
|
model ApplicantShareholding {
|
|
1682
|
-
id
|
|
1683
|
-
companyId
|
|
1684
|
-
applicantId
|
|
1685
|
-
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")
|
|
1686
1632
|
directorShareholderLid String? @map("director_shareholder_lid")
|
|
1687
|
-
shareholding
|
|
1688
|
-
createdAt
|
|
1689
|
-
updatedAt
|
|
1633
|
+
shareholding Int? @map("shareholding")
|
|
1634
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1635
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1690
1636
|
|
|
1691
1637
|
// Relations
|
|
1692
|
-
company
|
|
1693
|
-
applicant
|
|
1694
|
-
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])
|
|
1695
1641
|
|
|
1696
1642
|
@@map("applicant_shareholdings")
|
|
1697
1643
|
}
|
|
1698
1644
|
|
|
1699
1645
|
// From prisma/applications/product-features.prisma
|
|
1700
1646
|
model ProductFeatures {
|
|
1701
|
-
id
|
|
1702
|
-
name
|
|
1703
|
-
clientAdvance
|
|
1704
|
-
ltv
|
|
1705
|
-
repayment
|
|
1706
|
-
variableRepayment
|
|
1707
|
-
reversionRateWithoutBaseRate
|
|
1708
|
-
totalReversionRate
|
|
1709
|
-
initialRate
|
|
1710
|
-
fixedTerm
|
|
1711
|
-
fixedTermEndDate
|
|
1712
|
-
baseRate
|
|
1713
|
-
productRate
|
|
1714
|
-
apr
|
|
1715
|
-
rentalCoverage
|
|
1716
|
-
repaymentType
|
|
1717
|
-
applicationCategory
|
|
1718
|
-
securityType
|
|
1719
|
-
erc
|
|
1720
|
-
loanType
|
|
1721
|
-
maxLtvLimit
|
|
1722
|
-
reimbursement
|
|
1723
|
-
reimbursementPerPound
|
|
1724
|
-
stressedApr
|
|
1725
|
-
stressedRate
|
|
1726
|
-
stressedRepayment
|
|
1727
|
-
liborFloorRate
|
|
1728
|
-
totalTermInMonths
|
|
1729
|
-
chargeType
|
|
1730
|
-
productCategory
|
|
1731
|
-
ercCode
|
|
1732
|
-
variableTerm
|
|
1733
|
-
totalFeePayable
|
|
1734
|
-
dipIssueDate
|
|
1735
|
-
estimatedCompletionDate
|
|
1736
|
-
dipExpiryDate
|
|
1737
|
-
fixedRepaymentUntillDate
|
|
1738
|
-
rentalReviewDate
|
|
1739
|
-
totalReimbursementWithFee
|
|
1740
|
-
finalRentPayment
|
|
1741
|
-
clientDeposit
|
|
1742
|
-
firstRentPayment
|
|
1743
|
-
ercFeatures
|
|
1744
|
-
icr
|
|
1745
|
-
ufssProductCode
|
|
1746
|
-
ufssInterestRateCode
|
|
1747
|
-
stressedPayment
|
|
1748
|
-
stressedPaymentRate
|
|
1749
|
-
createdAt
|
|
1750
|
-
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")
|
|
1751
1697
|
|
|
1752
1698
|
@@map("product_features")
|
|
1753
1699
|
}
|
|
@@ -1781,40 +1727,40 @@ model Solicitor {
|
|
|
1781
1727
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1782
1728
|
|
|
1783
1729
|
// Relations
|
|
1784
|
-
application
|
|
1785
|
-
addressCountry
|
|
1730
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1731
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1786
1732
|
|
|
1787
1733
|
@@map("solicitors")
|
|
1788
1734
|
}
|
|
1789
1735
|
|
|
1790
1736
|
// From prisma/properties/property.prisma
|
|
1791
1737
|
model Property {
|
|
1792
|
-
id
|
|
1793
|
-
applicationId
|
|
1794
|
-
pageValidFlag
|
|
1795
|
-
propertyId
|
|
1796
|
-
addressLine1
|
|
1797
|
-
addressLine2
|
|
1798
|
-
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")
|
|
1799
1745
|
associatedLoanPartiesIds String[] @map("associated_loan_parties_ids")
|
|
1800
|
-
city
|
|
1801
|
-
countryLid
|
|
1802
|
-
lender
|
|
1803
|
-
marketValue
|
|
1804
|
-
monthlyRent
|
|
1805
|
-
monthlyRepayment
|
|
1806
|
-
originalLoanBalance
|
|
1807
|
-
outstandingBalance
|
|
1808
|
-
otherOwnershipParties
|
|
1809
|
-
postCode
|
|
1810
|
-
remainingTerm
|
|
1811
|
-
portfolioFile
|
|
1812
|
-
createdAt
|
|
1813
|
-
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")
|
|
1814
1760
|
|
|
1815
1761
|
// Relations
|
|
1816
|
-
application
|
|
1817
|
-
country
|
|
1762
|
+
application Application @relation("ApplicationProperties", fields: [applicationId], references: [id])
|
|
1763
|
+
country Lookup @relation("PropertyCountry", fields: [countryLid], references: [id])
|
|
1818
1764
|
|
|
1819
1765
|
@@map("properties")
|
|
1820
1766
|
}
|
|
@@ -1868,11 +1814,11 @@ model Security {
|
|
|
1868
1814
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1869
1815
|
|
|
1870
1816
|
// Relations
|
|
1871
|
-
application
|
|
1872
|
-
propertyAddressCountry
|
|
1873
|
-
propertyTenure
|
|
1874
|
-
propertyType
|
|
1875
|
-
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?
|
|
1876
1822
|
|
|
1877
1823
|
@@map("securities")
|
|
1878
1824
|
}
|
|
@@ -1896,30 +1842,30 @@ model DataStreet {
|
|
|
1896
1842
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1897
1843
|
|
|
1898
1844
|
// Relations
|
|
1899
|
-
security
|
|
1845
|
+
security Security @relation(fields: [securityId], references: [id])
|
|
1900
1846
|
|
|
1901
1847
|
@@map("data_streets")
|
|
1902
1848
|
}
|
|
1903
1849
|
|
|
1904
1850
|
// From prisma/underwriter/underwriter.prisma
|
|
1905
1851
|
model Underwriter {
|
|
1906
|
-
id
|
|
1907
|
-
applicationId
|
|
1908
|
-
status
|
|
1909
|
-
decision
|
|
1910
|
-
decisionDate
|
|
1911
|
-
decisionNotes
|
|
1912
|
-
riskRating
|
|
1913
|
-
riskNotes
|
|
1914
|
-
underwriterId
|
|
1915
|
-
assignedDate
|
|
1916
|
-
completedDate
|
|
1917
|
-
createdAt
|
|
1918
|
-
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")
|
|
1919
1865
|
|
|
1920
1866
|
// Relations
|
|
1921
|
-
application
|
|
1922
|
-
underwriter
|
|
1867
|
+
application Application @relation("ApplicationUnderwriters", fields: [applicationId], references: [id])
|
|
1868
|
+
underwriter User @relation("UserUnderwriters", fields: [underwriterId], references: [id])
|
|
1923
1869
|
|
|
1924
1870
|
@@map("underwriters")
|
|
1925
|
-
}
|
|
1871
|
+
}
|