@dynamatix/gb-schemas 0.12.3 → 0.12.5

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.
@@ -122,6 +122,10 @@ applicantSchema.virtual('industry').get(function () {
122
122
  return this.employment?.industryLid ? this.employment?.industryLid?.name : null;
123
123
  });
124
124
 
125
+ applicantSchema.virtual('employmentClass').get(function () {
126
+ return this.employment?.classLid ? this.employment?.classLid?.name : null;
127
+ });
128
+
125
129
  applicantSchema.virtual('addressCountry').get(function () {
126
130
  return this.addressCountryLid?.name ?? null;
127
131
  });
@@ -34,7 +34,7 @@ const applicationSchema = new mongoose.Schema(
34
34
  purchaseTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
35
35
  rejectedReason: { type: String, default: "" },
36
36
  repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
37
- selectedProduct: { type: String, required: true },
37
+ selectedProduct: { type: String, required: false },
38
38
  sourceOfWealthLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
39
39
  sowBusiness: { type: String, default: "" },
40
40
  sowInheritance: { type: String, default: "" },
@@ -48,7 +48,7 @@ const applicationSchema = new mongoose.Schema(
48
48
  isValuationFeePaid: { type: Boolean, required: true },
49
49
  withdrawalReason: { type: String, default: "" },
50
50
  withdrawalReasonCode: { type: String, default: "" },
51
- productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product", required: true },
51
+ productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product", required: false },
52
52
  product: { type: String },
53
53
  propertyId: { type: mongoose.Schema.Types.ObjectId, ref: "Property", required: true },
54
54
  solicitorId: { type: mongoose.Schema.Types.ObjectId, ref: "Solicitor", required: true },
@@ -64,7 +64,7 @@ const applicationSchema = new mongoose.Schema(
64
64
  directDebit: directDebitSchema,
65
65
  creditProfile: creditProfileSchema,
66
66
  mortgage: mortgageSchema,
67
- companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany", required: true },
67
+ companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany" },
68
68
  rationaleId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationRationale" },
69
69
  newAuditRecordsCount: { type: Number, default: 0 } // Ensure it is a Number
70
70
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "index.js",
6
6
  "scripts": {