@dynamatix/gb-schemas 0.25.0 → 0.25.2

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.
@@ -89,6 +89,16 @@ applicationSchema.virtual('applicationTypeName').get(function () {
89
89
  return this.applicationTypeLid ? this.applicationTypeLid.name : null;
90
90
  });
91
91
 
92
+ // Virtual property 'lendingType'
93
+ applicationSchema.virtual('lendingType').get(function () {
94
+ return this.lendingTypeLid ? this.lendingTypeLid.name : null;
95
+ });
96
+
97
+ // Virtual property 'status'
98
+ applicationSchema.virtual('status').get(function () {
99
+ return this.statusLid ? this.statusLid.name : null;
100
+ });
101
+
92
102
  // Virtual property 'LTV %'
93
103
  applicationSchema.virtual('ltv').get(function () {
94
104
  const purchasePrice = this.mortgage?.purchasePrice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "description": "All the schemas for gatehouse bank back-end.",
5
5
  "main": "lookup.service.js",
6
6
  "scripts": {
@@ -1,9 +1,8 @@
1
1
  import mongoose from "mongoose";
2
2
 
3
3
  const AuthLogSchema = new mongoose.Schema({
4
- userId: {
5
- type: mongoose.Schema.Types.ObjectId,
6
- ref: "User",
4
+ userEmail: {
5
+ type: String,
7
6
  required: true
8
7
  },
9
8
  loggedInTimestamp: {
@@ -18,4 +17,4 @@ const AuthLogSchema = new mongoose.Schema({
18
17
 
19
18
  const AuthLogModel = mongoose.model("AuthLog", AuthLogSchema);
20
19
 
21
- export default AuthLogModel;
20
+ export default AuthLogModel;