@dynamatix/gb-schemas 1.2.115 → 1.2.117

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.
Files changed (67) hide show
  1. package/dist/applicants/applicant-credit-data.model.js +11 -11
  2. package/dist/applicants/applicant-credit-profile.model.js +20 -20
  3. package/dist/applicants/applicant-direct-debit.model.js +17 -17
  4. package/dist/applicants/applicant-employment.model.js +48 -48
  5. package/dist/applicants/applicant-expenditure.model.d.ts +12 -6
  6. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  7. package/dist/applicants/applicant-expenditure.model.js +62 -69
  8. package/dist/applicants/applicant-income-source.model.d.ts +31 -3
  9. package/dist/applicants/applicant-income-source.model.d.ts.map +1 -1
  10. package/dist/applicants/applicant-income-source.model.js +4 -1
  11. package/dist/applicants/applicant-income.model.js +78 -78
  12. package/dist/applicants/applicant-risk-narrative.model.js +13 -13
  13. package/dist/applicants/applicant.model.js +228 -222
  14. package/dist/applicants/index.d.ts +1 -0
  15. package/dist/applicants/index.d.ts.map +1 -1
  16. package/dist/applicants/index.js +18 -18
  17. package/dist/applications/application-audit.model.js +42 -42
  18. package/dist/applications/application-checklist-Item.model.js +45 -45
  19. package/dist/applications/application-company-model.js +120 -120
  20. package/dist/applications/application-credit-profile.model.js +12 -12
  21. package/dist/applications/application-direct-debit.model.js +92 -92
  22. package/dist/applications/application-document.model.js +35 -35
  23. package/dist/applications/application-fieldconfig.model.js +7 -7
  24. package/dist/applications/application-illustration-model.js +6 -6
  25. package/dist/applications/application-legal.model.js +7 -7
  26. package/dist/applications/application-mortgage.model.js +268 -268
  27. package/dist/applications/application-note.model.js +78 -78
  28. package/dist/applications/application-offer.model.js +6 -6
  29. package/dist/applications/application-onboarding.model.js +9 -9
  30. package/dist/applications/application-product.model.js +67 -67
  31. package/dist/applications/application-rationale.model.js +38 -38
  32. package/dist/applications/application-risk-narrative.model.js +12 -12
  33. package/dist/applications/application-valuation.model.js +15 -15
  34. package/dist/applications/application.model.js +153 -153
  35. package/dist/applications/broker.model.js +21 -21
  36. package/dist/applications/document.model.js +35 -35
  37. package/dist/applications/index.js +20 -20
  38. package/dist/applications/solicitor.model.js +114 -114
  39. package/dist/index.js +7 -7
  40. package/dist/product-catalogues/index.js +3 -3
  41. package/dist/product-catalogues/product-catalogue.model.js +18 -18
  42. package/dist/product-catalogues/product-definitions.model.js +26 -26
  43. package/dist/product-catalogues/product-variant.model.js +12 -12
  44. package/dist/properties/index.js +2 -2
  45. package/dist/properties/property.model.js +144 -144
  46. package/dist/shared/alert.model.js +24 -24
  47. package/dist/shared/apprivo-sync-journey.model.js +17 -17
  48. package/dist/shared/checklist.model.js +30 -30
  49. package/dist/shared/document-type-model.js +10 -10
  50. package/dist/shared/index.js +12 -12
  51. package/dist/shared/job-run.model.js +14 -14
  52. package/dist/shared/job-setting.model.js +11 -11
  53. package/dist/shared/lookup-group.model.js +16 -16
  54. package/dist/shared/lookup.model.js +20 -20
  55. package/dist/shared/system-parameter.model.js +32 -32
  56. package/dist/shared/task-document.model.js +23 -23
  57. package/dist/shared/task.model.js +15 -15
  58. package/dist/underwriter/index.js +1 -1
  59. package/dist/underwriter/underwriter.model.js +17 -17
  60. package/dist/users/auth-log.model.js +21 -21
  61. package/dist/users/index.js +6 -6
  62. package/dist/users/permission.model.js +10 -10
  63. package/dist/users/role-group.model.js +14 -14
  64. package/dist/users/role.model.js +13 -13
  65. package/dist/users/tasks.model.js +15 -15
  66. package/dist/users/user.model.js +30 -30
  67. package/package.json +1 -1
@@ -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,8 +7,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
7
7
  applicantId: mongoose.Types.ObjectId;
8
8
  isFixed: boolean;
9
9
  expenditureTypeLid: mongoose.Types.ObjectId;
10
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
10
11
  declared?: Pound | null | undefined;
11
- ons?: Pound | null | undefined;
12
+ expected?: Pound | null | undefined;
12
13
  actual?: Pound | null | undefined;
