@dynamatix/gb-schemas 1.3.209 → 1.3.211

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 (61) hide show
  1. package/dist/applicants/applicant-additional-income.model.d.ts +1 -0
  2. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
  3. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +1 -0
  4. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
  5. package/dist/applicants/applicant-commitment-loan.model.d.ts +1 -0
  6. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
  7. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +1 -0
  8. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
  9. package/dist/applicants/applicant-commitment-mortgage.model.js +5 -5
  10. package/dist/applicants/applicant-commitment-residence.model.d.ts +1 -0
  11. package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
  12. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +1 -0
  13. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
  14. package/dist/applicants/applicant-commitment-secureLoan.model.js +3 -3
  15. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +1 -0
  16. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
  17. package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +3 -3
  18. package/dist/applicants/applicant-employment-income.model.d.ts +1 -0
  19. package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -1
  20. package/dist/applicants/applicant-employment.model.d.ts +1 -0
  21. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  22. package/dist/applicants/applicant-expenditure.model.d.ts +1 -0
  23. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  24. package/dist/applicants/applicant-income.model.d.ts +1 -0
  25. package/dist/applicants/applicant-income.model.d.ts.map +1 -1
  26. package/dist/applicants/applicant-income.model.js +10 -10
  27. package/dist/applicants/applicant-pension-income.model.d.ts +1 -0
  28. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
  29. package/dist/applicants/applicant-property-income.model.d.ts +1 -0
  30. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
  31. package/dist/applicants/applicant-property-income.model.js +7 -7
  32. package/dist/applicants/applicant-self-employed-income.model.d.ts +1 -0
  33. package/dist/applicants/applicant-self-employed-income.model.d.ts.map +1 -1
  34. package/dist/applicants/applicant-self-employed-income.model.js +2 -2
  35. package/dist/applicants/applicant-sole-trader-income.model.d.ts +1 -0
  36. package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +1 -1
  37. package/dist/applicants/applicant-sole-trader-income.model.js +2 -2
  38. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +1 -0
  39. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
  40. package/dist/applicants/applicant-uk-tax-credits.model.js +4 -4
  41. package/dist/applicants/applicant.model.d.ts +19 -18
  42. package/dist/applicants/applicant.model.d.ts.map +1 -1
  43. package/dist/applicants/applicant.model.js +4 -4
  44. package/dist/applications/application-company-model.d.ts +19 -18
  45. package/dist/applications/application-company-model.d.ts.map +1 -1
  46. package/dist/applications/application-company-model.js +9 -8
  47. package/dist/applications/application-direct-debit.model.d.ts +20 -18
  48. package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
  49. package/dist/applications/application-mortgage.model.d.ts +1 -0
  50. package/dist/applications/application-mortgage.model.d.ts.map +1 -1
  51. package/dist/applications/applications-task.model.d.ts +12 -0
  52. package/dist/applications/applications-task.model.d.ts.map +1 -1
  53. package/dist/applications/applications-task.model.js +10 -1
  54. package/dist/applications/solicitor.model.d.ts +2 -0
  55. package/dist/applications/solicitor.model.d.ts.map +1 -1
  56. package/dist/properties/property.model.d.ts +19 -18
  57. package/dist/properties/property.model.d.ts.map +1 -1
  58. package/dist/properties/property.model.js +8 -4
  59. package/dist/value-objects/pound.d.ts.map +1 -1
  60. package/dist/value-objects/pound.js +3 -2
  61. package/package.json +72 -72
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-additional-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-additional-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAgB5D,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiF,CAAC;AAEtH,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"applicant-additional-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-additional-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAgB5D,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiF,CAAC;AAEtH,eAAe,8BAA8B,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-creditCard.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-creditCard.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAkC/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqE,CAAC;AACrG,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"applicant-commitment-creditCard.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-creditCard.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAkC/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqE,CAAC;AACrG,eAAe,yBAAyB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-loan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-loan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAiD5D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"applicant-commitment-loan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-loan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAiD5D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-mortgage.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-mortgage.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAmE/C,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiE,CAAC;AAC/F,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"applicant-commitment-mortgage.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-mortgage.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAmE5D,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiE,CAAC;AAC/F,eAAe,uBAAuB,CAAC"}
@@ -1,17 +1,17 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
4
4
  const mortgageCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
