@dynamatix/gb-schemas 1.2.13 → 1.2.15

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 (40) hide show
  1. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +43 -0
  2. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -0
  3. package/dist/applicants/applicant-commitment-creditCard.model.js +20 -0
  4. package/dist/applicants/applicant-commitment-loan.model.d.ts +55 -0
  5. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -0
  6. package/dist/applicants/applicant-commitment-loan.model.js +24 -0
  7. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +76 -0
  8. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -0
  9. package/dist/applicants/applicant-commitment-mortgage.model.js +43 -0
  10. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +46 -0
  11. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -0
  12. package/dist/applicants/applicant-commitment-secureLoan.model.js +21 -0
  13. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +43 -0
  14. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -0
  15. package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +20 -0
  16. package/dist/applicants/applicant-commitment.model.d.ts +5954 -16
  17. package/dist/applicants/applicant-commitment.model.d.ts.map +1 -1
  18. package/dist/applicants/applicant-commitment.model.js +13 -5
  19. package/dist/applicants/applicant-employment.model.d.ts +132 -124
  20. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  21. package/dist/applicants/applicant-employment.model.js +51 -43
  22. package/dist/applicants/applicant-expenditure.model.d.ts +54 -19
  23. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  24. package/dist/applicants/applicant-expenditure.model.js +19 -6
  25. package/dist/applicants/applicant-income.model.d.ts +69 -61
  26. package/dist/applicants/applicant-income.model.d.ts.map +1 -1
  27. package/dist/applicants/applicant-income.model.js +55 -43
  28. package/dist/applicants/applicant-other-income.model.d.ts +75 -58
  29. package/dist/applicants/applicant-other-income.model.d.ts.map +1 -1
  30. package/dist/applicants/applicant-other-income.model.js +46 -19
  31. package/dist/applicants/applicant-property-income.model.d.ts +49 -0
  32. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -0
  33. package/dist/applicants/applicant-property-income.model.js +21 -0
  34. package/dist/applicants/applicant.model.d.ts +14370 -1332
  35. package/dist/applicants/applicant.model.d.ts.map +1 -1
  36. package/dist/applicants/applicant.model.js +132 -51
  37. package/dist/properties/property.model.d.ts +36 -36
  38. package/dist/properties/security.model.d.ts.map +1 -1
  39. package/dist/properties/security.model.js +12 -0
  40. package/package.json +1 -1
@@ -1,16 +1,23 @@
1
1
  import mongoose from "mongoose";