13
14
  rationale?: string | null | undefined;
14
15
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
@@ -18,8 +19,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
18
19
  applicantId: mongoose.Types.ObjectId;
19
20
  isFixed: boolean;
20
21
  expenditureTypeLid: mongoose.Types.ObjectId;
22
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
21
23
  declared?: Pound | null | undefined;
22
- ons?: Pound | null | undefined;
24
+ expected?: Pound | null | undefined;
23
25
  actual?: Pound | null | undefined;
24
26
  rationale?: string | null | undefined;
25
27
  }> & {
@@ -29,8 +31,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
29
31
  applicantId: mongoose.Types.ObjectId;
30
32
  isFixed: boolean;
31
33
  expenditureTypeLid: mongoose.Types.ObjectId;
34
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
32
35
  declared?: Pound | null | undefined;
33
- ons?: Pound | null | undefined;
36
+ expected?: Pound | null | undefined;
34
37
  actual?: Pound | null | undefined;
35
38
  rationale?: string | null | undefined;
36
39
  } & {
@@ -52,8 +55,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
52
55
  applicantId: mongoose.Types.ObjectId;
53
56
  isFixed: boolean;
54
57
  expenditureTypeLid: mongoose.Types.ObjectId;
58
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
55
59
  declared?: Pound | null | undefined;
56
- ons?: Pound | null | undefined;
60
+ expected?: Pound | null | undefined;
57
61
  actual?: Pound | null | undefined;
58
62
  rationale?: string | null | undefined;
59
63
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
@@ -63,8 +67,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
63
67
  applicantId: mongoose.Types.ObjectId;
64
68
  isFixed: boolean;
65
69
  expenditureTypeLid: mongoose.Types.ObjectId;
70
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
66
71
  declared?: Pound | null | undefined;
67
- ons?: Pound | null | undefined;
72
+ expected?: Pound | null | undefined;
68
73
  actual?: Pound | null | undefined;
69
74
  rationale?: string | null | undefined;
70
75
  }>> & mongoose.FlatRecord<{
@@ -74,8 +79,9 @@ declare const ApplicantExpenditureModel: mongoose.Model<{
74
79
  applicantId: mongoose.Types.ObjectId;
75
80
  isFixed: boolean;
76
81
  expenditureTypeLid: mongoose.Types.ObjectId;
82
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
77
83
  declared?: Pound | null | undefined;
78
- ons?: Pound | null | undefined;
84
+ expected?: Pound | null | undefined;
79
85
  actual?: Pound | null | undefined;
80
86
  rationale?: string | null | undefined;
81
87
  }> & {
@@ -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;AAmE/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACvG,eAAe,yBAAyB,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;AA2E/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACvG,eAAe,yBAAyB,CAAC"}
@@ -1,69 +1,62 @@
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
- proposedFinanceAmount: {
38
- type: Number,
39
- default: 0,
40
- description: "Proposed finance amount for fixed expenditures, defaults to 0.",
41
- },
42
- topupAmount: {
43
- type: Number,
44
- default: 0,
45
- description: "Top-up amount for fixed expenditures, defaults to 0.",
46
- },
47
- creditCommitments: {
48
- type: Number,
49
- default: 0,
50
- description: "Total credit commitments amount, defaults to 0.",
51
- },
52
- }, {
53
- timestamps: true,
54
- toJSON: { virtuals: true },
55
- toObject: { virtuals: true },
56
- });
57
- // Virtual property for essentialExpenditure
58
- const virtualEssentialExpenditure = applicantExpenditureSchema.virtual("ExpenditureType", {
59
- ref: "Lookup",
60
- localField: "expenditureTypeLid",
61
- foreignField: "_id",
62
- justOne: true,
63
- options: {
64
- select: "label",
65
- },
66
- });
67
- virtualEssentialExpenditure.description = "Populated lookup value for essential expenditure.";
68
- const ApplicantExpenditureModel = mongoose.model("Applicant_Expenditure", applicantExpenditureSchema);
69
- 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
+ sectionName: {
22
+ type: String,
23
+ enum: [
24
+ "essentialExpenditure",
25
+ "basicCostOfLivingExpenditure"
26
+ ],
27
+ description: "Section of the application this expenditure belongs to.",
28
+ },
29
+ declared: {
30
+ type: Pound,
31
+ description: "Declared monthly expenditure amount provided by the applicant.",
32
+ },
33
+ expected: {
34
+ type: Pound,
35
+ description: "Office for National Statistics (ONS) benchmark monthly expenditure.",
36
+ },
37
+ actual: {
38
+ type: Pound,
39
+ description: "Actual monthly expenditure verified based on applicant's evidence.",
40
+ },
41
+ rationale: {
42
+ type: String,
43
+ description: "Rationalized monthly expenditure used for affordability assessment.",
44
+ }
45
+ }, {
46
+ timestamps: true,
47
+ toJSON: { virtuals: true },
48
+ toObject: { virtuals: true },
49
+ });
50
+ // Virtual property for essentialExpenditure
51
+ const virtualEssentialExpenditure = applicantExpenditureSchema.virtual("ExpenditureType", {
52
+ ref: "Lookup",
53
+ localField: "expenditureTypeLid",
54
+ foreignField: "_id",
55
+ justOne: true,
56
+ options: {
57
+ select: "label",
58
+ },
59
+ });
60
+ virtualEssentialExpenditure.description = "Populated lookup value for essential expenditure.";
61
+ const ApplicantExpenditureModel = mongoose.model("Applicant_Expenditure", applicantExpenditureSchema);
62
+ export default ApplicantExpenditureModel;
@@ -1,17 +1,45 @@
1
1
  import mongoose from "mongoose";
