@dynamatix/gb-schemas 0.3.2 → 0.3.4

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.
@@ -10,5 +10,4 @@ const creditProfileSchema = new mongoose.Schema({
10
10
  companyDefaultsInLastYearNo: { type: Boolean, default: false },
11
11
  companyDefaultsInLastYearYes: { type: String, default: "" }
12
12
  });
13
- const ApplicationCreditProfileModel = mongoose.model("ApplicationCreditProfile", creditProfileSchema);
14
- export default ApplicationCreditProfileModel;
13
+ export default creditProfileSchema;
@@ -13,7 +13,7 @@ const directDebitSchema = new mongoose.Schema({
13
13
  nameOfAccountHolder: { type: String, default: "" },
14
14
  selectedPaymentDay: { type: Number, default: null },
15
15
  sortCode: { type: String, default: "" },
16
+
16
17
  });
17
18
 
18
- const ApplicationDirectDebitModel = mongoose.model("ApplicationDirectDebit", directDebitSchema);
19
- export default ApplicationDirectDebitModel;
19
+ export default directDebitSchema;
@@ -28,5 +28,4 @@ const mortgageSchema = new mongoose.Schema({
28
28
  vendorsName: { type: String, default: "" }
29
29
  });
30
30
 
31
- const ApplicationMortgageModel = mongoose.model("ApplicationMortgage", mortgageSchema);
32
- export default ApplicationMortgageModel;
31
+ export default mortgageSchema;
@@ -6,6 +6,5 @@ const productSchema = new mongoose.Schema({
6
6
  selectedProduct: { type: String, default: "" }
7
7
  });
8
8
 
9
- const ProductModel = mongoose.model("Product", productSchema);
10
9
 
11
- export default ProductModel;
10
+ export default productSchema;
@@ -13,5 +13,4 @@ const valuationSchema = new mongoose.Schema({
13
13
  valuerNotes: { type: String, default: "" },
14
14
  version: { type: String, default: "" }
15
15
  });
16
- const ApplicationValuationModel = mongoose.model("ApplicationValuation", valuationSchema);
17
- export default ApplicationValuationModel;
16
+ export default valuationSchema;
@@ -1,4 +1,7 @@
1
1
  import mongoose from "mongoose";
2
+ import directDebitSchema from "./application-direct-debit.model.js";
3
+ import creditProfileSchema from "./application-credit-profile.model.js";
4
+ import mortgageSchema from "./application-mortgage.model.js";
2
5
 
3
6
  const applicationSchema = new mongoose.Schema(
4
7
  {
@@ -59,6 +62,9 @@ const applicationSchema = new mongoose.Schema(
59
62
  isActive: { type: Boolean, default: false },
60
63
  isUkResident: { type: Boolean, default: true },
61
64
  riskRating: { type: String },
65
+ directDebit: directDebitSchema,
66
+ creditProfile: creditProfileSchema,
67
+ mortgage: mortgageSchema
62
68
  },
63
69
  { timestamps: true }
64
70
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "All the schemas for gatehouse bank back-end.",
5
5
  "main": "index.js",
6
6
  "scripts": {