@dynamatix/gb-schemas 1.2.105 → 1.2.106
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-credit-data.model.js +11 -11
- package/dist/applicants/applicant-credit-profile.model.js +20 -20
- package/dist/applicants/applicant-direct-debit.model.js +17 -17
- package/dist/applicants/applicant-employment.model.js +48 -48
- package/dist/applicants/applicant-expenditure.model.d.ts +18 -0
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.js +54 -54
- package/dist/applicants/applicant-income-source.model.js +9 -9
- package/dist/applicants/applicant-income.model.js +78 -78
- package/dist/applicants/applicant-risk-narrative.model.js +13 -13
- package/dist/applicants/applicant.model.js +217 -217
- package/dist/applicants/index.js +14 -14
- package/dist/applications/application-audit.model.js +42 -42
- package/dist/applications/application-checklist-Item.model.js +45 -45
- package/dist/applications/application-company-model.js +120 -120
- package/dist/applications/application-credit-profile.model.js +12 -12
- package/dist/applications/application-direct-debit.model.js +92 -92
- package/dist/applications/application-document.model.js +35 -35
- package/dist/applications/application-fieldconfig.model.js +7 -7
- package/dist/applications/application-illustration-model.js +6 -6
- package/dist/applications/application-legal.model.js +7 -7
- package/dist/applications/application-mortgage.model.js +268 -268
- package/dist/applications/application-note.model.js +78 -78
- package/dist/applications/application-offer.model.js +6 -6
- package/dist/applications/application-onboarding.model.js +9 -9
- package/dist/applications/application-product.model.js +67 -67
- package/dist/applications/application-rationale.model.js +38 -38
- package/dist/applications/application-risk-narrative.model.js +12 -12
- package/dist/applications/application-valuation.model.js +15 -15
- package/dist/applications/application.model.js +153 -153
- package/dist/applications/broker.model.js +21 -21
- package/dist/applications/document.model.js +35 -35
- package/dist/applications/index.js +20 -20
- package/dist/applications/solicitor.model.js +114 -114
- package/dist/index.js +7 -7
- package/dist/product-catalogues/index.js +3 -3
- package/dist/product-catalogues/product-catalogue.model.js +18 -18
- package/dist/product-catalogues/product-definitions.model.js +26 -26
- package/dist/product-catalogues/product-variant.model.js +12 -12
- package/dist/properties/index.js +2 -2
- package/dist/properties/property.model.js +144 -144
- package/dist/shared/alert.model.js +24 -24
- package/dist/shared/apprivo-sync-journey.model.js +17 -17
- package/dist/shared/checklist.model.js +30 -30
- package/dist/shared/document-type-model.js +10 -10
- package/dist/shared/index.js +12 -12
- package/dist/shared/job-run.model.js +14 -14
- package/dist/shared/job-setting.model.js +11 -11
- package/dist/shared/lookup-group.model.js +16 -16
- package/dist/shared/lookup.model.js +20 -20
- package/dist/shared/system-parameter.model.js +32 -32
- package/dist/shared/task-document.model.js +23 -23
- package/dist/shared/task.model.js +15 -15
- package/dist/underwriter/index.js +1 -1
- package/dist/underwriter/underwriter.model.js +17 -17
- package/dist/users/auth-log.model.js +21 -21
- package/dist/users/index.js +6 -6
- package/dist/users/permission.model.js +10 -10
- package/dist/users/role-group.model.js +14 -14
- package/dist/users/role.model.js +13 -13
- package/dist/users/tasks.model.js +15 -15
- package/dist/users/user.model.js +30 -30
- package/package.json +70 -70
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +0 -368
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.js +0 -29
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +0 -362
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +0 -28
- package/dist/applicants/applicant-income-source.model.d.ts +0 -26
- package/dist/applicants/applicant-income-source.model.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-credit-data.entity.d.ts +0 -19
- package/dist/entities/applicants/applicant-credit-data.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-credit-data.entity.js +0 -5
- package/dist/entities/applicants/applicant-credit-profile.entity.d.ts +0 -14
- package/dist/entities/applicants/applicant-credit-profile.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-credit-profile.entity.js +0 -5
- package/dist/entities/applicants/applicant-employment-income.entity.d.ts +0 -14
- package/dist/entities/applicants/applicant-employment-income.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-employment-income.entity.js +0 -5
- package/dist/entities/applicants/applicant-employment.entity.d.ts +0 -54
- package/dist/entities/applicants/applicant-employment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-employment.entity.js +0 -5
- package/dist/entities/applicants/applicant-expenditure.entity.d.ts +0 -14
- package/dist/entities/applicants/applicant-expenditure.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-expenditure.entity.js +0 -5
- package/dist/entities/applicants/applicant-income-source.entity.d.ts +0 -17
- package/dist/entities/applicants/applicant-income-source.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-income-source.entity.js +0 -5
- package/dist/entities/applicants/applicant-income.entity.d.ts +0 -59
- package/dist/entities/applicants/applicant-income.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant-income.entity.js +0 -2
- package/dist/entities/applicants/applicant.entity.d.ts +0 -143
- package/dist/entities/applicants/applicant.entity.d.ts.map +0 -1
- package/dist/entities/applicants/applicant.entity.js +0 -48
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts +0 -16
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/credit-card-commitment.entity.js +0 -5
- package/dist/entities/applicants/index.d.ts +0 -19
- package/dist/entities/applicants/index.d.ts.map +0 -1
- package/dist/entities/applicants/index.js +0 -17
- package/dist/entities/applicants/loan-commitment.entity.d.ts +0 -20
- package/dist/entities/applicants/loan-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/loan-commitment.entity.js +0 -5
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts +0 -37
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/mortgage-commitment.entity.js +0 -19
- package/dist/entities/applicants/other-income.entity.d.ts +0 -41
- package/dist/entities/applicants/other-income.entity.d.ts.map +0 -1
- package/dist/entities/applicants/other-income.entity.js +0 -19
- package/dist/entities/applicants/property-income.entity.d.ts +0 -17
- package/dist/entities/applicants/property-income.entity.d.ts.map +0 -1
- package/dist/entities/applicants/property-income.entity.js +0 -5
- package/dist/entities/applicants/residence-commitment.entity.d.ts +0 -44
- package/dist/entities/applicants/residence-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/residence-commitment.entity.js +0 -19
- package/dist/entities/applicants/secure-loan-commitment.entity.d.ts +0 -21
- package/dist/entities/applicants/secure-loan-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/secure-loan-commitment.entity.js +0 -9
- package/dist/entities/applicants/unsecured-loan-commitment.entity.d.ts +0 -20
- package/dist/entities/applicants/unsecured-loan-commitment.entity.d.ts.map +0 -1
- package/dist/entities/applicants/unsecured-loan-commitment.entity.js +0 -10
- package/dist/entities/applications/application-audit.entity.d.ts +0 -18
- package/dist/entities/applications/application-audit.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-audit.entity.js +0 -5
- package/dist/entities/applications/application-company.entity.d.ts +0 -12
- package/dist/entities/applications/application-company.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-company.entity.js +0 -5
- package/dist/entities/applications/application-credit-profile.entity.d.ts +0 -11
- package/dist/entities/applications/application-credit-profile.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-credit-profile.entity.js +0 -5
- package/dist/entities/applications/application-direct-debit.entity.d.ts +0 -24
- package/dist/entities/applications/application-direct-debit.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-direct-debit.entity.js +0 -5
- package/dist/entities/applications/application-document.entity.d.ts +0 -28
- package/dist/entities/applications/application-document.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-document.entity.js +0 -5
- package/dist/entities/applications/application-fieldconfig.entity.d.ts +0 -9
- package/dist/entities/applications/application-fieldconfig.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-fieldconfig.entity.js +0 -5
- package/dist/entities/applications/application-illustration.entity.d.ts +0 -8
- package/dist/entities/applications/application-illustration.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-illustration.entity.js +0 -5
- package/dist/entities/applications/application-legal.entity.d.ts +0 -9
- package/dist/entities/applications/application-legal.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-legal.entity.js +0 -5
- package/dist/entities/applications/application-mortgage.entity.d.ts +0 -55
- package/dist/entities/applications/application-mortgage.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-mortgage.entity.js +0 -27
- package/dist/entities/applications/application-note.entity.d.ts +0 -37
- package/dist/entities/applications/application-note.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-note.entity.js +0 -5
- package/dist/entities/applications/application-offer.entity.d.ts +0 -8
- package/dist/entities/applications/application-offer.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-offer.entity.js +0 -5
- package/dist/entities/applications/application-onboarding.entity.d.ts +0 -11
- package/dist/entities/applications/application-onboarding.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-onboarding.entity.js +0 -5
- package/dist/entities/applications/application-product.entity.d.ts +0 -33
- package/dist/entities/applications/application-product.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-product.entity.js +0 -5
- package/dist/entities/applications/application-rationale.entity.d.ts +0 -51
- package/dist/entities/applications/application-rationale.entity.d.ts.map +0 -1
- package/dist/entities/applications/application-rationale.entity.js +0 -5
- package/dist/entities/applications/application.entity.d.ts +0 -103
- package/dist/entities/applications/application.entity.d.ts.map +0 -1
- package/dist/entities/applications/application.entity.js +0 -66
- package/dist/entities/applications/broker.entity.d.ts +0 -23
- package/dist/entities/applications/broker.entity.d.ts.map +0 -1
- package/dist/entities/applications/broker.entity.js +0 -5
- package/dist/entities/applications/checklist-item.entity.d.ts +0 -47
- package/dist/entities/applications/checklist-item.entity.d.ts.map +0 -1
- package/dist/entities/applications/checklist-item.entity.js +0 -5
- package/dist/entities/applications/company.entity.d.ts +0 -77
- package/dist/entities/applications/company.entity.d.ts.map +0 -1
- package/dist/entities/applications/company.entity.js +0 -23
- package/dist/entities/applications/index.d.ts +0 -23
- package/dist/entities/applications/index.d.ts.map +0 -1
- package/dist/entities/applications/index.js +0 -21
- package/dist/entities/applications/product-features.entity.d.ts +0 -54
- package/dist/entities/applications/product-features.entity.d.ts.map +0 -1
- package/dist/entities/applications/product-features.entity.js +0 -5
- package/dist/entities/applications/solicitor.entity.d.ts +0 -33
- package/dist/entities/applications/solicitor.entity.d.ts.map +0 -1
- package/dist/entities/applications/solicitor.entity.js +0 -5
- package/dist/entities/index.d.ts +0 -10
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js +0 -10
- package/dist/entities/prisma.d.ts +0 -3
- package/dist/entities/prisma.d.ts.map +0 -1
- package/dist/entities/prisma.js +0 -10
- package/dist/entities/product-catalogues/index.d.ts +0 -8
- package/dist/entities/product-catalogues/index.d.ts.map +0 -1
- package/dist/entities/product-catalogues/index.js +0 -6
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts +0 -22
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts.map +0 -1
- package/dist/entities/product-catalogues/product-catalogue.entity.js +0 -5
- package/dist/entities/product-catalogues/product-definition.entity.d.ts +0 -16
- package/dist/entities/product-catalogues/product-definition.entity.d.ts.map +0 -1
- package/dist/entities/product-catalogues/product-definition.entity.js +0 -5
- package/dist/entities/product-catalogues/product-variant.entity.d.ts +0 -14
- package/dist/entities/product-catalogues/product-variant.entity.d.ts.map +0 -1
- package/dist/entities/product-catalogues/product-variant.entity.js +0 -5
- package/dist/entities/product-catalogues/product.entity.d.ts +0 -11
- package/dist/entities/product-catalogues/product.entity.d.ts.map +0 -1
- package/dist/entities/product-catalogues/product.entity.js +0 -5
- package/dist/entities/product-catalogues/rule.entity.d.ts +0 -21
- package/dist/entities/product-catalogues/rule.entity.d.ts.map +0 -1
- package/dist/entities/product-catalogues/rule.entity.js +0 -5
- package/dist/entities/properties/data-street.entity.d.ts +0 -22
- package/dist/entities/properties/data-street.entity.d.ts.map +0 -1
- package/dist/entities/properties/data-street.entity.js +0 -5
- package/dist/entities/properties/index.d.ts +0 -6
- package/dist/entities/properties/index.d.ts.map +0 -1
- package/dist/entities/properties/index.js +0 -4
- package/dist/entities/properties/property.entity.d.ts +0 -30
- package/dist/entities/properties/property.entity.d.ts.map +0 -1
- package/dist/entities/properties/property.entity.js +0 -5
- package/dist/entities/properties/security.entity.d.ts +0 -57
- package/dist/entities/properties/security.entity.d.ts.map +0 -1
- package/dist/entities/properties/security.entity.js +0 -5
- package/dist/entities/shared/alert.entity.d.ts +0 -14
- package/dist/entities/shared/alert.entity.d.ts.map +0 -1
- package/dist/entities/shared/alert.entity.js +0 -5
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts +0 -19
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts.map +0 -1
- package/dist/entities/shared/apprivo-sync-journey.entity.js +0 -5
- package/dist/entities/shared/checklist.entity.d.ts +0 -15
- package/dist/entities/shared/checklist.entity.d.ts.map +0 -1
- package/dist/entities/shared/checklist.entity.js +0 -5
- package/dist/entities/shared/document-type.entity.d.ts +0 -9
- package/dist/entities/shared/document-type.entity.d.ts.map +0 -1
- package/dist/entities/shared/document-type.entity.js +0 -5
- package/dist/entities/shared/index.d.ts +0 -12
- package/dist/entities/shared/index.d.ts.map +0 -1
- package/dist/entities/shared/index.js +0 -10
- package/dist/entities/shared/job-run.entity.d.ts +0 -15
- package/dist/entities/shared/job-run.entity.d.ts.map +0 -1
- package/dist/entities/shared/job-run.entity.js +0 -5
- package/dist/entities/shared/job-run.model.d.ts +0 -11
- package/dist/entities/shared/job-run.model.d.ts.map +0 -1
- package/dist/entities/shared/job-run.model.js +0 -1
- package/dist/entities/shared/job-setting.entity.d.ts +0 -11
- package/dist/entities/shared/job-setting.entity.d.ts.map +0 -1
- package/dist/entities/shared/job-setting.entity.js +0 -5
- package/dist/entities/shared/lookup-group.entity.d.ts +0 -11
- package/dist/entities/shared/lookup-group.entity.d.ts.map +0 -1
- package/dist/entities/shared/lookup-group.entity.js +0 -5
- package/dist/entities/shared/lookup.entity.d.ts +0 -14
- package/dist/entities/shared/lookup.entity.d.ts.map +0 -1
- package/dist/entities/shared/lookup.entity.js +0 -5
- package/dist/entities/shared/system-parameter.entity.d.ts +0 -10
- package/dist/entities/shared/system-parameter.entity.d.ts.map +0 -1
- package/dist/entities/shared/system-parameter.entity.js +0 -5
- package/dist/entities/underwriter/index.d.ts +0 -4
- package/dist/entities/underwriter/index.d.ts.map +0 -1
- package/dist/entities/underwriter/index.js +0 -2
- package/dist/entities/underwriter/underwriter.entity.d.ts +0 -16
- package/dist/entities/underwriter/underwriter.entity.d.ts.map +0 -1
- package/dist/entities/underwriter/underwriter.entity.js +0 -5
- package/dist/entities/users/auth-log.entity.d.ts +0 -11
- package/dist/entities/users/auth-log.entity.d.ts.map +0 -1
- package/dist/entities/users/auth-log.entity.js +0 -5
- package/dist/entities/users/index.d.ts +0 -8
- package/dist/entities/users/index.d.ts.map +0 -1
- package/dist/entities/users/index.js +0 -6
- package/dist/entities/users/permission.entity.d.ts +0 -12
- package/dist/entities/users/permission.entity.d.ts.map +0 -1
- package/dist/entities/users/permission.entity.js +0 -5
- package/dist/entities/users/role-group.entity.d.ts +0 -12
- package/dist/entities/users/role-group.entity.d.ts.map +0 -1
- package/dist/entities/users/role-group.entity.js +0 -5
- package/dist/entities/users/role.entity.d.ts +0 -14
- package/dist/entities/users/role.entity.d.ts.map +0 -1
- package/dist/entities/users/role.entity.js +0 -5
- package/dist/entities/users/user.entity.d.ts +0 -35
- package/dist/entities/users/user.entity.d.ts.map +0 -1
- package/dist/entities/users/user.entity.js +0 -10
|
@@ -1,11 +1,11 @@
|
|
|
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;
|
|
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;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
const creditProfileSchema = new mongoose.Schema({
|
|
3
|
-
anyVoluntaryEnforcedPossessionNo: {
|
|
4
|
-
type: String,
|
|
5
|
-
required: true
|
|
6
|
-
},
|
|
7
|
-
bankruptcyNo: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true
|
|
10
|
-
},
|
|
11
|
-
ccjInLastThreeYearNo: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true
|
|
14
|
-
},
|
|
15
|
-
defaultsInLastYearNo: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export default creditProfileSchema;
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const creditProfileSchema = new mongoose.Schema({
|
|
3
|
+
anyVoluntaryEnforcedPossessionNo: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
bankruptcyNo: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
ccjInLastThreeYearNo: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
defaultsInLastYearNo: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export default creditProfileSchema;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
const applicantDirectDebitSchema = new mongoose.Schema({
|
|
3
|
-
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: 'Application' },
|
|
4
|
-
accountNumber: { type: String },
|
|
5
|
-
addressLine1: { type: String },
|
|
6
|
-
addressLine2: { type: String },
|
|
7
|
-
Applicants: { type: String },
|
|
8
|
-
branch: { type: String },
|
|
9
|
-
city: { type: String },
|
|
10
|
-
contactPostcode: { type: String },
|
|
11
|
-
institution: { type: String },
|
|
12
|
-
isConfirmDeclaration: { type: String, default: false },
|
|
13
|
-
nameOfAccountHolder: { type: String },
|
|
14
|
-
selectedPaymentDay: { type: String },
|
|
15
|
-
sortCode: { type: String }
|
|
16
|
-
}, { timestamps: true });
|
|
17
|
-
export default applicantDirectDebitSchema;
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
const applicantDirectDebitSchema = new mongoose.Schema({
|
|
3
|
+
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: 'Application' },
|
|
4
|
+
accountNumber: { type: String },
|
|
5
|
+
addressLine1: { type: String },
|
|
6
|
+
addressLine2: { type: String },
|
|
7
|
+
Applicants: { type: String },
|
|
8
|
+
branch: { type: String },
|
|
9
|
+
city: { type: String },
|
|
10
|
+
contactPostcode: { type: String },
|
|
11
|
+
institution: { type: String },
|
|
12
|
+
isConfirmDeclaration: { type: String, default: false },
|
|
13
|
+
nameOfAccountHolder: { type: String },
|
|
14
|
+
selectedPaymentDay: { type: String },
|
|
15
|
+
sortCode: { type: String }
|
|
16
|
+
}, { timestamps: true });
|
|
17
|
+
export default applicantDirectDebitSchema;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
import { Pound } from "../value-objects/pound";
|
|
3
|
-
const applicantEmploymentSchema = new mongoose.Schema({
|
|
4
|
-
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
|
|
5
|
-
acceptableIncomeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true }],
|
|
6
|
-
addressCity: { type: String, default: null },
|
|
7
|
-
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
8
|
-
addressLine1: { type: String, required: true },
|
|
9
|
-
addressLine2: { type: String, default: null },
|
|
10
|
-
addressLine3: { type: String, default: null },
|
|
11
|
-
addressPostCode: { type: String, required: true },
|
|
12
|
-
averageBonusPreviousTwoYears: { type: Pound, default: 0.00 },
|
|
13
|
-
basicGrossIncome: { type: Pound, default: 0.00 },
|
|
14
|
-
contractRemaining: { type: String },
|
|
15
|
-
dateJoined: { type: String, required: true },
|
|
16
|
-
disabilityLiving: { type: Pound, default: 0.00 },
|
|
17
|
-
employerName: { type: String, required: true },
|
|
18
|
-
employerTelephone: { type: String, default: null },
|
|
19
|
-
housingAllowance: { type: Pound, default: 0.00 },
|
|
20
|
-
industryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
21
|
-
isUnderTerminationNotice: { type: Boolean, default: false },
|
|
22
|
-
jobTitleLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
23
|
-
maintenance: { type: Pound, default: 0.00 },
|
|
24
|
-
maternityIncome: { type: Pound, default: 0.00 },
|
|
25
|
-
natureOfBusiness: { type: String, required: true },
|
|
26
|
-
pensionIncome: { type: Pound, default: 0.00 },
|
|
27
|
-
previousAddressCity: { type: String, default: null },
|
|
28
|
-
previousAddressCountry: { type: String, required: true },
|
|
29
|
-
previousAddressLine1: { type: String, required: true },
|
|
30
|
-
previousAddressLine2: { type: String, default: null },
|
|
31
|
-
previousAddressLine3: { type: String, default: null },
|
|
32
|
-
previousAddressPostCode: { type: String, required: true },
|
|
33
|
-
previousBasicGrossIncome: { type: Pound, default: 0.00, required: true },
|
|
34
|
-
previousDateJoined: { type: String, required: true },
|
|
35
|
-
previousDateLeft: { type: String, required: true },
|
|
36
|
-
previousEmployerName: { type: String, required: true },
|
|
37
|
-
previousEmployerTelephone: { type: String, default: null },
|
|
38
|
-
previousJobTitle: { type: String, required: true },
|
|
39
|
-
previousNatureOfBusiness: { type: String, required: true },
|
|
40
|
-
referenceContact: { type: String, default: null },
|
|
41
|
-
referenceContactEmail: { type: String, required: true },
|
|
42
|
-
underTerminationNoticeNote: { type: String, default: null }
|
|
43
|
-
}, {
|
|
44
|
-
toJSON: { getters: true },
|
|
45
|
-
toObject: { getters: true }
|
|
46
|
-
});
|
|
47
|
-
const ApplicantEmployment = mongoose.model("Applicant_Employment_Information", applicantEmploymentSchema);
|
|
48
|
-
export default ApplicantEmployment;
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { Pound } from "../value-objects/pound";
|
|
3
|
+
const applicantEmploymentSchema = new mongoose.Schema({
|
|
4
|
+
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
|
|
5
|
+
acceptableIncomeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true }],
|
|
6
|
+
addressCity: { type: String, default: null },
|
|
7
|
+
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
8
|
+
addressLine1: { type: String, required: true },
|
|
9
|
+
addressLine2: { type: String, default: null },
|
|
10
|
+
addressLine3: { type: String, default: null },
|
|
11
|
+
addressPostCode: { type: String, required: true },
|
|
12
|
+
averageBonusPreviousTwoYears: { type: Pound, default: 0.00 },
|
|
13
|
+
basicGrossIncome: { type: Pound, default: 0.00 },
|
|
14
|
+
contractRemaining: { type: String },
|
|
15
|
+
dateJoined: { type: String, required: true },
|
|
16
|
+
disabilityLiving: { type: Pound, default: 0.00 },
|
|
17
|
+
employerName: { type: String, required: true },
|
|
18
|
+
employerTelephone: { type: String, default: null },
|
|
19
|
+
housingAllowance: { type: Pound, default: 0.00 },
|
|
20
|
+
industryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
21
|
+
isUnderTerminationNotice: { type: Boolean, default: false },
|
|
22
|
+
jobTitleLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
23
|
+
maintenance: { type: Pound, default: 0.00 },
|
|
24
|
+
maternityIncome: { type: Pound, default: 0.00 },
|
|
25
|
+
natureOfBusiness: { type: String, required: true },
|
|
26
|
+
pensionIncome: { type: Pound, default: 0.00 },
|
|
27
|
+
previousAddressCity: { type: String, default: null },
|
|
28
|
+
previousAddressCountry: { type: String, required: true },
|
|
29
|
+
previousAddressLine1: { type: String, required: true },
|
|
30
|
+
previousAddressLine2: { type: String, default: null },
|
|
31
|
+
previousAddressLine3: { type: String, default: null },
|
|
32
|
+
previousAddressPostCode: { type: String, required: true },
|
|
33
|
+
previousBasicGrossIncome: { type: Pound, default: 0.00, required: true },
|
|
34
|
+
previousDateJoined: { type: String, required: true },
|
|
35
|
+
previousDateLeft: { type: String, required: true },
|
|
36
|
+
previousEmployerName: { type: String, required: true },
|
|
37
|
+
previousEmployerTelephone: { type: String, default: null },
|
|
38
|
+
previousJobTitle: { type: String, required: true },
|
|
39
|
+
previousNatureOfBusiness: { type: String, required: true },
|
|
40
|
+
referenceContact: { type: String, default: null },
|
|
41
|
+
referenceContactEmail: { type: String, required: true },
|
|
42
|
+
underTerminationNoticeNote: { type: String, default: null }
|
|
43
|
+
}, {
|
|
44
|
+
toJSON: { getters: true },
|
|
45
|
+
toObject: { getters: true }
|
|
46
|
+
});
|
|
47
|
+
const ApplicantEmployment = mongoose.model("Applicant_Employment_Information", applicantEmploymentSchema);
|
|
48
|
+
export default ApplicantEmployment;
|
|
@@ -7,6 +7,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
7
7
|
applicantId: mongoose.Types.ObjectId;
|
|
8
8
|
isFixed: boolean;
|
|
9
9
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
10
|
+
proposedFinanceAmount: number;
|
|
11
|
+
topupAmount: number;
|
|
12
|
+
creditCommitments: number;
|
|
10
13
|
declared?: Pound | null | undefined;
|
|
11
14
|
ons?: Pound | null | undefined;
|
|
12
15
|
actual?: Pound | null | undefined;
|
|
@@ -18,6 +21,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
18
21
|
applicantId: mongoose.Types.ObjectId;
|
|
19
22
|
isFixed: boolean;
|
|
20
23
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
24
|
+
proposedFinanceAmount: number;
|
|
25
|
+
topupAmount: number;
|
|
26
|
+
creditCommitments: number;
|
|
21
27
|
declared?: Pound | null | undefined;
|
|
22
28
|
ons?: Pound | null | undefined;
|
|
23
29
|
actual?: Pound | null | undefined;
|
|
@@ -29,6 +35,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
29
35
|
applicantId: mongoose.Types.ObjectId;
|
|
30
36
|
isFixed: boolean;
|
|
31
37
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
38
|
+
proposedFinanceAmount: number;
|
|
39
|
+
topupAmount: number;
|
|
40
|
+
creditCommitments: number;
|
|
32
41
|
declared?: Pound | null | undefined;
|
|
33
42
|
ons?: Pound | null | undefined;
|
|
34
43
|
actual?: Pound | null | undefined;
|
|
@@ -52,6 +61,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
52
61
|
applicantId: mongoose.Types.ObjectId;
|
|
53
62
|
isFixed: boolean;
|
|
54
63
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
64
|
+
proposedFinanceAmount: number;
|
|
65
|
+
topupAmount: number;
|
|
66
|
+
creditCommitments: number;
|
|
55
67
|
declared?: Pound | null | undefined;
|
|
56
68
|
ons?: Pound | null | undefined;
|
|
57
69
|
actual?: Pound | null | undefined;
|
|
@@ -63,6 +75,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
63
75
|
applicantId: mongoose.Types.ObjectId;
|
|
64
76
|
isFixed: boolean;
|
|
65
77
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
78
|
+
proposedFinanceAmount: number;
|
|
79
|
+
topupAmount: number;
|
|
80
|
+
creditCommitments: number;
|
|
66
81
|
declared?: Pound | null | undefined;
|
|
67
82
|
ons?: Pound | null | undefined;
|
|
68
83
|
actual?: Pound | null | undefined;
|
|
@@ -74,6 +89,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
|
74
89
|
applicantId: mongoose.Types.ObjectId;
|
|
75
90
|
isFixed: boolean;
|
|
76
91
|
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
92
|
+
proposedFinanceAmount: number;
|
|
93
|
+
topupAmount: number;
|
|
94
|
+
creditCommitments: number;
|
|
77
95
|
declared?: Pound | null | undefined;
|
|
78
96
|
ons?: Pound | null | undefined;
|
|
79
97
|
actual?: Pound | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-expenditure.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-expenditure.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"applicant-expenditure.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-expenditure.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAmF/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACvG,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
import { Pound } from "../value-objects/pound";
|
|
3
|
-
const applicantExpenditureSchema = new mongoose.Schema({
|
|
4
|
-
applicantId: {
|
|
5
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
-
ref: "Applicant",
|
|
7
|
-
required: true,
|
|
8
|
-
description: "Reference to the applicant this expenditure record belongs to.",
|
|
9
|
-
},
|
|
10
|
-
isFixed: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: false,
|
|
13
|
-
description: "True if all mandatory fields have been completed, otherwise false.",
|
|
14
|
-
},
|
|
15
|
-
expenditureTypeLid: {
|
|
16
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
17
|
-
ref: "Lookup",
|
|
18
|
-
default: null,
|
|
19
|
-
description: "Essential expenditure lookup",
|
|
20
|
-
},
|
|
21
|
-
declared: {
|
|
22
|
-
type: Pound,
|
|
23
|
-
description: "Declared monthly expenditure amount provided by the applicant.",
|
|
24
|
-
},
|
|
25
|
-
ons: {
|
|
26
|
-
type: Pound,
|
|
27
|
-
description: "Office for National Statistics (ONS) benchmark monthly expenditure.",
|
|
28
|
-
},
|
|
29
|
-
actual: {
|
|
30
|
-
type: Pound,
|
|
31
|
-
description: "Actual monthly expenditure verified based on applicant's evidence.",
|
|
32
|
-
},
|
|
33
|
-
rationale: {
|
|
34
|
-
type: String,
|
|
35
|
-
description: "Rationalized monthly expenditure used for affordability assessment.",
|
|
36
|
-
},
|
|
37
|
-
}, {
|
|
38
|
-
timestamps: true,
|
|
39
|
-
toJSON: { virtuals: true },
|
|
40
|
-
toObject: { virtuals: true },
|
|
41
|
-
});
|
|
42
|
-
// Virtual property for essentialExpenditure
|
|
43
|
-
const virtualEssentialExpenditure = applicantExpenditureSchema.virtual("ExpenditureType", {
|
|
44
|
-
ref: "Lookup",
|
|
45
|
-
localField: "expenditureTypeLid",
|
|
46
|
-
foreignField: "_id",
|
|
47
|
-
justOne: true,
|
|
48
|
-
options: {
|
|
49
|
-
select: "label",
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
virtualEssentialExpenditure.description = "Populated lookup value for essential expenditure.";
|
|
53
|
-
const ApplicantExpenditureModel = mongoose.model("Applicant_Expenditure", applicantExpenditureSchema);
|
|
54
|
-
export default ApplicantExpenditureModel;
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { Pound } from "../value-objects/pound";
|
|
3
|
+
const applicantExpenditureSchema = new mongoose.Schema({
|
|
4
|
+
applicantId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: "Applicant",
|
|
7
|
+
required: true,
|
|
8
|
+
description: "Reference to the applicant this expenditure record belongs to.",
|
|
9
|
+
},
|
|
10
|
+
isFixed: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false,
|
|
13
|
+
description: "True if all mandatory fields have been completed, otherwise false.",
|
|
14
|
+
},
|
|
15
|
+
expenditureTypeLid: {
|
|
16
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
17
|
+
ref: "Lookup",
|
|
18
|
+
default: null,
|
|
19
|
+
description: "Essential expenditure lookup",
|
|
20
|
+
},
|
|
21
|
+
declared: {
|
|
22
|
+
type: Pound,
|
|
23
|
+
description: "Declared monthly expenditure amount provided by the applicant.",
|
|
24
|
+
},
|
|
25
|
+
ons: {
|
|
26
|
+
type: Pound,
|
|
27
|
+
description: "Office for National Statistics (ONS) benchmark monthly expenditure.",
|
|
28
|
+
},
|
|
29
|
+
actual: {
|
|
30
|
+
type: Pound,
|
|
31
|
+
description: "Actual monthly expenditure verified based on applicant's evidence.",
|
|
32
|
+
},
|
|
33
|
+
rationale: {
|
|
34
|
+
type: String,
|
|
35
|
+
description: "Rationalized monthly expenditure used for affordability assessment.",
|
|
36
|
+
},
|
|
37
|
+
}, {
|
|
38
|
+
timestamps: true,
|
|
39
|
+
toJSON: { virtuals: true },
|
|
40
|
+
toObject: { virtuals: true },
|
|
41
|
+
});
|
|
42
|
+
// Virtual property for essentialExpenditure
|
|
43
|
+
const virtualEssentialExpenditure = applicantExpenditureSchema.virtual("ExpenditureType", {
|
|
44
|
+
ref: "Lookup",
|
|
45
|
+
localField: "expenditureTypeLid",
|
|
46
|
+
foreignField: "_id",
|
|
47
|
+
justOne: true,
|
|
48
|
+
options: {
|
|
49
|
+
select: "label",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
virtualEssentialExpenditure.description = "Populated lookup value for essential expenditure.";
|
|
53
|
+
const ApplicantExpenditureModel = mongoose.model("Applicant_Expenditure", applicantExpenditureSchema);
|
|
54
|
+
export default ApplicantExpenditureModel;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
const applicantIncomeSourceSchema = new mongoose.Schema({
|
|
3
|
-
employmentStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
4
|
-
incomeFromEmployment: { type: String },
|
|
5
|
-
incomeFromPension: { type: String },
|
|
6
|
-
incomeFromProperty: { type: String },
|
|
7
|
-
incomeFromSavings: { type: String }
|
|
8
|
-
});
|
|
9
|
-
export default applicantIncomeSourceSchema;
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const applicantIncomeSourceSchema = new mongoose.Schema({
|
|
3
|
+
employmentStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
4
|
+
incomeFromEmployment: { type: String },
|
|
5
|
+
incomeFromPension: { type: String },
|
|
6
|
+
incomeFromProperty: { type: String },
|
|
7
|
+
incomeFromSavings: { type: String }
|
|
8
|
+
});
|
|
9
|
+
export default applicantIncomeSourceSchema;
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
import { Pound } from "../value-objects/pound";
|
|
3
|
-
const incomeSchema = new mongoose.Schema({
|
|
4
|
-
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
|
|
5
|
-
accountantsAddressLine1: { type: String, required: true },
|
|
6
|
-
accountantsAddressLine2: { type: String, required: true },
|
|
7
|
-
accountantsAddressLine3: { type: String, required: true },
|
|
8
|
-
accountantsCity: { type: String, default: '' },
|
|
9
|
-
accountantsCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
10
|
-
accountantsEmail: { type: String, required: true },
|
|
11
|
-
accountantsPostCode: { type: String, required: true },
|
|
12
|
-
accountantsPractice: { type: String, required: true },
|
|
13
|
-
accountantsTelephoneNumber: { type: String, required: true },
|
|
14
|
-
businessAddressLine1: { type: String, required: true },
|
|
15
|
-
businessAddressLine2: { type: String, required: true },
|
|
16
|
-
businessAddressLine3: { type: String, required: true },
|
|
17
|
-
businessCity: { type: String, default: '' },
|
|
18
|
-
businessCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
19
|
-
businessPostCode: { type: String, required: true },
|
|
20
|
-
businessTelephoneNumber: { type: String, required: true },
|
|
21
|
-
businessTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
22
|
-
charteredCertifiedOrOtherLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
23
|
-
contactName: { type: String, required: true },
|
|
24
|
-
currentYearEnd: { type: String, required: true },
|
|
25
|
-
dateEstablished: { type: String, required: true },
|
|
26
|
-
doYouHaveAccountant: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
isBusinessAddressDifferent: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
nameOfBusiness: { type: String, required: true },
|
|
35
|
-
natureOfBusiness: { type: String, required: true },
|
|
36
|
-
netAssets1: { type: Pound, default: 0.00 },
|
|
37
|
-
netAssets2: { type: Pound, default: 0.00 },
|
|
38
|
-
netAssets3: { type: Pound, default: 0.00 },
|
|
39
|
-
pageValidFlag: { type: String, default: true },
|
|
40
|
-
percentageOfShareholding: { type: Number, required: true, min: 0, max: 100 },
|
|
41
|
-
registeredAddressLine1: { type: String, required: true },
|
|
42
|
-
registeredAddressLine2: { type: String, required: true },
|
|
43
|
-
registeredAddressLine3: { type: String, required: true },
|
|
44
|
-
registeredCity: { type: String, default: '' },
|
|
45
|
-
registeredCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
46
|
-
registeredPostCode: { type: String, required: true },
|
|
47
|
-
registeredTelephone: { type: String, required: true },
|
|
48
|
-
selfEmployedDate: { type: String, required: true },
|
|
49
|
-
totalEmploymentGrossIncome: { type: Pound, default: 0.00 },
|
|
50
|
-
totalEmploymentNetIncome: { type: Pound, default: 0.00 },
|
|
51
|
-
isEmploymentIncomeConfirmed: { type: Boolean, default: false },
|
|
52
|
-
employmentIncomeRationale: { type: String, default: null },
|
|
53
|
-
isPensionIncomeConfirmed: { type: Boolean, default: false },
|
|
54
|
-
pensionIncomeRationale: { type: String, default: null },
|
|
55
|
-
totalAdditionalGrossIncome: { type: Pound, default: 0.00 },
|
|
56
|
-
totalAdditionalNetIncome: { type: Pound, default: 0.00 },
|
|
57
|
-
isAdditionalIncomeConfirmed: { type: Boolean, default: false },
|
|
58
|
-
additionalIncomeRationale: { type: String, default: null },
|
|
59
|
-
isUKTaxCreditsIncomeConfirmed: { type: Boolean, default: false },
|
|
60
|
-
ukTaxCreditsIncomeRationale: { type: String, default: null },
|
|
61
|
-
totalPropertyGrossIncome: { type: Pound, default: 0.00 },
|
|
62
|
-
totalPropertyNetIncome: { type: Pound, default: 0.00 },
|
|
63
|
-
isPropertyIncomeConfirmed: { type: Boolean, default: false },
|
|
64
|
-
propertyIncomeRationale: { type: String, default: null },
|
|
65
|
-
selfEmployedIncomeRationale: { type: String, default: null },
|
|
66
|
-
isSelfEmployedIncomeConfirmed: { type: Boolean, default: false },
|
|
67
|
-
totalSelfEmployedGrossIncome: { type: Pound, default: 0.00 },
|
|
68
|
-
totalSelfEmployedNetIncome: { type: Pound, default: 0.00 },
|
|
69
|
-
soleTraderIncomeRationale: { type: String, default: null },
|
|
70
|
-
soleTraderIncomeConfirmed: { type: Boolean, default: false },
|
|
71
|
-
soleTraderGrossIncome: { type: Pound, default: 0.00 },
|
|
72
|
-
soleTraderNetIncome: { type: Pound, default: 0.00 },
|
|
73
|
-
}, {
|
|
74
|
-
toJSON: { getters: true },
|
|
75
|
-
toObject: { getters: true }
|
|
76
|
-
});
|
|
77
|
-
const ApplicantIncomeModel = mongoose.model("Applicant_Income", incomeSchema);
|
|
78
|
-
export default ApplicantIncomeModel;
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { Pound } from "../value-objects/pound";
|
|
3
|
+
const incomeSchema = new mongoose.Schema({
|
|
4
|
+
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
|
|
5
|
+
accountantsAddressLine1: { type: String, required: true },
|
|
6
|
+
accountantsAddressLine2: { type: String, required: true },
|
|
7
|
+
accountantsAddressLine3: { type: String, required: true },
|
|
8
|
+
accountantsCity: { type: String, default: '' },
|
|
9
|
+
accountantsCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
10
|
+
accountantsEmail: { type: String, required: true },
|
|
11
|
+
accountantsPostCode: { type: String, required: true },
|
|
12
|
+
accountantsPractice: { type: String, required: true },
|
|
13
|
+
accountantsTelephoneNumber: { type: String, required: true },
|
|
14
|
+
businessAddressLine1: { type: String, required: true },
|
|
15
|
+
businessAddressLine2: { type: String, required: true },
|
|
16
|
+
businessAddressLine3: { type: String, required: true },
|
|
17
|
+
businessCity: { type: String, default: '' },
|
|
18
|
+
businessCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
19
|
+
businessPostCode: { type: String, required: true },
|
|
20
|
+
businessTelephoneNumber: { type: String, required: true },
|
|
21
|
+
businessTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
22
|
+
charteredCertifiedOrOtherLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
23
|
+
contactName: { type: String, required: true },
|
|
24
|
+
currentYearEnd: { type: String, required: true },
|
|
25
|
+
dateEstablished: { type: String, required: true },
|
|
26
|
+
doYouHaveAccountant: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
isBusinessAddressDifferent: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
nameOfBusiness: { type: String, required: true },
|
|
35
|
+
natureOfBusiness: { type: String, required: true },
|
|
36
|
+
netAssets1: { type: Pound, default: 0.00 },
|
|
37
|
+
netAssets2: { type: Pound, default: 0.00 },
|
|
38
|
+
netAssets3: { type: Pound, default: 0.00 },
|
|
39
|
+
pageValidFlag: { type: String, default: true },
|
|
40
|
+
percentageOfShareholding: { type: Number, required: true, min: 0, max: 100 },
|
|
41
|
+
registeredAddressLine1: { type: String, required: true },
|
|
42
|
+
registeredAddressLine2: { type: String, required: true },
|
|
43
|
+
registeredAddressLine3: { type: String, required: true },
|
|
44
|
+
registeredCity: { type: String, default: '' },
|
|
45
|
+
registeredCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
46
|
+
registeredPostCode: { type: String, required: true },
|
|
47
|
+
registeredTelephone: { type: String, required: true },
|
|
48
|
+
selfEmployedDate: { type: String, required: true },
|
|
49
|
+
totalEmploymentGrossIncome: { type: Pound, default: 0.00 },
|
|
50
|
+
totalEmploymentNetIncome: { type: Pound, default: 0.00 },
|
|
51
|
+
isEmploymentIncomeConfirmed: { type: Boolean, default: false },
|
|
52
|
+
employmentIncomeRationale: { type: String, default: null },
|
|
53
|
+
isPensionIncomeConfirmed: { type: Boolean, default: false },
|
|
54
|
+
pensionIncomeRationale: { type: String, default: null },
|
|
55
|
+
totalAdditionalGrossIncome: { type: Pound, default: 0.00 },
|
|
56
|
+
totalAdditionalNetIncome: { type: Pound, default: 0.00 },
|
|
57
|
+
isAdditionalIncomeConfirmed: { type: Boolean, default: false },
|
|
58
|
+
additionalIncomeRationale: { type: String, default: null },
|
|
59
|
+
isUKTaxCreditsIncomeConfirmed: { type: Boolean, default: false },
|
|
60
|
+
ukTaxCreditsIncomeRationale: { type: String, default: null },
|
|
61
|
+
totalPropertyGrossIncome: { type: Pound, default: 0.00 },
|
|
62
|
+
totalPropertyNetIncome: { type: Pound, default: 0.00 },
|
|
63
|
+
isPropertyIncomeConfirmed: { type: Boolean, default: false },
|
|
64
|
+
propertyIncomeRationale: { type: String, default: null },
|
|
65
|
+
selfEmployedIncomeRationale: { type: String, default: null },
|
|
66
|
+
isSelfEmployedIncomeConfirmed: { type: Boolean, default: false },
|
|
67
|
+
totalSelfEmployedGrossIncome: { type: Pound, default: 0.00 },
|
|
68
|
+
totalSelfEmployedNetIncome: { type: Pound, default: 0.00 },
|
|
69
|
+
soleTraderIncomeRationale: { type: String, default: null },
|
|
70
|
+
soleTraderIncomeConfirmed: { type: Boolean, default: false },
|
|
71
|
+
soleTraderGrossIncome: { type: Pound, default: 0.00 },
|
|
72
|
+
soleTraderNetIncome: { type: Pound, default: 0.00 },
|
|
73
|
+
}, {
|
|
74
|
+
toJSON: { getters: true },
|
|
75
|
+
toObject: { getters: true }
|
|
76
|
+
});
|
|
77
|
+
const ApplicantIncomeModel = mongoose.model("Applicant_Income", incomeSchema);
|
|
78
|
+
export default ApplicantIncomeModel;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
const applicantRiskNarrativeSchema = new mongoose.Schema({
|
|
3
|
-
call2StatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
4
|
-
clientReference: { type: String },
|
|
5
|
-
docVerificationStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
6
|
-
isPoaTaskGenerated: { type: String },
|
|
7
|
-
link: { type: String },
|
|
8
|
-
riskLevel: { type: String },
|
|
9
|
-
riskRating: { type: String },
|
|
10
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
11
|
-
verificationLinkSentOn: { type: String }
|
|
12
|
-
});
|
|
13
|
-
export default applicantRiskNarrativeSchema;
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
const applicantRiskNarrativeSchema = new mongoose.Schema({
|
|
3
|
+
call2StatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
4
|
+
clientReference: { type: String },
|
|
5
|
+
docVerificationStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
6
|
+
isPoaTaskGenerated: { type: String },
|
|
7
|
+
link: { type: String },
|
|
8
|
+
riskLevel: { type: String },
|
|
9
|
+
riskRating: { type: String },
|
|
10
|
+
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
11
|
+
verificationLinkSentOn: { type: String }
|
|
12
|
+
});
|
|
13
|
+
export default applicantRiskNarrativeSchema;
|