@dynamatix/gb-schemas 1.2.145 → 1.2.147

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 (80) hide show
  1. package/dist/applicants/applicant-additional-income.model.d.ts +194 -0
  2. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -0
  3. package/dist/applicants/applicant-additional-income.model.js +14 -0
  4. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +17 -3
  5. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
  6. package/dist/applicants/applicant-commitment-creditCard.model.js +23 -10
  7. package/dist/applicants/applicant-commitment-loan.model.d.ts +23 -3
  8. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
  9. package/dist/applicants/applicant-commitment-loan.model.js +33 -12
  10. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +77 -303
  11. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
  12. package/dist/applicants/applicant-commitment-mortgage.model.js +51 -23
  13. package/dist/applicants/applicant-commitment-residence.model.d.ts +9 -9
  14. package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
  15. package/dist/applicants/applicant-commitment-residence.model.js +8 -5
  16. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +30 -6
  17. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
  18. package/dist/applicants/applicant-commitment-secureLoan.model.js +24 -10
  19. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +36 -6
  20. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
  21. package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +24 -9
  22. package/dist/applicants/applicant-employment-income.model.d.ts +175 -0
  23. package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -0
  24. package/dist/applicants/applicant-employment-income.model.js +14 -0
  25. package/dist/applicants/applicant-employment.model.d.ts +1231 -24
  26. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  27. package/dist/applicants/applicant-employment.model.js +3 -12
  28. package/dist/applicants/applicant-expenditure.model.d.ts +79 -50
  29. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  30. package/dist/applicants/applicant-expenditure.model.js +57 -18
  31. package/dist/applicants/applicant-income-settings.model.d.ts +54 -0
  32. package/dist/applicants/applicant-income-settings.model.d.ts.map +1 -0
  33. package/dist/applicants/applicant-income-settings.model.js +16 -0
  34. package/dist/applicants/applicant-income.model.d.ts +2068 -30
  35. package/dist/applicants/applicant-income.model.d.ts.map +1 -1
  36. package/dist/applicants/applicant-income.model.js +35 -12
  37. package/dist/applicants/applicant-pension-income.model.d.ts +457 -0
  38. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -0
  39. package/dist/applicants/applicant-pension-income.model.js +30 -0
  40. package/dist/applicants/applicant-property-income.model.d.ts +871 -13
  41. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
  42. package/dist/applicants/applicant-property-income.model.js +12 -5
  43. package/dist/applicants/applicant-self-employed-income.model.d.ts +182 -0
  44. package/dist/applicants/applicant-self-employed-income.model.d.ts.map +1 -0
  45. package/dist/applicants/applicant-self-employed-income.model.js +17 -0
  46. package/dist/applicants/applicant-sole-trader-income.model.d.ts +182 -0
  47. package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +1 -0
  48. package/dist/applicants/applicant-sole-trader-income.model.js +17 -0
  49. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +463 -0
  50. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -0
  51. package/dist/applicants/applicant-uk-tax-credits.model.js +16 -0
  52. package/dist/applicants/applicant.model.d.ts +101 -8762
  53. package/dist/applicants/applicant.model.d.ts.map +1 -1
  54. package/dist/applicants/applicant.model.js +19 -21
  55. package/dist/applicants/index.d.ts +13 -2
  56. package/dist/applicants/index.d.ts.map +1 -1
  57. package/dist/applicants/index.js +13 -2
  58. package/dist/applications/application-mortgage.model.d.ts +1137 -129
  59. package/dist/applications/application-mortgage.model.d.ts.map +1 -1
  60. package/dist/applications/application-mortgage.model.js +28 -5
  61. package/dist/applications/application-productfeatures.model.d.ts +738 -0
  62. package/dist/applications/application-productfeatures.model.d.ts.map +1 -0
  63. package/dist/applications/{productfeatures.model.js → application-productfeatures.model.js} +3 -1
  64. package/dist/applications/application.model.d.ts +0 -762
  65. package/dist/applications/application.model.d.ts.map +1 -1
  66. package/dist/applications/application.model.js +0 -8
  67. package/dist/applications/index.d.ts +1 -1
  68. package/dist/applications/index.d.ts.map +1 -1
  69. package/dist/applications/index.js +1 -1
  70. package/dist/value-objects/sort-code.d.ts.map +1 -1
  71. package/dist/value-objects/sort-code.js +4 -13
  72. package/package.json +2 -2
  73. package/dist/applicants/applicant-income-source.model.d.ts +0 -26
  74. package/dist/applicants/applicant-income-source.model.d.ts.map +0 -1
  75. package/dist/applicants/applicant-income-source.model.js +0 -9
  76. package/dist/applicants/applicant-other-income.model.d.ts +0 -85
  77. package/dist/applicants/applicant-other-income.model.d.ts.map +0 -1
  78. package/dist/applicants/applicant-other-income.model.js +0 -46
  79. package/dist/applications/productfeatures.model.d.ts +0 -368
  80. package/dist/applications/productfeatures.model.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-employment.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-employment.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqD7B,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"applicant-employment.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-employment.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AA+C/C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgF,CAAC;AAE1G,eAAe,mBAAmB,CAAC"}
