@dynamatix/gb-schemas 1.2.75 → 1.2.76
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-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +12 -0
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.js +6 -0
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +6 -0
- package/package.json +1 -1
- package/dist/applicants/applicant-commitment.model.d.ts +0 -7866
- package/dist/applicants/applicant-commitment.model.d.ts.map +0 -1
- package/dist/properties/property-potfolio.model.d.ts +0 -1113
- package/dist/properties/property-potfolio.model.d.ts.map +0 -1
- package/dist/properties/property-potfolio.model.js +0 -116
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"property-potfolio.model.d.ts","sourceRoot":"","sources":["../../properties/property-potfolio.model.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAuH/C,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgE,CAAC;AAC7F,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import { Pound } from '../value-objects/pound';
|
|
3
|
-
const propertyPortfolioSchema = new mongoose.Schema({
|
|
4
|
-
propertyId: {
|
|
5
|
-
type: String,
|
|
6
|
-
required: true,
|
|
7
|
-
unique: true,
|
|
8
|
-
description: "Unique identifier for the property"
|
|
9
|
-
},
|
|
10
|
-
addressLine1: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: true,
|
|
13
|
-
maxLength: 35,
|
|
14
|
-
description: "First line of the property address"
|
|
15
|
-
},
|
|
16
|
-
addressLine2: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: false,
|
|
19
|
-
maxLength: 35,
|
|
20
|
-
description: "Second line of the property address"
|
|
21
|
-
},
|
|
22
|
-
addressLine3: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: false,
|
|
25
|
-
maxLength: 35,
|
|
26
|
-
description: "Third line of the property address"
|
|
27
|
-
},
|
|
28
|
-
associatedLoanParties: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: false,
|
|
31
|
-
description: "Checkbox to allow selection of the applicants on the application, including the company if applicable"
|
|
32
|
-
},
|
|
33
|
-
city: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: false,
|
|
36
|
-
maxLength: 30,
|
|
37
|
-
description: "City where the property is located"
|
|
38
|
-
},
|
|
39
|
-
countryLid: {
|
|
40
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
41
|
-
ref: 'Lookup',
|
|
42
|
-
required: true,
|
|
43
|
-
description: "Country where the property is located",
|
|
44
|
-
},
|
|
45
|
-
lender: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: true,
|
|
48
|
-
maxLength: 35,
|
|
49
|
-
description: "Lender providing the loan for the property"
|
|
50
|
-
},
|
|
51
|
-
marketValue: {
|
|
52
|
-
type: Pound,
|
|
53
|
-
required: true,
|
|
54
|
-
default: '£0.00',
|
|
55
|
-
description: "The market value of the property",
|
|
56
|
-
},
|
|
57
|
-
monthlyRent: {
|
|
58
|
-
type: Pound,
|
|
59
|
-
required: true,
|
|
60
|
-
default: '£0.00',
|
|
61
|
-
description: "The monthly rent value of the property"
|
|
62
|
-
},
|
|
63
|
-
monthlyRepayment: {
|
|
64
|
-
type: Pound,
|
|
65
|
-
required: true,
|
|
66
|
-
default: '£0.00',
|
|
67
|
-
description: "The monthly repayment value for the property"
|
|
68
|
-
},
|
|
69
|
-
originalLoanBalance: {
|
|
70
|
-
type: Pound,
|
|
71
|
-
required: true,
|
|
72
|
-
default: '£0.00',
|
|
73
|
-
description: "The original loan balance for the property"
|
|
74
|
-
},
|
|
75
|
-
outstandingBalance: {
|
|
76
|
-
type: Pound,
|
|
77
|
-
required: true,
|
|
78
|
-
default: '£0.00',
|
|
79
|
-
description: "The remaining outstanding balance of the property loan"
|
|
80
|
-
},
|
|
81
|
-
otherOwnershipParties: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: false,
|
|
84
|
-
maxLength: 500,
|
|
85
|
-
description: "Other parties that own the property"
|
|
86
|
-
},
|
|
87
|
-
postcode: {
|
|
88
|
-
type: String,
|
|
89
|
-
required: true,
|
|
90
|
-
maxLength: 50,
|
|
91
|
-
description: "The postcode for the property"
|
|
92
|
-
},
|
|
93
|
-
remainingTerm: {
|
|
94
|
-
type: Number,
|
|
95
|
-
required: true,
|
|
96
|
-
max: 4,
|
|
97
|
-
description: "The remaining term of the loan in years"
|
|
98
|
-
},
|
|
99
|
-
}, {
|
|
100
|
-
timestamps: true,
|
|
101
|
-
toJSON: { virtuals: true },
|
|
102
|
-
toObject: { virtuals: true }
|
|
103
|
-
});
|
|
104
|
-
// Virtual property for countryLid (reference to Lookup collection)
|
|
105
|
-
const virtualCountry = propertyPortfolioSchema.virtual('country', {
|
|
106
|
-
ref: 'Lookup',
|
|
107
|
-
localField: 'countryLid',
|
|
108
|
-
foreignField: '_id',
|
|
109
|
-
justOne: true,
|
|
110
|
-
options: {
|
|
111
|
-
select: 'label' // This will select the 'label' field from the Lookup collection
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
virtualCountry.description = 'Populated lookup value for country';
|
|
115
|
-
const PropertyPortfolioModel = mongoose.model('Property_Portfolio', propertyPortfolioSchema);
|
|
116
|
-
export default PropertyPortfolioModel;
|