@dynamatix/gb-schemas 0.5.13 → 0.5.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.
@@ -107,15 +107,15 @@ const applicantSchema = new mongoose.Schema({
107
107
  });
108
108
 
109
109
  applicantSchema.virtual('nationality').get(function () {
110
- return this.nationalityLID ? this.nationalityLID.name : null;
110
+ return this.nationalityLid ? this.nationalityLid.name : null;
111
111
  });
112
112
 
113
113
  applicantSchema.virtual('residence').get(function () {
114
- return this.countryOfResidenceLID ? this.countryOfResidenceLID.name : null;
114
+ return this.countryOfResidenceLid ? this.countryOfResidenceLid.name : null;
115
115
  });
116
116
 
117
117
  applicantSchema.virtual('industry').get(function () {
118
- return this.employment?.industryLID ? this.employment?.industryLID.name : null;
118
+ return this.employment?.industryLid ? this.employment?.industryLid.name : null;
119
119
  });
120
120
  applicantSchema.set('toJSON', { virtuals: true });
121
121
  const ApplicantModel = mongoose.model("Applicant", applicantSchema);
@@ -83,7 +83,7 @@ applicationSchema.virtual('noOfApplicants').get(function() {
83
83
 
84
84
  // Virtual property 'applicationTypeName'
85
85
  applicationSchema.virtual('applicationTypeName').get(function() {
86
- return this.applicationTypeLID ? this.applicationTypeLID.name : null;
86
+ return this.applicationTypeLid ? this.applicationTypeLid.name : null;
87
87
  });
88
88
 
89
89
  // Virtual property 'LTV %'
@@ -117,22 +117,22 @@ applicationSchema.virtual('noOfApplicants').get(function() {
117
117
 
118
118
  // Virtual property for broker name
119
119
  applicationSchema.virtual('brokerFirstName').get(function() {
120
- return this.brokerID ? this.brokerID?.firstName : null;
120
+ return this.brokerId ? this.brokerId?.firstName : null;
121
121
  });
122
122
 
123
123
  // Virtual property for broker email
124
124
  applicationSchema.virtual('brokerEmail').get(function() {
125
- return this.brokerID ? this.brokerID?.email : null;
125
+ return this.brokerId ? this.brokerId?.email : null;
126
126
  });
127
127
 
128
128
  // Virtual property for solicitor name
129
129
  applicationSchema.virtual('solicitorName').get(function() {
130
- return this.solicitorID ? this.solicitorID?.nameOfAccountHolder : null;
130
+ return this.solicitorId ? this.solicitorId?.nameOfAccountHolder : null;
131
131
  });
132
132
 
133
133
  // Virtual property for solicitor email
134
134
  applicationSchema.virtual('solicitorEmail').get(function() {
135
- return this.solicitorID ? this.solicitorID?.email : null;
135
+ return this.solicitorId ? this.solicitorId?.email : null;
136
136
  });
137
137
 
138
138
  const ApplicationModel = mongoose.model("Application", applicationSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -101,12 +101,12 @@ const propertySchema = new mongoose.Schema({
101
101
 
102
102
  // virtual property 'tenure'
103
103
  propertySchema.virtual('tenure').get(function () {
104
- return this.propertyTenureLID ? this.propertyTenureLID.name : null;
104
+ return this.propertyTenureLid ? this.propertyTenureLid.name : null;
105
105
  });
106
106
 
107
107
  // virtual property 'type'
108
108
  propertySchema.virtual('type').get(function () {
109
- return this.propertyTypeLID ? this.propertyTypeLID.name : null;
109
+ return this.propertyTypeLid ? this.propertyTypeLid.name : null;
110
110
  });
111
111
 
112
112
  const PropertyModel = mongoose.model("Property", propertySchema);
@@ -1,6 +1,7 @@
1
1
  import mongoose from "mongoose";
2
2
 
3
3
  const jobSettingSchema = new mongoose.Schema({
4
+ name: { type: String, required: true },
4
5
  enabled: { type: Boolean, default: true },
5
6
  schedule: {
6
7
  FrequencyInHours: { type: Number, default: 2 }