6
  lenderName: { type: String }, // Provider Name / Provider category
7
- propertyValue: { type: Pound, default: null },
7
+ propertyValue: { type: Pound, default: null, get: formatPound },
8
8
  repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
9
9
  mortgageTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
10
10
  fixedTerm: { type: String, default: null },
11
- originalLoanAmount: { type: Pound, default: null },
12
- outstandingBalance: { type: Pound }, // Balance
11
+ originalLoanAmount: { type: Pound, default: null, get: formatPound },
12
+ outstandingBalance: { type: Pound, get: formatPound }, // Balance
13
13
  startDate: { type: String, default: null },
14
- monthlyPayment: { type: Pound }, // Monthly payment
14
+ monthlyPayment: { type: Pound, get: formatPound }, // Monthly payment
15
15
  commitmentId: { type: String, default: null },
16
16
  commitmentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
17
17
  furtherAdvances: { type: Boolean, default: false },
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-residence.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-residence.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAoD5D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmE,CAAC;AAClG,eAAe,wBAAwB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-secureLoan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-secureLoan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAuC/C,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACxG,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"applicant-commitment-secureLoan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-secureLoan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAuC5D,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACxG,eAAe,0BAA0B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
4
4
  const securedLoanCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
@@ -11,8 +11,8 @@ const securedLoanCommitmentSchema = new mongoose.Schema({
11
11
  sharedMortgage: { type: String, default: null },
12
12
  remainingTerm: { type: Number, default: null }, // Remaining term
13
13
  startDate: { type: String, default: null },
14
- outstandingBalance: { type: Pound, required: true }, // Balance
15
- monthlyPayment: { type: Pound, required: true }, // Monthly payment
14
+ outstandingBalance: { type: Pound, required: true, get: formatPound }, // Balance
15
+ monthlyPayment: { type: Pound, required: true, get: formatPound }, // Monthly payment
16
16
  source: {
17
17
  type: String,
18
18
  enum: ["Broker", "Credit Report", "Underwriter"],
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-commitment-unsecuredLoan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-unsecuredLoan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAuC/C,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA2E,CAAC;AAC9G,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"applicant-commitment-unsecuredLoan.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-commitment-unsecuredLoan.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAuC5D,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA2E,CAAC;AAC9G,eAAe,4BAA4B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
4
4
  const unsecuredLoanCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
@@ -10,8 +10,8 @@ const unsecuredLoanCommitmentSchema = new mongoose.Schema({
10
10
  sharedMortgage: { type: String, default: null },
11
11
  remainingTerm: { type: Number, default: null }, // Remaining term
12
12
  startDate: { type: String, default: null },
13
- outstandingBalance: { type: Pound, required: true }, // Balance
14
- monthlyPayment: { type: Pound, required: true }, // Monthly payment
13
+ outstandingBalance: { type: Pound, required: true, get: formatPound }, // Balance
14
+ monthlyPayment: { type: Pound, required: true, get: formatPound }, // Monthly payment
15
15
  source: {
16
16
  type: String,
17
17
  enum: ["Broker", "Credit Report", "Underwriter"],
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-employment-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-employment-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAa5D,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgF,CAAC;AAErH,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"applicant-employment-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-employment-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAa5D,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgF,CAAC;AAErH,eAAe,8BAA8B,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -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;AA2C5D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgF,CAAC;AAE1G,eAAe,mBAAmB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -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;AA8E5D,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsE,CAAC;AACtG,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;AA8E5D,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsE,CAAC;AACtG,eAAe,yBAAyB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAkF5D,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAE9E,eAAe,oBAAoB,CAAC"}
@@ -53,26 +53,26 @@ const incomeSchema = new mongoose.Schema({
53
53
  employmentIncomeRationale: { type: String, default: null },
54
54
  isPensionIncomeConfirmed: { type: Boolean, default: false },
55
55
  pensionIncomeRationale: { type: String, default: null },
56
- totalPensionGrossIncome: { type: Pound, default: 0.00 },
57
- totalPensionNetIncome: { type: Pound, default: 0.00 },
58
- totalAdditionalGrossIncome: { type: Pound, default: 0.00 },
59
- totalAdditionalNetIncome: { type: Pound, default: 0.00 },
56
+ totalPensionGrossIncome: { type: Pound, get: formatPound, default: 0.00 },
57
+ totalPensionNetIncome: { type: Pound, get: formatPound, default: 0.00 },
58
+ totalAdditionalGrossIncome: { type: Pound, get: formatPound, default: 0.00 },
59
+ totalAdditionalNetIncome: { type: Pound, get: formatPound, default: 0.00 },
60
60
  isAdditionalIncomeConfirmed: { type: Boolean, default: false },
61
61
  additionalIncomeRationale: { type: String, default: null },
62
62
  isUKTaxCreditsIncomeConfirmed: { type: Boolean, default: false },
63
- totalUKTaxCreditsGrossIncome: { type: Pound, default: 0.00 },
64
- totalUKTaxCreditsNetIncome: { type: Pound, default: 0.00 },
63
+ totalUKTaxCreditsGrossIncome: { type: Pound, get: formatPound, default: 0.00 },
64
+ totalUKTaxCreditsNetIncome: { type: Pound, get: formatPound, default: 0.00 },
65
65
  ukTaxCreditsIncomeRationale: { type: String, default: null },
66
66
  isPropertyIncomeConfirmed: { type: Boolean, default: false },
67
67
  propertyIncomeRationale: { type: String, default: null },
68
68
  selfEmployedIncomeRationale: { type: String, default: null },
69
69
  isSelfEmployedIncomeConfirmed: { type: Boolean, default: false },
70
- totalSelfEmployedGrossIncome: { type: Pound, default: 0.00 },
71
- totalSelfEmployedNetIncome: { type: Pound, default: 0.00 },
70
+ totalSelfEmployedGrossIncome: { type: Pound, get: formatPound, default: 0.00 },
71
+ totalSelfEmployedNetIncome: { type: Pound, get: formatPound, default: 0.00 },
72
72
  soleTraderIncomeRationale: { type: String, default: null },
73
73
  isSoleTraderIncomeConfirmed: { type: Boolean, default: false },
74
- soleTraderGrossIncome: { type: Pound, default: 0.00 },
75
- soleTraderNetIncome: { type: Pound, default: 0.00 },
74
+ soleTraderGrossIncome: { type: Pound, get: formatPound, default: 0.00 },
75
+ soleTraderNetIncome: { type: Pound, get: formatPound, default: 0.00 },
76
76
  }, {
77
77
  toJSON: { getters: true },
78
78
  toObject: { getters: true }
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-pension-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-pension-income.model.ts"],"names":[],"mappings":";;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0E,CAAC;AAE7G,eAAe,4BAA4B,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-property-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-property-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AA6B/C,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAoE,CAAC;AAEvG,eAAe,4BAA4B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  const propertyIncomeSchema = new mongoose.Schema({
4
4
  applicantId: {
5
5
  type: mongoose.Schema.Types.ObjectId,
@@ -8,16 +8,16 @@ const propertyIncomeSchema = new mongoose.Schema({
8
8
  },
9
9
  // Latest tax year
10
10
  yearEnd1: { type: Number, required: true },
11
- rentalIncome1: { type: Pound, required: true },
12
- netProfit1: { type: Pound, required: true },
11
+ rentalIncome1: { type: Pound, required: true, get: formatPound },
12
+ netProfit1: { type: Pound, required: true, get: formatPound },
13
13
  // Previous tax year
14
14
  yearEnd2: { type: Number, required: true },
15
- rentalIncome2: { type: Pound, required: true },
16
- netProfit2: { type: Pound, required: true },
15
+ rentalIncome2: { type: Pound, required: true, get: formatPound },
16
+ netProfit2: { type: Pound, required: true, get: formatPound },
17
17
  // Previous tax year
18
18
  yearEnd3: { type: Number, required: true },
19
- rentalIncome3: { type: Pound, required: true },
20
- netProfit3: { type: Pound, required: true }
19
+ rentalIncome3: { type: Pound, required: true, get: formatPound },
20
+ netProfit3: { type: Pound, required: true, get: formatPound }
21
21
  });
22
22
  propertyIncomeSchema.virtual('incomeSourceId').get(function () {
23
23
  return this.applicantId?.incomeSourceId instanceof mongoose.Types.ObjectId
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-self-employed-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-self-employed-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAgB/C,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6E,CAAC;AAEpH,eAAe,gCAAgC,CAAC"}
1
+ {"version":3,"file":"applicant-self-employed-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-self-employed-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAgB5D,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6E,CAAC;AAEpH,eAAe,gCAAgC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  const selfEmployedIncomeSchema = new mongoose.Schema({
4
4
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
5
5
  incomeSourceLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
6
- amount: { type: Pound, default: 0.00, required: true },
6
+ amount: { type: Pound, default: 0.00, required: true, get: formatPound },
7
7
  }, {
8
8
  toJSON: { getters: true },
9
9
  toObject: { getters: true }
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-sole-trader-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-sole-trader-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAiB/C,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyE,CAAC;AAE9G,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"applicant-sole-trader-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-sole-trader-income.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAiB5D,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyE,CAAC;AAE9G,eAAe,8BAA8B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  const soleTraderIncomeSchema = new mongoose.Schema({
4
4
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
5
5
  incomeSourceLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
6
- amount: { type: Pound, default: 0.00 },
6
+ amount: { type: Pound, default: 0.00, get: formatPound },
7
7
  }, {
8
8
  toJSON: { getters: true },
9
9
  toObject: { getters: true }
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-uk-tax-credits.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-uk-tax-credits.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAe/C,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0E,CAAC;AAE3G,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"applicant-uk-tax-credits.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-uk-tax-credits.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAe5D,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0E,CAAC;AAE3G,eAAe,0BAA0B,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import mongoose from "mongoose";
2
- import { Pound } from "../value-objects/pound";
2
+ import { Pound, formatPound } from "../value-objects/pound";
3
3
  const applicantUkTaxCreditsSchema = new mongoose.Schema({
4
4
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
5
- taxCredits: { type: Pound, default: 0.00 },
6
- maintenance: { type: Pound, default: 0.00 },
7
- otherBenefits: { type: Pound, default: 0.00 },
5
+ taxCredits: { type: Pound, default: 0.00, get: formatPound },
6
+ maintenance: { type: Pound, default: 0.00, get: formatPound },
7
+ otherBenefits: { type: Pound, default: 0.00, get: formatPound },
8
8
  otherBenefitsExplanation: { type: String, default: null },
9
9
  });
10
10
  applicantUkTaxCreditsSchema.virtual('incomeSourceId').get(function () {
@@ -1,3 +1,4 @@
1
+ /// <reference path="../value-objects/pound.d.ts" />
1
2
  /// <reference path="../value-objects/account-number.d.ts" />
2
3
  /// <reference path="../value-objects/sort-code.d.ts" />
3
4
  /// <reference types="mongoose/types/aggregate" />
@@ -36,9 +37,9 @@ declare const ApplicantModel: mongoose.Model<{
36
37
  createdAt?: {
37
38
  toJSON?: {} | null | undefined;
38
39
  [Symbol.toPrimitive]?: {} | null | undefined;
39
- toString?: {} | null | undefined;
40
- toLocaleString?: {} | null | undefined;
41
- valueOf?: {} | null | undefined;
40
+ toString: {} | null;
41
+ toLocaleString: {} | null;
42
+ valueOf: {} | null;
42
43
  toDateString?: {} | null | undefined;
43
44
  toTimeString?: {} | null | undefined;
44
45
  toLocaleDateString?: {} | null | undefined;
@@ -83,9 +84,9 @@ declare const ApplicantModel: mongoose.Model<{
83
84
  updatedAt?: {
84
85
  toJSON?: {} | null | undefined;
85
86
  [Symbol.toPrimitive]?: {} | null | undefined;
86
- toString?: {} | null | undefined;
87
- toLocaleString?: {} | null | undefined;
88
- valueOf?: {} | null | undefined;
87
+ toString: {} | null;
88
+ toLocaleString: {} | null;
89
+ valueOf: {} | null;
89
90
  toDateString?: {} | null | undefined;
90
91
  toTimeString?: {} | null | undefined;
91
92
  toLocaleDateString?: {} | null | undefined;
@@ -384,9 +385,9 @@ declare const ApplicantModel: mongoose.Model<{
384
385
  createdAt?: {
385
386
  toJSON?: {} | null | undefined;
386
387
  [Symbol.toPrimitive]?: {} | null | undefined;
387
- toString?: {} | null | undefined;
388
- toLocaleString?: {} | null | undefined;
389
- valueOf?: {} | null | undefined;
388
+ toString: {} | null;
389
+ toLocaleString: {} | null;
390
+ valueOf: {} | null;
390
391
  toDateString?: {} | null | undefined;
391
392
  toTimeString?: {} | null | undefined;
392
393
  toLocaleDateString?: {} | null | undefined;
@@ -431,9 +432,9 @@ declare const ApplicantModel: mongoose.Model<{
431
432
  updatedAt?: {
432
433
  toJSON?: {} | null | undefined;
433
434
  [Symbol.toPrimitive]?: {} | null | undefined;
434
- toString?: {} | null | undefined;
435
- toLocaleString?: {} | null | undefined;
436
- valueOf?: {} | null | undefined;
435
+ toString: {} | null;
436
+ toLocaleString: {} | null;
437
+ valueOf: {} | null;
437
438
  toDateString?: {} | null | undefined;
438
439
  toTimeString?: {} | null | undefined;
439
440
  toLocaleDateString?: {} | null | undefined;
@@ -732,9 +733,9 @@ declare const ApplicantModel: mongoose.Model<{
732
733
  createdAt?: {
733
734
  toJSON?: {} | null | undefined;
734
735
  [Symbol.toPrimitive]?: {} | null | undefined;
735
- toString?: {} | null | undefined;
736
- toLocaleString?: {} | null | undefined;
737
- valueOf?: {} | null | undefined;
736
+ toString: {} | null;
737
+ toLocaleString: {} | null;
738
+ valueOf: {} | null;
738
739
  toDateString?: {} | null | undefined;
739
740
  toTimeString?: {} | null | undefined;
740
741
  toLocaleDateString?: {} | null | undefined;
@@ -779,9 +780,9 @@ declare const ApplicantModel: mongoose.Model<{
779
780
  updatedAt?: {
780
781
  toJSON?: {} | null | undefined;
781
782
  [Symbol.toPrimitive]?: {} | null | undefined;
782
- toString?: {} | null | undefined;
783
- toLocaleString?: {} | null | undefined;
784
- valueOf?: {} | null | undefined;
783
+ toString: {} | null;
784
+ toLocaleString: {} | null;
785
+ valueOf: {} | null;
785
786
  toDateString?: {} | null | undefined;
786
787
  toTimeString?: {} | null | undefined;
787
788
  toLocaleDateString?: {} | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"applicant.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAOhC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AA4P/C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AACpE,eAAe,cAAc,CAAC"}
@@ -3,7 +3,7 @@ import applicantCreditDataSchema from "./applicant-credit-data.model";
3
3
  import applicantRiskNarrativeSchema from "./applicant-risk-narrative.model";
4
4
  import applicantDirectDebitSchema from "./applicant-direct-debit.model";
5
5
  import creditProfileSchema from "./applicant-credit-profile.model";
6
- import { Pound } from "../value-objects/pound";
6
+ import { Pound, formatPound } from "../value-objects/pound";
7
7
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
8
8
  const applicantSchema = new mongoose.Schema({
9
9
  applicantId: { type: String, required: true },
@@ -159,9 +159,9 @@ const applicantSchema = new mongoose.Schema({
159
159
  return this.isUkResident;
160
160
  }
161
161
  },
162
- proposedFinanceAmount: { type: Pound, default: 0, description: "Proposed finance amount for fixed expenditures, defaults to 0.", },
163
- topupAmount: { type: Pound, default: 0, description: "Top-up amount for fixed expenditures, defaults to 0.", },
164
- creditCommitments: { type: Pound, default: 0, description: "Total credit commitments amount, defaults to 0.", },
162
+ proposedFinanceAmount: { type: Pound, default: 0, description: "Proposed finance amount for fixed expenditures, defaults to 0.", get: formatPound },
163
+ topupAmount: { type: Pound, default: 0, description: "Top-up amount for fixed expenditures, defaults to 0.", get: formatPound },
164
+ creditCommitments: { type: Pound, default: 0, description: "Total credit commitments amount, defaults to 0.", get: formatPound },
165
165
  creditData: applicantCreditDataSchema,
166
166
  riskNarrative: applicantRiskNarrativeSchema,
167
167
  incomeSourceId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant_IncomeSettings", default: null },