@dynamatix/gb-schemas 1.2.78 → 1.2.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/applicants/applicant-expenditure.model.d.ts +73 -50
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.js +49 -18
- package/dist/applicants/index.d.ts +1 -0
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +1 -0
- package/package.json +1 -1
|
@@ -26,65 +26,88 @@
|
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
27
|
import mongoose from "mongoose";
|
|
28
28
|
import { Pound } from "../value-objects/pound";
|
|
29
|
-
declare const
|
|
29
|
+
declare const ApplicantExpenditureModel: mongoose.Model<{
|
|
30
|
+
createdAt: NativeDate;
|
|
31
|
+
updatedAt: NativeDate;
|
|
32
|
+
} & {
|
|
33
|
+
applicantId: mongoose.Types.ObjectId;
|
|
34
|
+
isFixed: boolean;
|
|
35
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
36
|
+
declared?: Pound | null | undefined;
|
|
37
|
+
ons?: Pound | null | undefined;
|
|
38
|
+
actual?: Pound | null | undefined;
|
|
39
|
+
rationale?: string | null | undefined;
|
|
40
|
+
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
41
|
+
createdAt: NativeDate;
|
|
42
|
+
updatedAt: NativeDate;
|
|
43
|
+
} & {
|
|
44
|
+
applicantId: mongoose.Types.ObjectId;
|
|
45
|
+
isFixed: boolean;
|
|
46
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
47
|
+
declared?: Pound | null | undefined;
|
|
48
|
+
ons?: Pound | null | undefined;
|
|
49
|
+
actual?: Pound | null | undefined;
|
|
50
|
+
rationale?: string | null | undefined;
|
|
51
|
+
}> & {
|
|
52
|
+
createdAt: NativeDate;
|
|
53
|
+
updatedAt: NativeDate;
|
|
54
|
+
} & {
|
|
55
|
+
applicantId: mongoose.Types.ObjectId;
|
|
56
|
+
isFixed: boolean;
|
|
57
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
58
|
+
declared?: Pound | null | undefined;
|
|
59
|
+
ons?: Pound | null | undefined;
|
|
60
|
+
actual?: Pound | null | undefined;
|
|
61
|
+
rationale?: string | null | undefined;
|
|
62
|
+
} & {
|
|
63
|
+
_id: mongoose.Types.ObjectId;
|
|
64
|
+
} & {
|
|
65
|
+
__v: number;
|
|
66
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
67
|
+
timestamps: true;
|
|
30
68
|
toJSON: {
|
|
31
|
-
|
|
69
|
+
virtuals: true;
|
|
32
70
|
};
|
|
33
71
|
toObject: {
|
|
34
|
-
|
|
72
|
+
virtuals: true;
|
|
35
73
|
};
|
|
36
74
|
}, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
clothingAndFootwear: Pound;
|
|
48
|
-
vehicleInsurance: Pound;
|
|
49
|
-
mortgagePaymentVehicle: Pound;
|
|
50
|
-
other: Pound;
|
|
51
|
-
totalMontlyExpenditure?: string | null | undefined;
|
|
75
|
+
createdAt: NativeDate;
|
|
76
|
+
updatedAt: NativeDate;
|
|
77
|
+
} & {
|
|
78
|
+
applicantId: mongoose.Types.ObjectId;
|
|
79
|
+
isFixed: boolean;
|
|
80
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
81
|
+
declared?: Pound | null | undefined;
|
|
82
|
+
ons?: Pound | null | undefined;
|
|
83
|
+
actual?: Pound | null | undefined;
|
|
84
|
+
rationale?: string | null | undefined;
|
|
52
85
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
clothingAndFootwear: Pound;
|
|
64
|
-
vehicleInsurance: Pound;
|
|
65
|
-
mortgagePaymentVehicle: Pound;
|
|
66
|
-
other: Pound;
|
|
67
|
-
totalMontlyExpenditure?: string | null | undefined;
|
|
86
|
+
createdAt: NativeDate;
|
|
87
|
+
updatedAt: NativeDate;
|
|
88
|
+
} & {
|
|
89
|
+
applicantId: mongoose.Types.ObjectId;
|
|
90
|
+
isFixed: boolean;
|
|
91
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
92
|
+
declared?: Pound | null | undefined;
|
|
93
|
+
ons?: Pound | null | undefined;
|
|
94
|
+
actual?: Pound | null | undefined;
|
|
95
|
+
rationale?: string | null | undefined;
|
|
68
96
|
}>> & mongoose.FlatRecord<{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
clothingAndFootwear: Pound;
|
|
80
|
-
vehicleInsurance: Pound;
|
|
81
|
-
mortgagePaymentVehicle: Pound;
|
|
82
|
-
other: Pound;
|
|
83
|
-
totalMontlyExpenditure?: string | null | undefined;
|
|
97
|
+
createdAt: NativeDate;
|
|
98
|
+
updatedAt: NativeDate;
|
|
99
|
+
} & {
|
|
100
|
+
applicantId: mongoose.Types.ObjectId;
|
|
101
|
+
isFixed: boolean;
|
|
102
|
+
expenditureTypeLid: mongoose.Types.ObjectId;
|
|
103
|
+
declared?: Pound | null | undefined;
|
|
104
|
+
ons?: Pound | null | undefined;
|
|
105
|
+
actual?: Pound | null | undefined;
|
|
106
|
+
rationale?: string | null | undefined;
|
|
84
107
|
}> & {
|
|
85
108
|
_id: mongoose.Types.ObjectId;
|
|
86
109
|
} & {
|
|
87
110
|
__v: number;
|
|
88
|
-
}
|
|
89
|
-
export default
|
|
111
|
+
}>>;
|
|
112
|
+
export default ApplicantExpenditureModel;
|
|
90
113
|
//# 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;
|
|
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;AAoE/C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACvG,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import { Pound } from "../value-objects/pound";
|
|
3
3
|
const applicantExpenditureSchema = new mongoose.Schema({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
applicantId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: "Applicant",
|
|
7
|
+
required: true,
|
|
8
|
+
description: "Reference to the applicant this expenditure record belongs to.",
|
|
9
|
+
},
|
|
10
|
+
isFixed: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false,
|
|
13
|
+
description: "True if all mandatory fields have been completed, otherwise false.",
|
|
14
|
+
},
|
|
15
|
+
expenditureTypeLid: {
|
|
16
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
17
|
+
ref: "Lookup",
|
|
18
|
+
default: null,
|
|
19
|
+
description: "Essential expenditure lookup",
|
|
20
|
+
},
|
|
21
|
+
declared: {
|
|
22
|
+
type: Pound,
|
|
23
|
+
description: "Declared monthly expenditure amount provided by the applicant.",
|
|
24
|
+
},
|
|
25
|
+
ons: {
|
|
26
|
+
type: Pound,
|
|
27
|
+
description: "Office for National Statistics (ONS) benchmark monthly expenditure.",
|
|
28
|
+
},
|
|
29
|
+
actual: {
|
|
30
|
+
type: Pound,
|
|
31
|
+
description: "Actual monthly expenditure verified based on applicant's evidence.",
|
|
32
|
+
},
|
|
33
|
+
rationale: {
|
|
34
|
+
type: String,
|
|
35
|
+
description: "Rationalized monthly expenditure used for affordability assessment.",
|
|
36
|
+
},
|
|
19
37
|
}, {
|
|
20
|
-
|
|
21
|
-
|
|
38
|
+
timestamps: true,
|
|
39
|
+
toJSON: { virtuals: true },
|
|
40
|
+
toObject: { virtuals: true },
|
|
22
41
|
});
|
|
23
|
-
|
|
42
|
+
// Virtual property for essentialExpenditure
|
|
43
|
+
const virtualEssentialExpenditure = applicantExpenditureSchema.virtual("ExpenditureType", {
|
|
44
|
+
ref: "Lookup",
|
|
45
|
+
localField: "expenditureTypeLid",
|
|
46
|
+
foreignField: "_id",
|
|
47
|
+
justOne: true,
|
|
48
|
+
options: {
|
|
49
|
+
select: "label",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
virtualEssentialExpenditure.description = "Populated lookup value for essential expenditure.";
|
|
53
|
+
const ApplicantExpenditureModel = mongoose.model("Applicant_Expenditure", applicantExpenditureSchema);
|
|
54
|
+
export default ApplicantExpenditureModel;
|
|
@@ -5,4 +5,5 @@ export { default as MortgageCommitmentModel } from './applicant-commitment-mortg
|
|
|
5
5
|
export { default as ResidenceCommitmentModel } from './applicant-commitment-residence.model';
|
|
6
6
|
export { default as SecuredLoanCommitmentModel } from './applicant-commitment-secureLoan.model';
|
|
7
7
|
export { default as UnsecuredLoanCommitmentModel } from './applicant-commitment-unsecuredLoan.model';
|
|
8
|
+
export { default as ApplicantExpenditureModel } from './applicant-expenditure.model';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applicants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applicants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/applicants/index.js
CHANGED
|
@@ -5,3 +5,4 @@ export { default as MortgageCommitmentModel } from './applicant-commitment-mortg
|
|
|
5
5
|
export { default as ResidenceCommitmentModel } from './applicant-commitment-residence.model';
|
|
6
6
|
export { default as SecuredLoanCommitmentModel } from './applicant-commitment-secureLoan.model';
|
|
7
7
|
export { default as UnsecuredLoanCommitmentModel } from './applicant-commitment-unsecuredLoan.model';
|
|
8
|
+
export { default as ApplicantExpenditureModel } from './applicant-expenditure.model';
|