@dynamatix/gb-schemas 2.0.9 → 2.0.10
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.
|
@@ -58,6 +58,22 @@ const incomeSchema = new mongoose.Schema({
|
|
|
58
58
|
totalEmploymentNetIncome: { type: Pound, default: 0.00 },
|
|
59
59
|
isEmploymentIncomeConfirmed: { type: Boolean, default: false },
|
|
60
60
|
employmentIncomeRationale: { type: String, default: null },
|
|
61
|
+
totalPensionGrossIncome: { type: Pound, default: 0.00 },
|
|
62
|
+
totalPensionNetIncome: { type: Pound, default: 0.00 },
|
|
63
|
+
isPensionIncomeConfirmed: { type: Boolean, default: false },
|
|
64
|
+
pensionIncomeRationale: { type: String, default: null },
|
|
65
|
+
totalAdditionalGrossIncome: { type: Pound, default: 0.00 },
|
|
66
|
+
totalAdditionalNetIncome: { type: Pound, default: 0.00 },
|
|
67
|
+
isAdditionalIncomeConfirmed: { type: Boolean, default: false },
|
|
68
|
+
additionalIncomeRationale: { type: String, default: null },
|
|
69
|
+
totalUKTaxCreditsGrossIncome: { type: Pound, default: 0.00 },
|
|
70
|
+
totalUKTaxCreditsNetIncome: { type: Pound, default: 0.00 },
|
|
71
|
+
isUKTaxCreditsIncomeConfirmed: { type: Boolean, default: false },
|
|
72
|
+
ukTaxCreditsIncomeRationale: { type: String, default: null },
|
|
73
|
+
totalPropertyGrossIncome: { type: Pound, default: 0.00 },
|
|
74
|
+
totalPropertyNetIncome: { type: Pound, default: 0.00 },
|
|
75
|
+
isPropertyIncomeConfirmed: { type: Boolean, default: false },
|
|
76
|
+
propertyIncomeRationale: { type: String, default: null },
|
|
61
77
|
}, {
|
|
62
78
|
toJSON: { getters: true },
|
|
63
79
|
toObject: { getters: true }
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import applicantCreditDataSchema from "./applicant-credit-data.model";
|
|
3
3
|
import applicantRiskNarrativeSchema from "./applicant-risk-narrative.model";
|
|
4
|
-
import applicantOtherIncomeSchema from "./applicant-other-income.model";
|
|
5
4
|
import applicantIncomeSourceSchema from "./applicant-income-source.model";
|
|
6
5
|
import applicantEmploymentSchema from "./applicant-employment.model";
|
|
7
6
|
import applicantDirectDebitSchema from "./applicant-direct-debit.model";
|
|
8
7
|
import creditProfileSchema from "./applicant-credit-profile.model";
|
|
9
|
-
import propertyIncomeSchema from "./applicant-property-income.model";
|
|
10
8
|
import incomeSchema from "./applicant-income.model";
|
|
11
|
-
import { Pound } from "../value-objects/pound";
|
|
12
9
|
const applicantSchema = new mongoose.Schema({
|
|
13
10
|
applicantId: { type: String, required: true },
|
|
14
11
|
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
|
|
@@ -74,14 +71,10 @@ const applicantSchema = new mongoose.Schema({
|
|
|
74
71
|
type: Boolean,
|
|
75
72
|
default: true,
|
|
76
73
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
isCurrentContract: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: false,
|
|
84
|
-
},
|
|
74
|
+
isCreditCardCommitmentConfirmed: { type: Boolean, default: false, },
|
|
75
|
+
isLoanCommitmentConfirmed: { type: Boolean, default: false, },
|
|
76
|
+
isMortgageHPPCommitmentConfirmed: { type: Boolean, default: false, },
|
|
77
|
+
isCurrentContract: { type: Boolean, default: false, },
|
|
85
78
|
isCustomerVulnerable: {
|
|
86
79
|
type: Boolean,
|
|
87
80
|
default: false,
|
|
@@ -111,7 +104,7 @@ const applicantSchema = new mongoose.Schema({
|
|
|
111
104
|
maritalStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
112
105
|
mobileNumber: { type: String, default: null },
|
|
113
106
|
nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
114
|
-
netIncome: { type:
|
|
107
|
+
netIncome: { type: Number, default: 0.00 },
|
|
115
108
|
niNumber: { type: String, required: true },
|
|
116
109
|
numberOfDependants: { type: Number, default: 0 },
|
|
117
110
|
isOneYearPrior: {
|
|
@@ -161,12 +154,10 @@ const applicantSchema = new mongoose.Schema({
|
|
|
161
154
|
},
|
|
162
155
|
creditData: applicantCreditDataSchema,
|
|
163
156
|
riskNarrative: applicantRiskNarrativeSchema,
|
|
164
|
-
otherIncome: applicantOtherIncomeSchema,
|
|
165
157
|
incomeSource: applicantIncomeSourceSchema,
|
|
166
158
|
employment: applicantEmploymentSchema,
|
|
167
159
|
directDebit: applicantDirectDebitSchema,
|
|
168
160
|
creditProfile: creditProfileSchema,
|
|
169
|
-
propertyIncome: propertyIncomeSchema,
|
|
170
161
|
income: incomeSchema
|
|
171
162
|
}, {
|
|
172
163
|
timestamps: true,
|
package/dist/applicants/index.js
CHANGED
|
@@ -7,3 +7,7 @@ export { default as ResidenceCommitmentModel } from './applicant-commitment-resi
|
|
|
7
7
|
export { default as SecuredLoanCommitmentModel } from './applicant-commitment-secureLoan.model';
|
|
8
8
|
export { default as UnsecuredLoanCommitmentModel } from './applicant-commitment-unsecuredLoan.model';
|
|
9
9
|
export { default as ApplicantExpenditureModel } from './applicant-expenditure.model';
|
|
10
|
+
export { default as ApplicantPensionIncomeModel } from './applicant-pension-income.model';
|
|
11
|
+
export { default as ApplicantAdditionalIncomeModel } from './applicant-additional-income.model';
|
|
12
|
+
export { default as ApplicantUKTaxCreditsModel } from './applicant-uk-tax-credits.model';
|
|
13
|
+
export { default as ApplicantPropertyIncomeModel } from './applicant-property-income.model';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import creditProfileSchema from "./application-credit-profile.model";
|
|
3
|
-
import productFeaturesSchema from "./productfeatures.model";
|
|
4
3
|
const applicationSchema = new mongoose.Schema({
|
|
5
4
|
queueId: [{
|
|
6
5
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -55,7 +54,6 @@ const applicationSchema = new mongoose.Schema({
|
|
|
55
54
|
isActive: { type: String, default: false },
|
|
56
55
|
isUkResident: { type: String, default: true },
|
|
57
56
|
riskRating: { type: String },
|
|
58
|
-
productFeatures: productFeaturesSchema,
|
|
59
57
|
directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "Application_DirectDebit" },
|
|
60
58
|
creditProfile: creditProfileSchema,
|
|
61
59
|
mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage" },
|
|
@@ -11,10 +11,10 @@ export { default as ApplicationRationaleModel } from './application-rationale.mo
|
|
|
11
11
|
export { default as ApplicationValuationModel } from './application-valuation.model';
|
|
12
12
|
export { default as BrokerModel } from './broker.model';
|
|
13
13
|
export { default as ProductModel } from './application-product.model';
|
|
14
|
-
export { default as ProductFeaturesModel } from './productfeatures.model';
|
|
15
14
|
export { default as SolicitorModel } from './solicitor.model';
|
|
16
15
|
export { default as ApplicationDocumentModel } from './application-document.model';
|
|
17
16
|
export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
|
|
18
17
|
export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
|
|
19
18
|
export { default as DocumentModel } from './document.model';
|
|
20
19
|
export { default as MortgageModel } from './application-mortgage.model';
|
|
20
|
+
export { default as ApplicationProductFeaturesModel } from './application-productfeatures.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamatix/gb-schemas",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "All the schemas for gatehouse bank back-end",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"@types/node": "^22.14.0",
|
|
79
79
|
"prisma": "^6.6.0",
|
|
80
80
|
"ts-node": "^10.9.2",
|
|
81
|
-
"typescript": "^5.
|
|
81
|
+
"typescript": "^5.3.3"
|
|
82
82
|
}
|
|
83
83
|
}
|