@@ -2,7 +2,6 @@ import mongoose from "mongoose";
2
2
  import { Pound } from "../value-objects/pound";
3
3
  const applicantEmploymentSchema = new mongoose.Schema({
4
4
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
5
- pageValidFlag: { type: Boolean, default: false },
6
5
  acceptableIncomeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true }],
7
6
  addressCity: { type: String, default: null },
8
7
  addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
@@ -12,10 +11,6 @@ const applicantEmploymentSchema = new mongoose.Schema({
12
11
  addressPostCode: { type: String, required: true },
13
12
  averageBonusPreviousTwoYears: { type: Pound, default: 0.00 },
14
13
  basicGrossIncome: { type: Pound, default: 0.00 },
15
- basicPay: { type: Pound, default: 0.00 },
16
- carAllowance: { type: Pound, default: 0.00 },
17
- childBenefit: { type: Pound, default: 0.00 },
18
- childBenefitOrSchoolAllowance: { type: Pound, default: 0.00 },
19
14
  contractRemaining: { type: String },
20
15
  dateJoined: { type: String, required: true },
21
16
  disabilityLiving: { type: Pound, default: 0.00 },
@@ -23,10 +18,7 @@ const applicantEmploymentSchema = new mongoose.Schema({
23
18
  employerTelephone: { type: String, default: null },
24
19
  housingAllowance: { type: Pound, default: 0.00 },
25
20
  industryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
26
- isUnderTerminationNotice: {
27
- type: Boolean,
28
- default: false,
29
- },
21
+ isUnderTerminationNotice: { type: Boolean, default: false },
30
22
  jobTitleLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
31
23
  maintenance: { type: Pound, default: 0.00 },
32
24
  maternityIncome: { type: Pound, default: 0.00 },
@@ -47,11 +39,10 @@ const applicantEmploymentSchema = new mongoose.Schema({
47
39
  previousNatureOfBusiness: { type: String, required: true },
48
40
  referenceContact: { type: String, default: null },
49
41
  referenceContactEmail: { type: String, required: true },
50
- secondJob: { type: Pound, default: 0.00 },
51
- travelAllowance: { type: Pound, default: 0.00 },
52
42
  underTerminationNoticeNote: { type: String, default: null }
53
43
  }, {
54
44
  toJSON: { getters: true },
55
45
  toObject: { getters: true }
56
46
  });
57
- export default applicantEmploymentSchema;
47
+ const ApplicantEmployment = mongoose.model("Applicant_Employment_Information", applicantEmploymentSchema);
48
+ export default ApplicantEmployment;
@@ -1,64 +1,93 @@
1
1
  import mongoose from "mongoose";
2
2
  import { Pound } from "../value-objects/pound";
3
- declare const applicantExpenditureSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ declare const ApplicantExpenditureModel: mongoose.Model<{
4
+ createdAt: NativeDate;
5
+ updatedAt: NativeDate;
6
+ } & {
7
+ applicantId: mongoose.Types.ObjectId;
8
+ isFixed: boolean;
9
+ expenditureTypeLid: mongoose.Types.ObjectId;
10
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
11
+ declared?: Pound | null | undefined;
12
+ expected?: Pound | null | undefined;
13
+ actual?: Pound | null | undefined;
14
+ rationale?: string | null | undefined;
15
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
16
+ createdAt: NativeDate;
17
+ updatedAt: NativeDate;
18
+ } & {
19
+ applicantId: mongoose.Types.ObjectId;
20
+ isFixed: boolean;
21
+ expenditureTypeLid: mongoose.Types.ObjectId;
22
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
23
+ declared?: Pound | null | undefined;
24
+ expected?: Pound | null | undefined;
25
+ actual?: Pound | null | undefined;
26
+ rationale?: string | null | undefined;
27
+ }> & {
28
+ createdAt: NativeDate;
29
+ updatedAt: NativeDate;
30
+ } & {
31
+ applicantId: mongoose.Types.ObjectId;
32
+ isFixed: boolean;
33
+ expenditureTypeLid: mongoose.Types.ObjectId;
34
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
35
+ declared?: Pound | null | undefined;
36
+ expected?: Pound | null | undefined;
37
+ actual?: Pound | null | undefined;
38
+ rationale?: string | null | undefined;
39
+ } & {
40
+ _id: mongoose.Types.ObjectId;
41
+ } & {
42
+ __v: number;
43
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
44
+ timestamps: true;
4
45
  toJSON: {
5
- getters: true;
46
+ virtuals: true;
6
47
  };
7
48
  toObject: {
8
- getters: true;
49
+ virtuals: true;
9
50
  };
10
51
  }, {
11
- pageValidFlag: boolean;
12
- utilities: Pound;
13
- transport: Pound;
14
- subsistence: Pound;
15
- communication: Pound;
16
- health: Pound;
17
- groundRentOrServiceCharge: Pound;
18
- insurance: Pound;
19
- childCareForDependents: Pound;
20
- councilTax: Pound;
21
- clothingAndFootwear: Pound;
22
- vehicleInsurance: Pound;
23
- mortgagePaymentVehicle: Pound;
24
- other: Pound;
25
- totalMontlyExpenditure?: string | null | undefined;
52
+ createdAt: NativeDate;
53
+ updatedAt: NativeDate;
54
+ } & {
55
+ applicantId: mongoose.Types.ObjectId;
56
+ isFixed: boolean;
57
+ expenditureTypeLid: mongoose.Types.ObjectId;
58
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
59
+ declared?: Pound | null | undefined;
60
+ expected?: Pound | null | undefined;
61
+ actual?: Pound | null | undefined;
62
+ rationale?: string | null | undefined;
26
63
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
27
- pageValidFlag: boolean;
28
- utilities: Pound;
29
- transport: Pound;
30
- subsistence: Pound;
31
- communication: Pound;
32
- health: Pound;
33
- groundRentOrServiceCharge: Pound;
34
- insurance: Pound;
35
- childCareForDependents: Pound;
36
- councilTax: Pound;
37
- clothingAndFootwear: Pound;
38
- vehicleInsurance: Pound;
39
- mortgagePaymentVehicle: Pound;
40
- other: Pound;
41
- totalMontlyExpenditure?: string | null | undefined;
64
+ createdAt: NativeDate;
65
+ updatedAt: NativeDate;
66
+ } & {
67
+ applicantId: mongoose.Types.ObjectId;
68
+ isFixed: boolean;
69
+ expenditureTypeLid: mongoose.Types.ObjectId;
70
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
71
+ declared?: Pound | null | undefined;
72
+ expected?: Pound | null | undefined;
73
+ actual?: Pound | null | undefined;
74
+ rationale?: string | null | undefined;
42
75
  }>> & mongoose.FlatRecord<{
43
- pageValidFlag: boolean;
44
- utilities: Pound;
45
- transport: Pound;
46
- subsistence: Pound;
47
- communication: Pound;
48
- health: Pound;
49
- groundRentOrServiceCharge: Pound;
50
- insurance: Pound;
51
- childCareForDependents: Pound;
52
- councilTax: Pound;
53
- clothingAndFootwear: Pound;
54
- vehicleInsurance: Pound;
55
- mortgagePaymentVehicle: Pound;
56
- other: Pound;
57
- totalMontlyExpenditure?: string | null | undefined;
76
+ createdAt: NativeDate;
77
+ updatedAt: NativeDate;
78
+ } & {
79
+ applicantId: mongoose.Types.ObjectId;
80
+ isFixed: boolean;
81
+ expenditureTypeLid: mongoose.Types.ObjectId;
82
+ sectionName?: "essentialExpenditure" | "basicCostOfLivingExpenditure" | null | undefined;
83
+ declared?: Pound | null | undefined;
84
+ expected?: Pound | null | undefined;
85
+ actual?: Pound | null | undefined;
86
+ rationale?: string | null | undefined;
58
87
  }> & {
59
88
  _id: mongoose.Types.ObjectId;
60
89
  } & {
61
90
  __v: number;
62
- }>;
63
- export default applicantExpenditureSchema;
91
+ }>>;
92
+ export default ApplicantExpenditureModel;
64
93
  //# sourceMappingURL=applicant-expenditure.model.d.ts.map
@@ -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;AAE/C,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB9B,CAAC;AAEH,eAAe,0BAA0B,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,23 +1,62 @@
1
1
  import mongoose from "mongoose";
2
2
  import { Pound } from "../value-objects/pound";
3
3
  const applicantExpenditureSchema = new mongoose.Schema({
4
- pageValidFlag: { type: Boolean, default: false },
5
- utilities: { type: Pound, required: true },
6
- transport: { type: Pound, required: true },
7
- subsistence: { type: Pound, required: true },
8
- communication: { type: Pound, required: true },
9
- health: { type: Pound, required: true },
10
- groundRentOrServiceCharge: { type: Pound, required: true },
11
- insurance: { type: Pound, required: true },
12
- childCareForDependents: { type: Pound, required: true },
13
- councilTax: { type: Pound, required: true },
14
- clothingAndFootwear: { type: Pound, required: true },
15
- vehicleInsurance: { type: Pound, required: true },
16
- mortgagePaymentVehicle: { type: Pound, required: true },
17
- other: { type: Pound, required: true },
18
- totalMontlyExpenditure: { type: String, }
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
+ }
19
45
  }, {
20
- toJSON: { getters: true },
21
- toObject: { getters: true }
46
+ timestamps: true,
47
+ toJSON: { virtuals: true },
48
+ toObject: { virtuals: true },
22
49
  });
23
- export default applicantExpenditureSchema;
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;
@@ -0,0 +1,54 @@
1
+ import mongoose from "mongoose";
2
+ declare const ApplicantIncomeSettingsModel: 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;
29
+ employmentStatusLid: mongoose.Types.ObjectId;
30
+ incomeFromEmployment: boolean;
31
+ incomeFromPension: boolean;
32
+ incomeFromProperty: boolean;
33
+ incomeFromSavings: boolean;
34
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
35
+ applicantId: mongoose.Types.ObjectId;
36
+ employmentStatusLid: mongoose.Types.ObjectId;
37
+ incomeFromEmployment: boolean;
38
+ incomeFromPension: boolean;
39
+ incomeFromProperty: boolean;
40
+ incomeFromSavings: boolean;
41
+ }>> & mongoose.FlatRecord<{
42
+ applicantId: mongoose.Types.ObjectId;
43
+ employmentStatusLid: mongoose.Types.ObjectId;
44
+ incomeFromEmployment: boolean;
45
+ incomeFromPension: boolean;
46
+ incomeFromProperty: boolean;
47
+ incomeFromSavings: boolean;
48
+ }> & {
49
+ _id: mongoose.Types.ObjectId;
50
+ } & {
51
+ __v: number;
52
+ }>>;
53
+ export default ApplicantIncomeSettingsModel;
54
+ //# sourceMappingURL=applicant-income-settings.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicant-income-settings.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-income-settings.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAiBhC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6E,CAAC;AAEhH,eAAe,4BAA4B,CAAE"}
@@ -0,0 +1,16 @@
1
+ import mongoose from "mongoose";
2
+ const applicantIncomeSettingsSchema = new mongoose.Schema({
3
+ applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
4
+ employmentStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
5
+ incomeFromEmployment: { type: Boolean, default: false },
6
+ incomeFromPension: { type: Boolean, default: false },
7
+ incomeFromProperty: { type: Boolean, default: false },
8
+ incomeFromSavings: { type: Boolean, default: false }
9
+ });
10
+ applicantIncomeSettingsSchema.virtual('lendingType').get(function () {
11
+ return this.applicantId?.lendingTypeLid instanceof mongoose.Types.ObjectId
12
+ ? null
13
+ : this.applicantId?.lendingTypeLid?.name || null;
14
+ });
15
+ const ApplicantIncomeSettingsModel = mongoose.model("Applicant_IncomeSettings", applicantIncomeSettingsSchema);
16
+ export default ApplicantIncomeSettingsModel;