@dynamatix/gb-schemas 0.26.0 → 0.26.3

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.
@@ -94,7 +94,7 @@ const applicantSchema = new mongoose.Schema({
94
94
  isTwoYearPrior: { type: String, default: false },
95
95
  understandEnglish: { type: String, default: true },
96
96
  vulnerabilityNotes: { type: String, default: null },
97
- vulnerabilityTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
97
+ vulnerabilityTypeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }],
98
98
  creditData: applicantCreditDataSchema,
99
99
  riskNarrative: applicantRiskNarrativeSchema,
100
100
  otherIncome: applicantOtherIncomeSchema,
@@ -156,7 +156,7 @@ applicantSchema.virtual('taxPayer').get(function () {
156
156
  });
157
157
 
158
158
  applicantSchema.virtual('vulnerabilityType').get(function () {
159
- return this.vulnerabilityTypeLid?.name ?? null;
159
+ return this.vulnerabilityTypeLids?.map(v => v.name) ?? null;
160
160
  });
161
161
 
162
162
  const ApplicantModel = mongoose.model("Applicant", applicantSchema);
@@ -2,9 +2,9 @@ import mongoose from "mongoose";
2
2
 
3
3
 
4
4
  const mortgageSchema = new mongoose.Schema({
5
- depositComeFrom: { type: String, required: true },
5
+ depositComeFrom: { type: String},
6
6
  estimatedValue: { type: String, default: "" },
7
- exitStrategy: { type: String, required: true },
7
+ exitStrategy: { type: String},
8
8
  fundRaisedFor: { type: String, default: "" },
9
9
  giftDetails: { type: String, default: "" },
10
10
  ifOtherDetails: { type: String, default: "" },
@@ -15,17 +15,17 @@ const mortgageSchema = new mongoose.Schema({
15
15
  isReadyToSell: { type: String, default: true },
16
16
  isTheIntentionToLet: { type: String, default: true },
17
17
  leaseTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
18
- loanRequired: { type: String, required: true },
19
- monthlyRentalIncome: { type: String, required: true },
18
+ loanRequired: { type: String},
19
+ monthlyRentalIncome: { type: String},
20
20
  propertyValuationDetails: { type: String, default: "" },
21
21
  proposedTenants: { type: String },
22
- purchasePrice: { type: String, required: true },
22
+ purchasePrice: { type: String},
23
23
  repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
24
24
  repaymentVehicle: { type: String, default: "" },
25
25
  saleMade: { type: String, default: "" },
26
26
  sourceOfFundDetails: { type: String, default: "" },
27
27
  sourceOfFundsLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
28
- telephoneNumber: { type: String, required: true },
28
+ telephoneNumber: { type: String},
29
29
  vendorsName: { type: String, default: "" }
30
30
  });
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.26.0",
3
+ "version": "0.26.3",
4
4
  "description": "All the schemas for gatehouse bank back-end.",
5
5
  "main": "lookup.service.js",
6
6
  "scripts": {