@dynamatix/gb-schemas 2.0.24 → 2.0.26
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-additional-income.model.d.ts +47 -927
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-additional-income.model.js +3 -23
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +32 -0
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-creditCard.model.js +1 -0
- package/dist/applicants/applicant-commitment-loan.model.d.ts +32 -0
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.js +1 -0
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +32 -0
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +1 -0
- 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 +26 -0
- package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment.model.d.ts +26 -0
- package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.d.ts +26 -0
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- 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 +26 -12
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.d.ts +314 -0
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.js +13 -0
- 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-uk-tax-credits.model.d.ts +314 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
- package/dist/applicants/applicant-uk-tax-credits.model.js +2 -0
- package/dist/applicants/applicant.model.d.ts +27 -0
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- 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-productfeatures.model.d.ts +27 -0
- package/dist/applications/application-productfeatures.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/solicitor.model.d.ts +26 -0
- package/dist/applications/solicitor.model.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.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/applications/application-direct-debit.entity.ts +1 -1
- package/package.json +1 -1
- package/prisma/applicants/applicant.prisma +123 -124
- package/prisma/applications/application-direct-debit.prisma +3 -3
- package/prisma/applications/application.prisma +2 -0
- package/prisma/migrations/20250508092417_update_application_schema/migration.sql +3 -0
- package/prisma/migrations/20250508094735_update_direct_debit_schema/migration.sql +2 -0
- package/prisma/schema.prisma +126 -125
- package/dist/applicants/applicant-credit-data.model.js +0 -11
- package/dist/applicants/applicant-credit-profile.model.js +0 -20
- package/dist/applicants/applicant-direct-debit.model.js +0 -17
- package/dist/applicants/applicant-employment.model.js +0 -50
- package/dist/applicants/applicant-expenditure.model.js +0 -54
- package/dist/applicants/applicant-income-source.model.js +0 -9
- package/dist/applicants/applicant-income.model.js +0 -81
- package/dist/applicants/applicant-risk-narrative.model.js +0 -13
- package/dist/applicants/applicant.model.js +0 -223
- package/dist/applicants/index.js +0 -13
- package/dist/applications/application-audit.model.js +0 -42
- package/dist/applications/application-checklist-Item.model.js +0 -45
- package/dist/applications/application-company-model.js +0 -120
- package/dist/applications/application-credit-profile.model.js +0 -12
- package/dist/applications/application-direct-debit.model.js +0 -92
- package/dist/applications/application-document.model.js +0 -35
- package/dist/applications/application-fieldconfig.model.js +0 -7
- package/dist/applications/application-illustration-model.js +0 -6
- package/dist/applications/application-legal.model.js +0 -7
- package/dist/applications/application-mortgage.model.js +0 -271
- package/dist/applications/application-note.model.js +0 -78
- package/dist/applications/application-offer.model.js +0 -6
- package/dist/applications/application-onboarding.model.js +0 -9
- package/dist/applications/application-product.model.js +0 -67
- package/dist/applications/application-rationale.model.js +0 -38
- package/dist/applications/application-risk-narrative.model.js +0 -12
- package/dist/applications/application-valuation.model.js +0 -15
- package/dist/applications/application.model.js +0 -153
- package/dist/applications/broker.model.js +0 -21
- package/dist/applications/document.model.js +0 -35
- package/dist/applications/index.js +0 -20
- package/dist/applications/solicitor.model.js +0 -114
- package/dist/index.js +0 -9
- package/dist/product-catalogues/index.js +0 -3
- package/dist/product-catalogues/product-catalogue.model.js +0 -18
- package/dist/product-catalogues/product-definitions.model.js +0 -26
- package/dist/product-catalogues/product-variant.model.js +0 -12
- package/dist/properties/index.js +0 -2
- package/dist/properties/property.model.js +0 -144
- package/dist/shared/alert.model.js +0 -24
- package/dist/shared/apprivo-sync-journey.model.js +0 -17
- package/dist/shared/checklist.model.js +0 -30
- package/dist/shared/document-type-model.js +0 -10
- package/dist/shared/index.js +0 -12
- package/dist/shared/job-run.model.js +0 -14
- package/dist/shared/job-setting.model.js +0 -11
- package/dist/shared/lookup-group.model.js +0 -16
- package/dist/shared/lookup.model.js +0 -20
- package/dist/shared/system-parameter.model.js +0 -32
- package/dist/shared/task-document.model.js +0 -23
- package/dist/shared/task.model.js +0 -15
- package/dist/underwriter/index.js +0 -1
- package/dist/underwriter/underwriter.model.js +0 -17
- package/dist/users/auth-log.model.js +0 -21
- package/dist/users/index.js +0 -6
- package/dist/users/permission.model.js +0 -10
- package/dist/users/role-group.model.js +0 -14
- package/dist/users/role.model.js +0 -13
- package/dist/users/tasks.model.js +0 -15
- package/dist/users/user.model.js +0 -30
|
@@ -1,130 +1,129 @@
|
|
|
1
1
|
model Applicant {
|
|
2
|
-
id
|
|
3
|
-
applicantId
|
|
4
|
-
applicationId
|
|
5
|
-
addressCity
|
|
6
|
-
addressCountryLid
|
|
7
|
-
addressLine1
|
|
8
|
-
addressLine2
|
|
9
|
-
addressLine3
|
|
10
|
-
addressMovedDate
|
|
11
|
-
addressPostCode
|
|
12
|
-
correspondenceAddressCity
|
|
13
|
-
correspondenceAddressCountryLid
|
|
14
|
-
correspondenceAddressLine1
|
|
15
|
-
correspondenceAddressLine2
|
|
16
|
-
correspondenceAddressLine3
|
|
17
|
-
correspondenceAddressPostCode
|
|
18
|
-
countryOfResidenceLid
|
|
19
|
-
dateOfBirth
|
|
20
|
-
dependant10Age
|
|
21
|
-
dependant1Age
|
|
22
|
-
dependant2Age
|
|
23
|
-
dependant3Age
|
|
24
|
-
dependant4Age
|
|
25
|
-
dependant5Age
|
|
26
|
-
dependant6Age
|
|
27
|
-
dependant7Age
|
|
28
|
-
dependant8Age
|
|
29
|
-
dependant9Age
|
|
30
|
-
email
|
|
31
|
-
employmentStatusDetails
|
|
32
|
-
firstName
|
|
33
|
-
isFirstTimelandlord
|
|
34
|
-
foreignIdForNationals
|
|
35
|
-
gdprEmail
|
|
36
|
-
gdprPost
|
|
37
|
-
gdprTelephone
|
|
38
|
-
gdprTextMessage
|
|
39
|
-
gender
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicantId String @unique
|
|
4
|
+
applicationId String @map("application_id")
|
|
5
|
+
addressCity String?
|
|
6
|
+
addressCountryLid String? @map("address_country_lid")
|
|
7
|
+
addressLine1 String?
|
|
8
|
+
addressLine2 String?
|
|
9
|
+
addressLine3 String?
|
|
10
|
+
addressMovedDate String?
|
|
11
|
+
addressPostCode String?
|
|
12
|
+
correspondenceAddressCity String?
|
|
13
|
+
correspondenceAddressCountryLid String? @map("correspondence_address_country_lid")
|
|
14
|
+
correspondenceAddressLine1 String?
|
|
15
|
+
correspondenceAddressLine2 String?
|
|
16
|
+
correspondenceAddressLine3 String?
|
|
17
|
+
correspondenceAddressPostCode String?
|
|
18
|
+
countryOfResidenceLid String @map("country_of_residence_lid")
|
|
19
|
+
dateOfBirth String
|
|
20
|
+
dependant10Age Int @default(0)
|
|
21
|
+
dependant1Age Int @default(0)
|
|
22
|
+
dependant2Age Int @default(0)
|
|
23
|
+
dependant3Age Int @default(0)
|
|
24
|
+
dependant4Age Int @default(0)
|
|
25
|
+
dependant5Age Int @default(0)
|
|
26
|
+
dependant6Age Int @default(0)
|
|
27
|
+
dependant7Age Int @default(0)
|
|
28
|
+
dependant8Age Int @default(0)
|
|
29
|
+
dependant9Age Int @default(0)
|
|
30
|
+
email String
|
|
31
|
+
employmentStatusDetails String?
|
|
32
|
+
firstName String
|
|
33
|
+
isFirstTimelandlord Boolean @default(false)
|
|
34
|
+
foreignIdForNationals String?
|
|
35
|
+
gdprEmail Boolean @default(false)
|
|
36
|
+
gdprPost Boolean @default(false)
|
|
37
|
+
gdprTelephone Boolean @default(false)
|
|
38
|
+
gdprTextMessage Boolean @default(false)
|
|
39
|
+
gender String
|
|
40
40
|
hasBrokerGivenConsentForVulnerabilities Boolean
|
|
41
|
-
hasLinkedJurisdiction
|
|
42
|
-
isCorrespondence
|
|
43
|
-
isCommitmentConfirmed
|
|
44
|
-
isCurrentContract
|
|
45
|
-
isCustomerVulnerable
|
|
46
|
-
isExpat
|
|
47
|
-
isFirstApplicant
|
|
48
|
-
isUkPassport
|
|
49
|
-
isUkResident
|
|
50
|
-
classLid
|
|
51
|
-
pageValidFlag
|
|
52
|
-
lastName
|
|
53
|
-
linkedJurisdictionCountryLid
|
|
54
|
-
linkedJurisdictionDetails
|
|
55
|
-
maidenName
|
|
56
|
-
maritalStatusLid
|
|
57
|
-
mobileNumber
|
|
58
|
-
nationalityLid
|
|
59
|
-
netIncome
|
|
60
|
-
niNumber
|
|
61
|
-
numberOfDependants
|
|
62
|
-
isOneYearPrior
|
|
63
|
-
phoneNumber
|
|
64
|
-
previous1AddressCity
|
|
65
|
-
previous1AddressCountryLid
|
|
66
|
-
previous1AddressLine1
|
|
67
|
-
previous1AddressLine2
|
|
68
|
-
previous1AddressLine3
|
|
69
|
-
previous1AddressMovedDate
|
|
70
|
-
previous1AddressPostCode
|
|
71
|
-
previous1AddressPropertyOwnedBy
|
|
72
|
-
previous2AddressCity
|
|
73
|
-
previous2AddressCountryLid
|
|
74
|
-
previous2AddressLine1
|
|
75
|
-
previous2AddressLine2
|
|
76
|
-
previous2AddressLine3
|
|
77
|
-
previous2AddressMovedDate
|
|
78
|
-
previous2AddressPostCode
|
|
79
|
-
previous2AddressPropertyOwnedBy
|
|
80
|
-
relationshipToOthers
|
|
81
|
-
residentialStatusLid
|
|
82
|
-
retirementAge
|
|
83
|
-
taxJurisdictionLid
|
|
84
|
-
taxPayerLid
|
|
85
|
-
timeResidedAtCountryOfResidence
|
|
86
|
-
title
|
|
87
|
-
isTwoYearPrior
|
|
88
|
-
understandEnglish
|
|
89
|
-
vulnerabilityNotes
|
|
90
|
-
vulnerabilityTypeLids
|
|
91
|
-
ukPassportProfessionLid
|
|
92
|
-
createdAt
|
|
93
|
-
updatedAt
|
|
41
|
+
hasLinkedJurisdiction Boolean @default(false)
|
|
42
|
+
isCorrespondence Boolean @default(true)
|
|
43
|
+
isCommitmentConfirmed Boolean @default(false)
|
|
44
|
+
isCurrentContract Boolean @default(false)
|
|
45
|
+
isCustomerVulnerable Boolean @default(false)
|
|
46
|
+
isExpat Boolean @default(false)
|
|
47
|
+
isFirstApplicant Boolean @default(false)
|
|
48
|
+
isUkPassport Boolean @default(false)
|
|
49
|
+
isUkResident Boolean
|
|
50
|
+
classLid String? @map("class_lid")
|
|
51
|
+
pageValidFlag Boolean @default(false)
|
|
52
|
+
lastName String
|
|
53
|
+
linkedJurisdictionCountryLid String? @map("linked_jurisdiction_country_lid")
|
|
54
|
+
linkedJurisdictionDetails String?
|
|
55
|
+
maidenName String?
|
|
56
|
+
maritalStatusLid String @map("marital_status_lid")
|
|
57
|
+
mobileNumber String?
|
|
58
|
+
nationalityLid String @map("nationality_lid")
|
|
59
|
+
netIncome Decimal @default(0.00)
|
|
60
|
+
niNumber String
|
|
61
|
+
numberOfDependants Int @default(0)
|
|
62
|
+
isOneYearPrior Boolean @default(false)
|
|
63
|
+
phoneNumber String?
|
|
64
|
+
previous1AddressCity String?
|
|
65
|
+
previous1AddressCountryLid String? @map("previous1_address_country_lid")
|
|
66
|
+
previous1AddressLine1 String?
|
|
67
|
+
previous1AddressLine2 String?
|
|
68
|
+
previous1AddressLine3 String?
|
|
69
|
+
previous1AddressMovedDate String?
|
|
70
|
+
previous1AddressPostCode String?
|
|
71
|
+
previous1AddressPropertyOwnedBy String?
|
|
72
|
+
previous2AddressCity String?
|
|
73
|
+
previous2AddressCountryLid String? @map("previous2_address_country_lid")
|
|
74
|
+
previous2AddressLine1 String?
|
|
75
|
+
previous2AddressLine2 String?
|
|
76
|
+
previous2AddressLine3 String?
|
|
77
|
+
previous2AddressMovedDate String?
|
|
78
|
+
previous2AddressPostCode String?
|
|
79
|
+
previous2AddressPropertyOwnedBy String?
|
|
80
|
+
relationshipToOthers String
|
|
81
|
+
residentialStatusLid String? @map("residential_status_lid")
|
|
82
|
+
retirementAge Int
|
|
83
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
84
|
+
taxPayerLid String @map("tax_payer_lid")
|
|
85
|
+
timeResidedAtCountryOfResidence Int
|
|
86
|
+
title String
|
|
87
|
+
isTwoYearPrior Boolean @default(false)
|
|
88
|
+
understandEnglish Boolean
|
|
89
|
+
vulnerabilityNotes String?
|
|
90
|
+
vulnerabilityTypeLids String[] @map("vulnerability_type_lids")
|
|
91
|
+
ukPassportProfessionLid String? @map("uk_passport_profession_lid")
|
|
92
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
93
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
94
94
|
|
|
95
95
|
// Relations
|
|
96
|
-
application
|
|
97
|
-
addressCountry
|
|
98
|
-
correspondenceAddressCountry
|
|
99
|
-
countryOfResidence
|
|
100
|
-
class
|
|
101
|
-
linkedJurisdictionCountry
|
|
102
|
-
maritalStatus
|
|
103
|
-
nationality
|
|
104
|
-
previous1AddressCountry
|
|
105
|
-
previous2AddressCountry
|
|
106
|
-
residentialStatus
|
|
107
|
-
taxJurisdiction
|
|
108
|
-
taxPayer
|
|
109
|
-
ukPassportProfession
|
|
110
|
-
vulnerabilityTypes
|
|
111
|
-
otherIncome
|
|
112
|
-
incomeSource
|
|
113
|
-
creditProfile
|
|
114
|
-
propertyIncome
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
96
|
+
application Application? @relation("ApplicationApplicants", fields: [applicationId], references: [id])
|
|
97
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
98
|
+
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
99
|
+
countryOfResidence Lookup? @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
100
|
+
class Lookup? @relation("Class", fields: [classLid], references: [id])
|
|
101
|
+
linkedJurisdictionCountry Lookup? @relation("LinkedJurisdictionCountry", fields: [linkedJurisdictionCountryLid], references: [id])
|
|
102
|
+
maritalStatus Lookup? @relation("MaritalStatus", fields: [maritalStatusLid], references: [id])
|
|
103
|
+
nationality Lookup? @relation("Nationality", fields: [nationalityLid], references: [id])
|
|
104
|
+
previous1AddressCountry Lookup? @relation("Previous1AddressCountry", fields: [previous1AddressCountryLid], references: [id])
|
|
105
|
+
previous2AddressCountry Lookup? @relation("Previous2AddressCountry", fields: [previous2AddressCountryLid], references: [id])
|
|
106
|
+
residentialStatus Lookup? @relation("ResidentialStatus", fields: [residentialStatusLid], references: [id])
|
|
107
|
+
taxJurisdiction Lookup? @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
108
|
+
taxPayer Lookup? @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
109
|
+
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
110
|
+
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
111
|
+
otherIncome ApplicantOtherIncome? @relation("ApplicantOtherIncome")
|
|
112
|
+
incomeSource ApplicantIncomeSource? @relation("ApplicantIncomeSource")
|
|
113
|
+
creditProfile ApplicantCreditProfile? @relation("ApplicantCreditProfile")
|
|
114
|
+
propertyIncome ApplicantPropertyIncome? @relation("ApplicantPropertyIncome")
|
|
115
|
+
employment ApplicantEmployment? @relation("ApplicantEmployment")
|
|
116
|
+
creditData ApplicantCreditData? @relation("ApplicantCreditData")
|
|
117
|
+
employmentIncome ApplicantEmploymentIncome? @relation("ApplicantEmploymentIncome")
|
|
118
|
+
expenditures ApplicantExpenditure[] @relation("ApplicantExpenditures")
|
|
119
|
+
incomes ApplicantIncome[] @relation("ApplicantIncome")
|
|
120
|
+
creditCardCommitments CreditCardCommitment[] @relation("ApplicantCreditCardCommitments")
|
|
121
|
+
loanCommitments LoanCommitment[] @relation("ApplicantLoanCommitments")
|
|
122
|
+
mortgageCommitments MortgageCommitment[] @relation("ApplicantMortgageCommitments")
|
|
123
|
+
residenceCommitments ResidenceCommitment[] @relation("ApplicantResidenceCommitments")
|
|
124
|
+
securedLoanCommitments SecuredLoanCommitment[] @relation("ApplicantSecuredLoanCommitments")
|
|
125
|
+
unsecuredLoanCommitments UnsecuredLoanCommitment[] @relation("ApplicantUnsecuredLoanCommitments")
|
|
126
|
+
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
128
127
|
|
|
129
128
|
@@map("applicants")
|
|
130
|
-
}
|
|
129
|
+
}
|
|
@@ -12,7 +12,7 @@ model ApplicationDirectDebit {
|
|
|
12
12
|
isConfirmDeclaration Boolean @map("is_confirm_declaration")
|
|
13
13
|
nameOfAccountHolder String @map("name_of_account_holder")
|
|
14
14
|
selectedPaymentDayLid String @map("selected_payment_day_lid")
|
|
15
|
-
sortCode
|
|
15
|
+
sortCode String @map("sort_code")
|
|
16
16
|
createdAt DateTime @default(now()) @map("created_at")
|
|
17
17
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
18
18
|
|
|
@@ -20,8 +20,8 @@ model ApplicationDirectDebit {
|
|
|
20
20
|
application Application @relation("ApplicationDirectDebit", fields: [applicationId], references: [id])
|
|
21
21
|
|
|
22
22
|
// Lookup relations
|
|
23
|
-
applicationType Lookup
|
|
23
|
+
applicationType Lookup @relation("PaymentDay", fields: [selectedPaymentDayLid], references: [id])
|
|
24
24
|
|
|
25
25
|
@@index([selectedPaymentDayLid])
|
|
26
26
|
@@map("application_direct_debits")
|
|
27
|
-
}
|
|
27
|
+
}
|
|
@@ -53,6 +53,8 @@ model Application {
|
|
|
53
53
|
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
54
54
|
applicantIds String[] @map("applicant_ids")
|
|
55
55
|
propertyIds String[] @map("property_ids")
|
|
56
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
57
|
+
updatedAt DateTime @updatedAt @default(now()) @map("updated_at")
|
|
56
58
|
|
|
57
59
|
// Relations
|
|
58
60
|
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
package/prisma/schema.prisma
CHANGED
|
@@ -768,132 +768,131 @@ model ApplicantPropertyIncome {
|
|
|
768
768
|
|
|
769
769
|
// From prisma/applicants/applicant.prisma
|
|
770
770
|
model Applicant {
|
|
771
|
-
id
|
|
772
|
-
applicantId
|
|
773
|
-
applicationId
|
|
774
|
-
addressCity
|
|
775
|
-
addressCountryLid
|
|
776
|
-
addressLine1
|
|
777
|
-
addressLine2
|
|
778
|
-
addressLine3
|
|
779
|
-
addressMovedDate
|
|
780
|
-
addressPostCode
|
|
781
|
-
correspondenceAddressCity
|
|
782
|
-
correspondenceAddressCountryLid
|
|
783
|
-
correspondenceAddressLine1
|
|
784
|
-
correspondenceAddressLine2
|
|
785
|
-
correspondenceAddressLine3
|
|
786
|
-
correspondenceAddressPostCode
|
|
787
|
-
countryOfResidenceLid
|
|
788
|
-
dateOfBirth
|
|
789
|
-
dependant10Age
|
|
790
|
-
dependant1Age
|
|
791
|
-
dependant2Age
|
|
792
|
-
dependant3Age
|
|
793
|
-
dependant4Age
|
|
794
|
-
dependant5Age
|
|
795
|
-
dependant6Age
|
|
796
|
-
dependant7Age
|
|
797
|
-
dependant8Age
|
|
798
|
-
dependant9Age
|
|
799
|
-
email
|
|
800
|
-
employmentStatusDetails
|
|
801
|
-
firstName
|
|
802
|
-
isFirstTimelandlord
|
|
803
|
-
foreignIdForNationals
|
|
804
|
-
gdprEmail
|
|
805
|
-
gdprPost
|
|
806
|
-
gdprTelephone
|
|
807
|
-
gdprTextMessage
|
|
808
|
-
gender
|
|
771
|
+
id String @id @default(uuid())
|
|
772
|
+
applicantId String @unique
|
|
773
|
+
applicationId String @map("application_id")
|
|
774
|
+
addressCity String?
|
|
775
|
+
addressCountryLid String? @map("address_country_lid")
|
|
776
|
+
addressLine1 String?
|
|
777
|
+
addressLine2 String?
|
|
778
|
+
addressLine3 String?
|
|
779
|
+
addressMovedDate String?
|
|
780
|
+
addressPostCode String?
|
|
781
|
+
correspondenceAddressCity String?
|
|
782
|
+
correspondenceAddressCountryLid String? @map("correspondence_address_country_lid")
|
|
783
|
+
correspondenceAddressLine1 String?
|
|
784
|
+
correspondenceAddressLine2 String?
|
|
785
|
+
correspondenceAddressLine3 String?
|
|
786
|
+
correspondenceAddressPostCode String?
|
|
787
|
+
countryOfResidenceLid String @map("country_of_residence_lid")
|
|
788
|
+
dateOfBirth String
|
|
789
|
+
dependant10Age Int @default(0)
|
|
790
|
+
dependant1Age Int @default(0)
|
|
791
|
+
dependant2Age Int @default(0)
|
|
792
|
+
dependant3Age Int @default(0)
|
|
793
|
+
dependant4Age Int @default(0)
|
|
794
|
+
dependant5Age Int @default(0)
|
|
795
|
+
dependant6Age Int @default(0)
|
|
796
|
+
dependant7Age Int @default(0)
|
|
797
|
+
dependant8Age Int @default(0)
|
|
798
|
+
dependant9Age Int @default(0)
|
|
799
|
+
email String
|
|
800
|
+
employmentStatusDetails String?
|
|
801
|
+
firstName String
|
|
802
|
+
isFirstTimelandlord Boolean @default(false)
|
|
803
|
+
foreignIdForNationals String?
|
|
804
|
+
gdprEmail Boolean @default(false)
|
|
805
|
+
gdprPost Boolean @default(false)
|
|
806
|
+
gdprTelephone Boolean @default(false)
|
|
807
|
+
gdprTextMessage Boolean @default(false)
|
|
808
|
+
gender String
|
|
809
809
|
hasBrokerGivenConsentForVulnerabilities Boolean
|
|
810
|
-
hasLinkedJurisdiction
|
|
811
|
-
isCorrespondence
|
|
812
|
-
isCommitmentConfirmed
|
|
813
|
-
isCurrentContract
|
|
814
|
-
isCustomerVulnerable
|
|
815
|
-
isExpat
|
|
816
|
-
isFirstApplicant
|
|
817
|
-
isUkPassport
|
|
818
|
-
isUkResident
|
|
819
|
-
classLid
|
|
820
|
-
pageValidFlag
|
|
821
|
-
lastName
|
|
822
|
-
linkedJurisdictionCountryLid
|
|
823
|
-
linkedJurisdictionDetails
|
|
824
|
-
maidenName
|
|
825
|
-
maritalStatusLid
|
|
826
|
-
mobileNumber
|
|
827
|
-
nationalityLid
|
|
828
|
-
netIncome
|
|
829
|
-
niNumber
|
|
830
|
-
numberOfDependants
|
|
831
|
-
isOneYearPrior
|
|
832
|
-
phoneNumber
|
|
833
|
-
previous1AddressCity
|
|
834
|
-
previous1AddressCountryLid
|
|
835
|
-
previous1AddressLine1
|
|
836
|
-
previous1AddressLine2
|
|
837
|
-
previous1AddressLine3
|
|
838
|
-
previous1AddressMovedDate
|
|
839
|
-
previous1AddressPostCode
|
|
840
|
-
previous1AddressPropertyOwnedBy
|
|
841
|
-
previous2AddressCity
|
|
842
|
-
previous2AddressCountryLid
|
|
843
|
-
previous2AddressLine1
|
|
844
|
-
previous2AddressLine2
|
|
845
|
-
previous2AddressLine3
|
|
846
|
-
previous2AddressMovedDate
|
|
847
|
-
previous2AddressPostCode
|
|
848
|
-
previous2AddressPropertyOwnedBy
|
|
849
|
-
relationshipToOthers
|
|
850
|
-
residentialStatusLid
|
|
851
|
-
retirementAge
|
|
852
|
-
taxJurisdictionLid
|
|
853
|
-
taxPayerLid
|
|
854
|
-
timeResidedAtCountryOfResidence
|
|
855
|
-
title
|
|
856
|
-
isTwoYearPrior
|
|
857
|
-
understandEnglish
|
|
858
|
-
vulnerabilityNotes
|
|
859
|
-
vulnerabilityTypeLids
|
|
860
|
-
ukPassportProfessionLid
|
|
861
|
-
createdAt
|
|
862
|
-
updatedAt
|
|
810
|
+
hasLinkedJurisdiction Boolean @default(false)
|
|
811
|
+
isCorrespondence Boolean @default(true)
|
|
812
|
+
isCommitmentConfirmed Boolean @default(false)
|
|
813
|
+
isCurrentContract Boolean @default(false)
|
|
814
|
+
isCustomerVulnerable Boolean @default(false)
|
|
815
|
+
isExpat Boolean @default(false)
|
|
816
|
+
isFirstApplicant Boolean @default(false)
|
|
817
|
+
isUkPassport Boolean @default(false)
|
|
818
|
+
isUkResident Boolean
|
|
819
|
+
classLid String? @map("class_lid")
|
|
820
|
+
pageValidFlag Boolean @default(false)
|
|
821
|
+
lastName String
|
|
822
|
+
linkedJurisdictionCountryLid String? @map("linked_jurisdiction_country_lid")
|
|
823
|
+
linkedJurisdictionDetails String?
|
|
824
|
+
maidenName String?
|
|
825
|
+
maritalStatusLid String @map("marital_status_lid")
|
|
826
|
+
mobileNumber String?
|
|
827
|
+
nationalityLid String @map("nationality_lid")
|
|
828
|
+
netIncome Decimal @default(0.00)
|
|
829
|
+
niNumber String
|
|
830
|
+
numberOfDependants Int @default(0)
|
|
831
|
+
isOneYearPrior Boolean @default(false)
|
|
832
|
+
phoneNumber String?
|
|
833
|
+
previous1AddressCity String?
|
|
834
|
+
previous1AddressCountryLid String? @map("previous1_address_country_lid")
|
|
835
|
+
previous1AddressLine1 String?
|
|
836
|
+
previous1AddressLine2 String?
|
|
837
|
+
previous1AddressLine3 String?
|
|
838
|
+
previous1AddressMovedDate String?
|
|
839
|
+
previous1AddressPostCode String?
|
|
840
|
+
previous1AddressPropertyOwnedBy String?
|
|
841
|
+
previous2AddressCity String?
|
|
842
|
+
previous2AddressCountryLid String? @map("previous2_address_country_lid")
|
|
843
|
+
previous2AddressLine1 String?
|
|
844
|
+
previous2AddressLine2 String?
|
|
845
|
+
previous2AddressLine3 String?
|
|
846
|
+
previous2AddressMovedDate String?
|
|
847
|
+
previous2AddressPostCode String?
|
|
848
|
+
previous2AddressPropertyOwnedBy String?
|
|
849
|
+
relationshipToOthers String
|
|
850
|
+
residentialStatusLid String? @map("residential_status_lid")
|
|
851
|
+
retirementAge Int
|
|
852
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
853
|
+
taxPayerLid String @map("tax_payer_lid")
|
|
854
|
+
timeResidedAtCountryOfResidence Int
|
|
855
|
+
title String
|
|
856
|
+
isTwoYearPrior Boolean @default(false)
|
|
857
|
+
understandEnglish Boolean
|
|
858
|
+
vulnerabilityNotes String?
|
|
859
|
+
vulnerabilityTypeLids String[] @map("vulnerability_type_lids")
|
|
860
|
+
ukPassportProfessionLid String? @map("uk_passport_profession_lid")
|
|
861
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
862
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
863
863
|
|
|
864
864
|
// Relations
|
|
865
|
-
application
|
|
866
|
-
addressCountry
|
|
867
|
-
correspondenceAddressCountry
|
|
868
|
-
countryOfResidence
|
|
869
|
-
class
|
|
870
|
-
linkedJurisdictionCountry
|
|
871
|
-
maritalStatus
|
|
872
|
-
nationality
|
|
873
|
-
previous1AddressCountry
|
|
874
|
-
previous2AddressCountry
|
|
875
|
-
residentialStatus
|
|
876
|
-
taxJurisdiction
|
|
877
|
-
taxPayer
|
|
878
|
-
ukPassportProfession
|
|
879
|
-
vulnerabilityTypes
|
|
880
|
-
otherIncome
|
|
881
|
-
incomeSource
|
|
882
|
-
creditProfile
|
|
883
|
-
propertyIncome
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
865
|
+
application Application? @relation("ApplicationApplicants", fields: [applicationId], references: [id])
|
|
866
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
867
|
+
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
868
|
+
countryOfResidence Lookup? @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
869
|
+
class Lookup? @relation("Class", fields: [classLid], references: [id])
|
|
870
|
+
linkedJurisdictionCountry Lookup? @relation("LinkedJurisdictionCountry", fields: [linkedJurisdictionCountryLid], references: [id])
|
|
871
|
+
maritalStatus Lookup? @relation("MaritalStatus", fields: [maritalStatusLid], references: [id])
|
|
872
|
+
nationality Lookup? @relation("Nationality", fields: [nationalityLid], references: [id])
|
|
873
|
+
previous1AddressCountry Lookup? @relation("Previous1AddressCountry", fields: [previous1AddressCountryLid], references: [id])
|
|
874
|
+
previous2AddressCountry Lookup? @relation("Previous2AddressCountry", fields: [previous2AddressCountryLid], references: [id])
|
|
875
|
+
residentialStatus Lookup? @relation("ResidentialStatus", fields: [residentialStatusLid], references: [id])
|
|
876
|
+
taxJurisdiction Lookup? @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
877
|
+
taxPayer Lookup? @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
878
|
+
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
879
|
+
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
880
|
+
otherIncome ApplicantOtherIncome? @relation("ApplicantOtherIncome")
|
|
881
|
+
incomeSource ApplicantIncomeSource? @relation("ApplicantIncomeSource")
|
|
882
|
+
creditProfile ApplicantCreditProfile? @relation("ApplicantCreditProfile")
|
|
883
|
+
propertyIncome ApplicantPropertyIncome? @relation("ApplicantPropertyIncome")
|
|
884
|
+
employment ApplicantEmployment? @relation("ApplicantEmployment")
|
|
885
|
+
creditData ApplicantCreditData? @relation("ApplicantCreditData")
|
|
886
|
+
employmentIncome ApplicantEmploymentIncome? @relation("ApplicantEmploymentIncome")
|
|
887
|
+
expenditures ApplicantExpenditure[] @relation("ApplicantExpenditures")
|
|
888
|
+
incomes ApplicantIncome[] @relation("ApplicantIncome")
|
|
889
|
+
creditCardCommitments CreditCardCommitment[] @relation("ApplicantCreditCardCommitments")
|
|
890
|
+
loanCommitments LoanCommitment[] @relation("ApplicantLoanCommitments")
|
|
891
|
+
mortgageCommitments MortgageCommitment[] @relation("ApplicantMortgageCommitments")
|
|
892
|
+
residenceCommitments ResidenceCommitment[] @relation("ApplicantResidenceCommitments")
|
|
893
|
+
securedLoanCommitments SecuredLoanCommitment[] @relation("ApplicantSecuredLoanCommitments")
|
|
894
|
+
unsecuredLoanCommitments UnsecuredLoanCommitment[] @relation("ApplicantUnsecuredLoanCommitments")
|
|
895
|
+
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
897
896
|
|
|
898
897
|
@@map("applicants")
|
|
899
898
|
}
|
|
@@ -1141,7 +1140,7 @@ model ApplicationDirectDebit {
|
|
|
1141
1140
|
isConfirmDeclaration Boolean @map("is_confirm_declaration")
|
|
1142
1141
|
nameOfAccountHolder String @map("name_of_account_holder")
|
|
1143
1142
|
selectedPaymentDayLid String @map("selected_payment_day_lid")
|
|
1144
|
-
sortCode
|
|
1143
|
+
sortCode String @map("sort_code")
|
|
1145
1144
|
createdAt DateTime @default(now()) @map("created_at")
|
|
1146
1145
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1147
1146
|
|
|
@@ -1149,7 +1148,7 @@ model ApplicationDirectDebit {
|
|
|
1149
1148
|
application Application @relation("ApplicationDirectDebit", fields: [applicationId], references: [id])
|
|
1150
1149
|
|
|
1151
1150
|
// Lookup relations
|
|
1152
|
-
applicationType Lookup
|
|
1151
|
+
applicationType Lookup @relation("PaymentDay", fields: [selectedPaymentDayLid], references: [id])
|
|
1153
1152
|
|
|
1154
1153
|
@@index([selectedPaymentDayLid])
|
|
1155
1154
|
@@map("application_direct_debits")
|
|
@@ -1471,6 +1470,8 @@ model Application {
|
|
|
1471
1470
|
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
1472
1471
|
applicantIds String[] @map("applicant_ids")
|
|
1473
1472
|
propertyIds String[] @map("property_ids")
|
|
1473
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1474
|
+
updatedAt DateTime @updatedAt @default(now()) @map("updated_at")
|
|
1474
1475
|
|
|
1475
1476
|
// Relations
|
|
1476
1477
|
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
const applicantCreditDataSchema = new mongoose.Schema({
|
|
3
|
-
bankruptcy: { type: String, required: true },
|
|
4
|
-
countyCourtJudgment: { type: String, required: true },
|
|
5
|
-
creditDefaults: { type: String },
|
|
6
|
-
securedArrears: { type: String, required: true },
|
|
7
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null, required: true },
|
|
8
|
-
unsecuredArrears: { type: String, required: true },
|
|
9
|
-
valid: { type: String, required: true },
|
|
10
|
-
});
|
|
11
|
-
export default applicantCreditDataSchema;
|