@dynamatix/gb-schemas 0.2.1 → 0.3.1
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.
|
@@ -3,7 +3,7 @@ import mongoose from "mongoose";
|
|
|
3
3
|
const applicantEmploymentSchema = new mongoose.Schema({
|
|
4
4
|
acceptableIncome: { type: String },
|
|
5
5
|
addressCity: { type: String },
|
|
6
|
-
|
|
6
|
+
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
7
7
|
addressLine1: { type: String },
|
|
8
8
|
addressLine2: { type: String },
|
|
9
9
|
addressLine3: { type: String },
|
|
@@ -16,14 +16,14 @@ const applicantEmploymentSchema = new mongoose.Schema({
|
|
|
16
16
|
childBenefit: { type: String },
|
|
17
17
|
childBenefitOrSchoolAllowance: { type: String },
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
classLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
20
20
|
contractRemaining: { type: String },
|
|
21
21
|
dateJoined: { type: Date },
|
|
22
22
|
disabilityLiving: { type: String },
|
|
23
23
|
employerName: { type: String },
|
|
24
24
|
employerTelephone: { type: String },
|
|
25
25
|
housingAllowance: { type: String },
|
|
26
|
-
|
|
26
|
+
industryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
27
27
|
isUnderTerminationNotice: { type: Boolean, default: null },
|
|
28
28
|
jobTitle: { type: String },
|
|
29
29
|
maintenance: { type: String },
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import mortgageSchema from "./application-mortgage.model.js";
|
|
3
|
+
import brokerSchema from './broker.model.js';
|
|
4
|
+
import directDebitSchema from './application-direct-debit.model.js';
|
|
5
|
+
import solicitorSchema from './solicitor.model.js';
|
|
6
|
+
|
|
3
7
|
|
|
4
8
|
const applicationSchema = new mongoose.Schema(
|
|
5
9
|
{
|
|
6
|
-
|
|
10
|
+
queueId: [{
|
|
7
11
|
type: mongoose.Schema.Types.ObjectId,
|
|
8
12
|
ref: "Queue",
|
|
9
13
|
required: true,
|
|
@@ -59,7 +63,11 @@ const applicationSchema = new mongoose.Schema(
|
|
|
59
63
|
isValuationFeePaid: { type: Boolean, required: true },
|
|
60
64
|
isActive: { type: Boolean, default: false },
|
|
61
65
|
isUkResident: { type: Boolean, default: true },
|
|
62
|
-
riskRating: { type: String }
|
|
66
|
+
riskRating: { type: String },
|
|
67
|
+
mortgage: mortgageSchema,
|
|
68
|
+
broker: brokerSchema,
|
|
69
|
+
directDebit: directDebitSchema,
|
|
70
|
+
solicitor: solicitorSchema
|
|
63
71
|
},
|
|
64
72
|
{ timestamps: true }
|
|
65
73
|
);
|
|
@@ -10,7 +10,7 @@ const solicitorSchema = new Schema({
|
|
|
10
10
|
useExistingSolicitor: { type: Boolean, default: true },
|
|
11
11
|
accountNumber: { type: String},
|
|
12
12
|
addressCity: { type: String},
|
|
13
|
-
|
|
13
|
+
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
14
14
|
addressLine1: { type: String, },
|
|
15
15
|
addressLine2: { type: String },
|
|
16
16
|
addressLine3: { type: String },
|
package/package.json
CHANGED
|
@@ -81,8 +81,8 @@ const propertySchema = new mongoose.Schema({
|
|
|
81
81
|
propertyAddressLine2: { type: String, default: '' },
|
|
82
82
|
propertyAddressLine3: { type: String, default: '' },
|
|
83
83
|
propertyAddressPostCode: { type: String, required: true },
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
propertyTenureLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
85
|
+
propertyTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
86
86
|
propertyYearBuilt: { type: Number },
|
|
87
87
|
receiptOfAnyDiscount: { type: Boolean, },
|
|
88
88
|
receiptOfDiscountDetails: { type: String, default: '' },
|
package/shared/lookup.model.js
CHANGED