2
- declare const applicantIncomeSourceSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
2
+ declare const ApplicantIncomeSourceModel: mongoose.Model<{
3
+ applicantId: mongoose.Types.ObjectId;
4
+ employmentStatusLid: mongoose.Types.ObjectId;
5
+ incomeFromEmployment: boolean;
6
+ incomeFromPension: boolean;
7
+ incomeFromProperty: boolean;
8
+ incomeFromSavings: boolean;
9
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
10
+ applicantId: mongoose.Types.ObjectId;
11
+ employmentStatusLid: mongoose.Types.ObjectId;
12
+ incomeFromEmployment: boolean;
13
+ incomeFromPension: boolean;
14
+ incomeFromProperty: boolean;
15
+ incomeFromSavings: boolean;
16
+ }> & {
17
+ applicantId: mongoose.Types.ObjectId;
18
+ employmentStatusLid: mongoose.Types.ObjectId;
19
+ incomeFromEmployment: boolean;
20
+ incomeFromPension: boolean;
21
+ incomeFromProperty: boolean;
22
+ incomeFromSavings: boolean;
23
+ } & {
24
+ _id: mongoose.Types.ObjectId;
25
+ } & {
26
+ __v: number;
27
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
28
+ applicantId: mongoose.Types.ObjectId;
3
29
  employmentStatusLid: mongoose.Types.ObjectId;
4
30
  incomeFromEmployment: boolean;
5
31
  incomeFromPension: boolean;
6
32
  incomeFromProperty: boolean;
7
33
  incomeFromSavings: boolean;
8
34
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
35
+ applicantId: mongoose.Types.ObjectId;
9
36
  employmentStatusLid: mongoose.Types.ObjectId;
10
37
  incomeFromEmployment: boolean;
11
38
  incomeFromPension: boolean;
12
39
  incomeFromProperty: boolean;
13
40
  incomeFromSavings: boolean;
14
41
  }>> & mongoose.FlatRecord<{
42
+ applicantId: mongoose.Types.ObjectId;
15
43
  employmentStatusLid: mongoose.Types.ObjectId;
16
44
  incomeFromEmployment: boolean;
17
45
  incomeFromPension: boolean;
@@ -21,6 +49,6 @@ declare const applicantIncomeSourceSchema: mongoose.Schema<any, mongoose.Model<a
21
49
  _id: mongoose.Types.ObjectId;
22
50
  } & {
23
51
  __v: number;
24
- }>;
25
- export default applicantIncomeSourceSchema;
52
+ }>>;
53
+ export default ApplicantIncomeSourceModel;
26
54
  //# sourceMappingURL=applicant-income-source.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-income-source.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-income-source.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAGH,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"applicant-income-source.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-income-source.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAahC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyE,CAAC;AAE1G,eAAe,0BAA0B,CAAC"}
@@ -1,9 +1,12 @@
1
1
  import mongoose from "mongoose";
2
2
  const applicantIncomeSourceSchema = new mongoose.Schema({
3
+ applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
3
4
  employmentStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
4
5
  incomeFromEmployment: { type: Boolean, default: false },
5
6
  incomeFromPension: { type: Boolean, default: false },
6
7
  incomeFromProperty: { type: Boolean, default: false },
7
8
  incomeFromSavings: { type: Boolean, default: false }
8
9
  });
9
- export default applicantIncomeSourceSchema;
10
+ const ApplicantIncomeSourceModel = mongoose.model("Applicant_IncomeSource", applicantIncomeSourceSchema);
11
+ export default ApplicantIncomeSourceModel;
12
+ ;
@@ -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;