2
- declare const incomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
3
- businessType: string;
2
+ import { Pound } from "../value-objects/pound";
3
+ declare const incomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ toJSON: {
5
+ getters: true;
6
+ };
7
+ toObject: {
8
+ getters: true;
9
+ };
10
+ }, {
4
11
  natureOfBusiness: string;
5
- yearEnd1: string;
6
- yearEnd2: string;
7
- yearEnd3: string;
12
+ yearEnd1: number;
13
+ yearEnd2: number;
14
+ yearEnd3: number;
8
15
  pageValidFlag: string;
9
16
  accountantsAddressLine1: string;
10
17
  accountantsAddressLine2: string;
11
18
  accountantsAddressLine3: string;
12
19
  accountantsCity: string;
13
- accountantsCountry: string;
20
+ accountantsCountryLid: mongoose.Types.ObjectId;
14
21
  accountantsEmail: string;
15
22
  accountantsPostCode: string;
16
23
  accountantsPractice: string;
@@ -19,46 +26,46 @@ declare const incomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, a
19
26
  businessAddressLine2: string;
20
27
  businessAddressLine3: string;
21
28
  businessCity: string;
22
- businessCountry: string;
29
+ businessCountryLid: mongoose.Types.ObjectId;
23
30
  businessPostCode: string;
24
31
  businessTelephoneNumber: string;
25
- charteredCertifiedOrOther: string;
32
+ businessTypeLid: mongoose.Types.ObjectId;
33
+ charteredCertifiedOrOtherLid: mongoose.Types.ObjectId;
26
34
  contactName: string;
27
35
  currentYearEnd: string;
28
36
  dateEstablished: string;
29
- doYouHaveAccountant: string;
30
- isBusinessAddressDifferent: string;
37
+ doYouHaveAccountant: boolean;
38
+ isBusinessAddressDifferent: boolean;
31
39
  nameOfBusiness: string;
32
- netAssets1: string;
33
- netAssets2: string;
34
- netAssets3: string;
35
- percentageOfShareholding: string;
40
+ netAssets1: Pound;
41
+ netAssets2: Pound;
42
+ netAssets3: Pound;
43
+ percentageOfShareholding: number;
36
44
  registeredAddressLine1: string;
37
45
  registeredAddressLine2: string;
38
46
  registeredAddressLine3: string;
39
47
  registeredCity: string;
40
- registeredCountry: string;
48
+ registeredCountryLid: mongoose.Types.ObjectId;
41
49
  registeredPostCode: string;
42
50
  registeredTelephone: string;
43
51
  selfEmployedDate: string;
44
- turnover1: string;
45
- turnover2: string;
46
- turnover3: string;
47
- year1: string;
48
- year2: string;
49
- year3: string;
52
+ turnover1: Pound;
53
+ turnover2: Pound;
54
+ turnover3: Pound;
55
+ year1: Pound;
56
+ year2: Pound;
57
+ year3: Pound;
50
58
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
51
- businessType: string;
52
59
  natureOfBusiness: string;
53
- yearEnd1: string;
54
- yearEnd2: string;
55
- yearEnd3: string;
60
+ yearEnd1: number;
61
+ yearEnd2: number;
62
+ yearEnd3: number;
56
63
  pageValidFlag: string;
57
64
  accountantsAddressLine1: string;
58
65
  accountantsAddressLine2: string;
59
66
  accountantsAddressLine3: string;
60
67
  accountantsCity: string;
61
- accountantsCountry: string;
68
+ accountantsCountryLid: mongoose.Types.ObjectId;
62
69
  accountantsEmail: string;
63
70
  accountantsPostCode: string;
64
71
  accountantsPractice: string;
@@ -67,46 +74,46 @@ declare const incomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, a
67
74
  businessAddressLine2: string;
68
75
  businessAddressLine3: string;
69
76
  businessCity: string;
70
- businessCountry: string;
77
+ businessCountryLid: mongoose.Types.ObjectId;
71
78
  businessPostCode: string;
72
79
  businessTelephoneNumber: string;
73
- charteredCertifiedOrOther: string;
80
+ businessTypeLid: mongoose.Types.ObjectId;
81
+ charteredCertifiedOrOtherLid: mongoose.Types.ObjectId;
74
82
  contactName: string;
75
83
  currentYearEnd: string;
76
84
  dateEstablished: string;
77
- doYouHaveAccountant: string;
78
- isBusinessAddressDifferent: string;
85
+ doYouHaveAccountant: boolean;
86
+ isBusinessAddressDifferent: boolean;
79
87
  nameOfBusiness: string;
80
- netAssets1: string;
81
- netAssets2: string;
82
- netAssets3: string;
83
- percentageOfShareholding: string;
88
+ netAssets1: Pound;
89
+ netAssets2: Pound;
90
+ netAssets3: Pound;
91
+ percentageOfShareholding: number;
84
92
  registeredAddressLine1: string;
85
93
  registeredAddressLine2: string;
86
94
  registeredAddressLine3: string;
87
95
  registeredCity: string;
88
- registeredCountry: string;
96
+ registeredCountryLid: mongoose.Types.ObjectId;
89
97
  registeredPostCode: string;
90
98
  registeredTelephone: string;
91
99
  selfEmployedDate: string;
92
- turnover1: string;
93
- turnover2: string;
94
- turnover3: string;
95
- year1: string;
96
- year2: string;
97
- year3: string;
100
+ turnover1: Pound;
101
+ turnover2: Pound;
102
+ turnover3: Pound;
103
+ year1: Pound;
104
+ year2: Pound;
105
+ year3: Pound;
98
106
  }>> & mongoose.FlatRecord<{
99
- businessType: string;
100
107
  natureOfBusiness: string;
101
- yearEnd1: string;
102
- yearEnd2: string;
103
- yearEnd3: string;
108
+ yearEnd1: number;
109
+ yearEnd2: number;
110
+ yearEnd3: number;
104
111
  pageValidFlag: string;
105
112
  accountantsAddressLine1: string;
106
113
  accountantsAddressLine2: string;
107
114
  accountantsAddressLine3: string;
108
115
  accountantsCity: string;
109
- accountantsCountry: string;
116
+ accountantsCountryLid: mongoose.Types.ObjectId;
110
117
  accountantsEmail: string;
111
118
  accountantsPostCode: string;
112
119
  accountantsPractice: string;
@@ -115,34 +122,35 @@ declare const incomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, a
115
122
  businessAddressLine2: string;
116
123
  businessAddressLine3: string;
117
124
  businessCity: string;
118
- businessCountry: string;
125
+ businessCountryLid: mongoose.Types.ObjectId;
119
126
  businessPostCode: string;
120
127
  businessTelephoneNumber: string;
121
- charteredCertifiedOrOther: string;
128
+ businessTypeLid: mongoose.Types.ObjectId;
129
+ charteredCertifiedOrOtherLid: mongoose.Types.ObjectId;
122
130
  contactName: string;
123
131
  currentYearEnd: string;
124
132
  dateEstablished: string;
125
- doYouHaveAccountant: string;
126
- isBusinessAddressDifferent: string;
133
+ doYouHaveAccountant: boolean;
134
+ isBusinessAddressDifferent: boolean;
127
135
  nameOfBusiness: string;
128
- netAssets1: string;
129
- netAssets2: string;
130
- netAssets3: string;
131
- percentageOfShareholding: string;
136
+ netAssets1: Pound;
137
+ netAssets2: Pound;
138
+ netAssets3: Pound;
139
+ percentageOfShareholding: number;
132
140
  registeredAddressLine1: string;
133
141
  registeredAddressLine2: string;
134
142
  registeredAddressLine3: string;
135
143
  registeredCity: string;
136
- registeredCountry: string;
144
+ registeredCountryLid: mongoose.Types.ObjectId;
137
145
  registeredPostCode: string;
138
146
  registeredTelephone: string;
139
147
  selfEmployedDate: string;
140
- turnover1: string;
141
- turnover2: string;
142
- turnover3: string;
143
- year1: string;
144
- year2: string;
145
- year3: string;
148
+ turnover1: Pound;
149
+ turnover2: Pound;
150
+ turnover3: Pound;
151
+ year1: Pound;
152
+ year2: Pound;
153
+ year3: Pound;
146
154
  }> & {
147
155
  _id: mongoose.Types.ObjectId;
148
156
  } & {
@@ -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;AAEhC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
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;AAE/C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -1,51 +1,63 @@
1
1
  import mongoose from "mongoose";
2
+ import { Pound } from "../value-objects/pound";
2
3
  const incomeSchema = new mongoose.Schema({
3
- accountantsAddressLine1: { type: String, default: '' },
4
- accountantsAddressLine2: { type: String, default: '' },
5
- accountantsAddressLine3: { type: String, default: '' },
4
+ accountantsAddressLine1: { type: String, required: true },
5
+ accountantsAddressLine2: { type: String, required: true },
6
+ accountantsAddressLine3: { type: String, required: true },
6
7
  accountantsCity: { type: String, default: '' },
7
- accountantsCountry: { type: String, default: 'GBR' },
8
- accountantsEmail: { type: String, default: '' },
9
- accountantsPostCode: { type: String, default: '' },
10
- accountantsPractice: { type: String, default: '' },
11
- accountantsTelephoneNumber: { type: String, default: '' },
12
- businessAddressLine1: { type: String, default: '' },
13
- businessAddressLine2: { type: String, default: '' },
14
- businessAddressLine3: { type: String, default: '' },
8
+ accountantsCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
9
+ accountantsEmail: { type: String, required: true },
10
+ accountantsPostCode: { type: String, required: true },
11
+ accountantsPractice: { type: String, required: true },
12
+ accountantsTelephoneNumber: { type: String, required: true },
13
+ businessAddressLine1: { type: String, required: true },
14
+ businessAddressLine2: { type: String, required: true },
15
+ businessAddressLine3: { type: String, required: true },
15
16
  businessCity: { type: String, default: '' },
16
- businessCountry: { type: String, default: 'GBR' },
17
- businessPostCode: { type: String, default: '' },
18
- businessTelephoneNumber: { type: String, default: '' },
19
- businessType: { type: String, default: '4' },
20
- charteredCertifiedOrOther: { type: String, default: '' },
21
- contactName: { type: String, default: '' },
22
- currentYearEnd: { type: String, default: null },
23
- dateEstablished: { type: String, default: null },
24
- doYouHaveAccountant: { type: String, default: false },
25
- isBusinessAddressDifferent: { type: String, default: false },
26
- nameOfBusiness: { type: String, default: '' },
27
- natureOfBusiness: { type: String, default: '' },
28
- netAssets1: { type: String, default: 0.0 },
29
- netAssets2: { type: String, default: 0.0 },
30
- netAssets3: { type: String, default: 0.0 },
17
+ businessCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
18
+ businessPostCode: { type: String, required: true },
19
+ businessTelephoneNumber: { type: String, required: true },
20
+ businessTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
21
+ charteredCertifiedOrOtherLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
22
+ contactName: { type: String, required: true },
23
+ currentYearEnd: { type: String, required: true },
24
+ dateEstablished: { type: String, required: true },
25
+ doYouHaveAccountant: {
26
+ type: Boolean,
27
+ required: true,
28
+ get: (v) => v ? "Yes" : "No"
29
+ },
30
+ isBusinessAddressDifferent: {
31
+ type: Boolean,
32
+ required: true,
33
+ get: (v) => v ? "Yes" : "No"
34
+ },
35
+ nameOfBusiness: { type: String, required: true },
36
+ natureOfBusiness: { type: String, required: true },
37
+ netAssets1: { type: Pound, default: '£0.00' },
38
+ netAssets2: { type: Pound, default: '£0.00' },
39
+ netAssets3: { type: Pound, default: '£0.00' },
31
40
  pageValidFlag: { type: String, default: true },
32
- percentageOfShareholding: { type: String, default: 100 },
33
- registeredAddressLine1: { type: String, default: '' },
34
- registeredAddressLine2: { type: String, default: '' },
35
- registeredAddressLine3: { type: String, default: '' },
41
+ percentageOfShareholding: { type: Number, required: true, min: 0, max: 100 },
42
+ registeredAddressLine1: { type: String, required: true },
43
+ registeredAddressLine2: { type: String, required: true },
44
+ registeredAddressLine3: { type: String, required: true },
36
45
  registeredCity: { type: String, default: '' },
37
- registeredCountry: { type: String, default: 'GBR' },
38
- registeredPostCode: { type: String, default: '' },
39
- registeredTelephone: { type: String, default: '' },
40
- selfEmployedDate: { type: String, default: null },
41
- turnover1: { type: String, default: 0.0 },
42
- turnover2: { type: String, default: 0.0 },
43
- turnover3: { type: String, default: 0.0 },
44
- year1: { type: String, default: 0.0 },
45
- year2: { type: String, default: 0.0 },
46
- year3: { type: String, default: 0.0 },
47
- yearEnd1: { type: String, default: '' },
48
- yearEnd2: { type: String, default: '' },
49
- yearEnd3: { type: String, default: '' }
46
+ registeredCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
47
+ registeredPostCode: { type: String, required: true },
48
+ registeredTelephone: { type: String, required: true },
49
+ selfEmployedDate: { type: String, required: true },
50
+ turnover1: { type: Pound, default: 0.00' },
51
+ turnover2: { type: Pound, default: 0.00' },
52
+ turnover3: { type: Pound, default: 0.00' },
53
+ year1: { type: Pound, default: 0.00' },
54
+ year2: { type: Pound, default: 0.00' },
55
+ year3: { type: Pound, default: 0.00' },
56
+ yearEnd1: { type: Number, default: '' },
57
+ yearEnd2: { type: Number, default: '' },
58
+ yearEnd3: { type: Number, default: '' }
59
+ }, {
60
+ toJSON: { getters: true },
61
+ toObject: { getters: true }
50
62
  });
51
63
  export default incomeSchema;
@@ -1,64 +1,81 @@
1
1
  import mongoose from "mongoose";
2
- declare const applicantOtherIncomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
3
- maintenance?: string | null | undefined;
4
- amount1?: string | null | undefined;
5
- amount2?: string | null | undefined;
6
- amount3?: string | null | undefined;
7
- amount4?: string | null | undefined;
8
- guaranteed1?: string | null | undefined;
9
- guaranteed2?: string | null | undefined;
10
- guaranteed3?: string | null | undefined;
11
- guaranteed4?: string | null | undefined;
12
- otherBenefits?: string | null | undefined;
13
- payFrequency1?: string | null | undefined;
14
- payFrequency2?: string | null | undefined;
15
- payFrequency3?: string | null | undefined;
16
- payFrequency4?: string | null | undefined;
17
- sourceDetails1?: string | null | undefined;
18
- sourceDetails2?: string | null | undefined;
19
- sourceDetails3?: string | null | undefined;
20
- sourceDetails4?: string | null | undefined;
21
- taxCredits?: string | null | undefined;
2
+ import { Pound } from "../value-objects/pound";
3
+ declare const applicantOtherIncomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ toJSON: {
5
+ getters: true;
6
+ };
7
+ toObject: {
8
+ getters: true;
9
+ };
10
+ }, {
11
+ maintenance: Pound;
12
+ sourceDetails1: string;
13
+ amount1: Pound;
14
+ payFrequency1Lid: mongoose.Types.ObjectId;
15
+ guaranteed1: boolean;
16
+ sourceDetails2: string;
17
+ amount2: Pound;
18
+ payFrequency2Lid: mongoose.Types.ObjectId;
19
+ guaranteed2: boolean;
20
+ sourceDetails3: string;
21
+ amount3: Pound;
22
+ payFrequency3Lid: mongoose.Types.ObjectId;
23
+ guaranteed3: boolean;
24
+ sourceDetails4: string;
25
+ amount4: Pound;
26
+ payFrequency4Lid: mongoose.Types.ObjectId;
27
+ guaranteed4: boolean;
28
+ taxCredits: Pound;
29
+ otherBenefits: Pound;
30
+ grossPensionIncome: Pound;
31
+ privatePensionIncome: Pound;
32
+ statePensionIncome: Pound;
22
33
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
23
- maintenance?: string | null | undefined;
24
- amount1?: string | null | undefined;
25
- amount2?: string | null | undefined;
26
- amount3?: string | null | undefined;
27
- amount4?: string | null | undefined;
28
- guaranteed1?: string | null | undefined;
29
- guaranteed2?: string | null | undefined;
30
- guaranteed3?: string | null | undefined;
31
- guaranteed4?: string | null | undefined;
32
- otherBenefits?: string | null | undefined;
33
- payFrequency1?: string | null | undefined;
34
- payFrequency2?: string | null | undefined;
35
- payFrequency3?: string | null | undefined;
36
- payFrequency4?: string | null | undefined;
37
- sourceDetails1?: string | null | undefined;
38
- sourceDetails2?: string | null | undefined;
39
- sourceDetails3?: string | null | undefined;
40
- sourceDetails4?: string | null | undefined;
41
- taxCredits?: string | null | undefined;
34
+ maintenance: Pound;
35
+ sourceDetails1: string;
36
+ amount1: Pound;
37
+ payFrequency1Lid: mongoose.Types.ObjectId;
38
+ guaranteed1: boolean;
39
+ sourceDetails2: string;
40
+ amount2: Pound;
41
+ payFrequency2Lid: mongoose.Types.ObjectId;
42
+ guaranteed2: boolean;
43
+ sourceDetails3: string;
44
+ amount3: Pound;
45
+ payFrequency3Lid: mongoose.Types.ObjectId;
46
+ guaranteed3: boolean;
47
+ sourceDetails4: string;
48
+ amount4: Pound;
49
+ payFrequency4Lid: mongoose.Types.ObjectId;
50
+ guaranteed4: boolean;
51
+ taxCredits: Pound;
52
+ otherBenefits: Pound;
53
+ grossPensionIncome: Pound;
54
+ privatePensionIncome: Pound;
55
+ statePensionIncome: Pound;
42
56
  }>> & mongoose.FlatRecord<{
43
- maintenance?: string | null | undefined;
44
- amount1?: string | null | undefined;
45
- amount2?: string | null | undefined;
46
- amount3?: string | null | undefined;
47
- amount4?: string | null | undefined;
48
- guaranteed1?: string | null | undefined;
49
- guaranteed2?: string | null | undefined;
50
- guaranteed3?: string | null | undefined;
51
- guaranteed4?: string | null | undefined;
52
- otherBenefits?: string | null | undefined;
53
- payFrequency1?: string | null | undefined;
54
- payFrequency2?: string | null | undefined;
55
- payFrequency3?: string | null | undefined;
56
- payFrequency4?: string | null | undefined;
57
- sourceDetails1?: string | null | undefined;
58
- sourceDetails2?: string | null | undefined;
59
- sourceDetails3?: string | null | undefined;
60
- sourceDetails4?: string | null | undefined;
61
- taxCredits?: string | null | undefined;
57
+ maintenance: Pound;
58
+ sourceDetails1: string;
59
+ amount1: Pound;
60
+ payFrequency1Lid: mongoose.Types.ObjectId;
61
+ guaranteed1: boolean;
62
+ sourceDetails2: string;
63
+ amount2: Pound;
64
+ payFrequency2Lid: mongoose.Types.ObjectId;
65
+ guaranteed2: boolean;
66
+ sourceDetails3: string;
67
+ amount3: Pound;
68
+ payFrequency3Lid: mongoose.Types.ObjectId;
69
+ guaranteed3: boolean;
70
+ sourceDetails4: string;
71
+ amount4: Pound;
72
+ payFrequency4Lid: mongoose.Types.ObjectId;
73
+ guaranteed4: boolean;
74
+ taxCredits: Pound;
75
+ otherBenefits: Pound;
76
+ grossPensionIncome: Pound;
77
+ privatePensionIncome: Pound;
78
+ statePensionIncome: Pound;
62
79
  }> & {
63
80
  _id: mongoose.Types.ObjectId;
64
81
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-other-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-other-income.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB9B,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"applicant-other-income.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-other-income.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiD9B,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
@@ -1,23 +1,50 @@
1
1
  import mongoose from "mongoose";
2
+ import { Pound } from "../value-objects/pound";
2
3
  const applicantOtherIncomeSchema = new mongoose.Schema({
3
- amount1: { type: String },
4
- amount2: { type: String },
5
- amount3: { type: String },
6
- amount4: { type: String },
7
- guaranteed1: { type: String },
8
- guaranteed2: { type: String },
9
- guaranteed3: { type: String },
10
- guaranteed4: { type: String },
11
- maintenance: { type: String },
12
- otherBenefits: { type: String },
13
- payFrequency1: { type: String },
14
- payFrequency2: { type: String },
15
- payFrequency3: { type: String },
16
- payFrequency4: { type: String },
17
- sourceDetails1: { type: String },
18
- sourceDetails2: { type: String },
19
- sourceDetails3: { type: String },
20
- sourceDetails4: { type: String },
21
- taxCredits: { type: String }
4
+ // Income Source 1
5
+ sourceDetails1: { type: String, default: null },
6
+ amount1: { type: Pound, default: '£0.00' },
7
+ payFrequency1Lid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
8
+ guaranteed1: {
9
+ type: Boolean,
10
+ default: false,
11
+ get: (v) => v ? "Yes" : "No"
12
+ },
13
+ // Income Source 2
14
+ sourceDetails2: { type: String, default: null },
15
+ amount2: { type: Pound, default: '£0.00' },
16
+ payFrequency2Lid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
17
+ guaranteed2: {
18
+ type: Boolean,
19
+ default: false,
20
+ get: (v) => v ? "Yes" : "No"
21
+ },
22
+ // Income Source 3
23
+ sourceDetails3: { type: String, default: null },
24
+ amount3: { type: Pound, default: '£0.00' },
25
+ payFrequency3Lid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
26
+ guaranteed3: {
27
+ type: Boolean,
28
+ default: false,
29
+ get: (v) => v ? "Yes" : "No"
30
+ },
31
+ // Income Source 4
32
+ sourceDetails4: { type: String, default: null },
33
+ amount4: { type: Pound, default: '£0.00' },
34
+ payFrequency4Lid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
35
+ guaranteed4: {
36
+ type: Boolean,
37
+ default: false,
38
+ get: (v) => v ? "Yes" : "No"
39
+ },
40
+ taxCredits: { type: Pound, default: '£0.00' },
41
+ maintenance: { type: Pound, default: '£0.00' },
42
+ otherBenefits: { type: Pound, default: '£0.00' },
43
+ grossPensionIncome: { type: Pound, default: '£0.00' },
44
+ privatePensionIncome: { type: Pound, default: '£0.00' },
45
+ statePensionIncome: { type: Pound, default: '£0.00' },
46
+ }, {
47
+ toJSON: { getters: true },
48
+ toObject: { getters: true }
22
49
  });
23
50
  export default applicantOtherIncomeSchema;
@@ -0,0 +1,49 @@
1
+ import mongoose from "mongoose";
2
+ import { Pound } from "../value-objects/pound";
3
+ declare const propertyIncomeSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ toJSON: {
5
+ getters: true;
6
+ };
7
+ toObject: {
8
+ getters: true;
9
+ };
10
+ }, {
11
+ yearEnd1: number;
12
+ yearEnd2: number;
13
+ yearEnd3: number;
14
+ pageValidFlag: boolean;
15
+ rentalIncome1: Pound;
16
+ netProfit1: Pound;
17
+ rentalIncome2: Pound;
18
+ netProfit2: Pound;
19
+ rentalIncome3: Pound;
20
+ netProfit3: Pound;
21
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
22
+ yearEnd1: number;
23
+ yearEnd2: number;
24
+ yearEnd3: number;
25
+ pageValidFlag: boolean;
26
+ rentalIncome1: Pound;
27
+ netProfit1: Pound;
28
+ rentalIncome2: Pound;
29
+ netProfit2: Pound;
30
+ rentalIncome3: Pound;
31
+ netProfit3: Pound;
32
+ }>> & mongoose.FlatRecord<{
33
+ yearEnd1: number;
34
+ yearEnd2: number;
35
+ yearEnd3: number;
36
+ pageValidFlag: boolean;
37
+ rentalIncome1: Pound;
38
+ netProfit1: Pound;
39
+ rentalIncome2: Pound;
40
+ netProfit2: Pound;
41
+ rentalIncome3: Pound;
42
+ netProfit3: Pound;
43
+ }> & {
44
+ _id: mongoose.Types.ObjectId;
45
+ } & {
46
+ __v: number;
47
+ }>;
48
+ export default propertyIncomeSchema;
49
+ //# sourceMappingURL=applicant-property-income.model.d.ts.map
@@ -0,0 +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;AAE/C,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBxB,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import mongoose from "mongoose";
2
+ import { Pound } from "../value-objects/pound";
3
+ const propertyIncomeSchema = new mongoose.Schema({
4
+ pageValidFlag: { type: Boolean, default: false },
5
+ // Latest tax year
6
+ yearEnd1: { type: Number, required: true },
7
+ rentalIncome1: { type: Pound, required: true },
8
+ netProfit1: { type: Pound, required: true },
9
+ // Previous tax year
10
+ yearEnd2: { type: Number, required: true },
11
+ rentalIncome2: { type: Pound, required: true },
12
+ netProfit2: { type: Pound, required: true },
13
+ // Previous tax year
14
+ yearEnd3: { type: Number, required: true },
15
+ rentalIncome3: { type: Pound, required: true },
16
+ netProfit3: { type: Pound, required: true }
17
+ }, {
18
+ toJSON: { getters: true },
19
+ toObject: { getters: true }
20
+ });
21
+ export default propertyIncomeSchema;