@dynamatix/gb-schemas 2.3.326 → 2.3.327
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.
|
@@ -29,7 +29,7 @@ const companySchema = new mongoose.Schema({
|
|
|
29
29
|
addressLine3: { type: String, default: '', maxlength: 35 }, // form
|
|
30
30
|
addressCity: { type: String, default: '', maxlength: 30 }, // form
|
|
31
31
|
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true }, // form
|
|
32
|
-
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
32
|
+
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // form
|
|
33
33
|
applicantShareholding: [ApplicantShareholdingSchema], // form
|
|
34
34
|
yearEnd1: { type: Number, required: true, max: 9999 }, // form
|
|
35
35
|
turnoverYear1: { type: Pound, required: true, default: 0.00, get: formatPound }, // form
|
|
@@ -9,14 +9,14 @@ const productSchema = new mongoose.Schema({
|
|
|
9
9
|
selectedProduct: { type: String, default: "" },
|
|
10
10
|
lendingTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
11
11
|
pageValidFlag: { type: Boolean, get: (value) => (value ? "Yes" : "No") },
|
|
12
|
-
repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
12
|
+
repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
13
13
|
numberOfYearsToRepay: { type: Number, default: 0 },
|
|
14
14
|
repaymentVehicle: { type: String, required: true, default: '', maxLength: 100 },
|
|
15
15
|
fixedAmount: { type: Pound, default: 0.00, required: false, get: formatPound },
|
|
16
|
-
isFinanceRecommendedToApplicantLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
17
|
-
procFeeRateLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
16
|
+
isFinanceRecommendedToApplicantLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
17
|
+
procFeeRateLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
18
18
|
networkClubSubmission: { type: Boolean, required: true },
|
|
19
|
-
clubNetworkNameLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
19
|
+
clubNetworkNameLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
20
20
|
introducerSubmission: { type: Boolean, required: true },
|
|
21
21
|
introducer: { type: String, default: '' },
|
|
22
22
|
bdm: { type: String, required: true, default: '' },
|
|
@@ -42,6 +42,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
42
42
|
statusLid: mongoose.Types.ObjectId;
|
|
43
43
|
applicationNumber: string;
|
|
44
44
|
queueId: mongoose.Types.ObjectId[];
|
|
45
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
45
46
|
assignedToUserDate: NativeDate;
|
|
46
47
|
isApplicationFeePaid: string;
|
|
47
48
|
bankSolicitor: string;
|
|
@@ -64,16 +65,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
64
65
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
65
66
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
66
67
|
isPortfolioConfirmed: boolean;
|
|
68
|
+
productId: mongoose.Types.ObjectId;
|
|
67
69
|
securityId: mongoose.Types.ObjectId;
|
|
68
70
|
solicitorId: mongoose.Types.ObjectId;
|
|
71
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
72
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
73
|
+
companyId: mongoose.Types.ObjectId;
|
|
69
74
|
newAuditRecordsCount: number;
|
|
70
75
|
propertyIds: mongoose.Types.ObjectId[];
|
|
71
76
|
isMandateRequested: boolean;
|
|
72
77
|
isMandateApproved: boolean;
|
|
73
78
|
mandateReviewComments: string;
|
|
79
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
74
80
|
mandateRequestedDate: string;
|
|
81
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
75
82
|
mandateReviewedDate: string;
|
|
76
83
|
isReferred: boolean;
|
|
84
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
77
85
|
referredDate: string;
|
|
78
86
|
brokerTaskCount: number;
|
|
79
87
|
lenderTaskCount: number;
|
|
@@ -95,18 +103,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
95
103
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
96
104
|
} | null | undefined;
|
|
97
105
|
currentApprivoAuditId?: number | null | undefined;
|
|
98
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
99
106
|
lastUpdated?: string | null | undefined;
|
|
100
107
|
submittedDate?: string | null | undefined;
|
|
101
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
102
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
103
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
104
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
105
108
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
106
109
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
107
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
108
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
109
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
110
110
|
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
111
111
|
createdAt: NativeDate;
|
|
112
112
|
updatedAt: NativeDate;
|
|
@@ -122,6 +122,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
122
122
|
statusLid: mongoose.Types.ObjectId;
|
|
123
123
|
applicationNumber: string;
|
|
124
124
|
queueId: mongoose.Types.ObjectId[];
|
|
125
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
125
126
|
assignedToUserDate: NativeDate;
|
|
126
127
|
isApplicationFeePaid: string;
|
|
127
128
|
bankSolicitor: string;
|
|
@@ -144,16 +145,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
144
145
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
145
146
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
146
147
|
isPortfolioConfirmed: boolean;
|
|
148
|
+
productId: mongoose.Types.ObjectId;
|
|
147
149
|
securityId: mongoose.Types.ObjectId;
|
|
148
150
|
solicitorId: mongoose.Types.ObjectId;
|
|
151
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
152
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
153
|
+
companyId: mongoose.Types.ObjectId;
|
|
149
154
|
newAuditRecordsCount: number;
|
|
150
155
|
propertyIds: mongoose.Types.ObjectId[];
|
|
151
156
|
isMandateRequested: boolean;
|
|
152
157
|
isMandateApproved: boolean;
|
|
153
158
|
mandateReviewComments: string;
|
|
159
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
154
160
|
mandateRequestedDate: string;
|
|
161
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
155
162
|
mandateReviewedDate: string;
|
|
156
163
|
isReferred: boolean;
|
|
164
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
157
165
|
referredDate: string;
|
|
158
166
|
brokerTaskCount: number;
|
|
159
167
|
lenderTaskCount: number;
|
|
@@ -175,18 +183,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
175
183
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
176
184
|
} | null | undefined;
|
|
177
185
|
currentApprivoAuditId?: number | null | undefined;
|
|
178
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
179
186
|
lastUpdated?: string | null | undefined;
|
|
180
187
|
submittedDate?: string | null | undefined;
|
|
181
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
182
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
183
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
184
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
185
188
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
186
189
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
187
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
188
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
189
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
190
190
|
}, {}> & {
|
|
191
191
|
createdAt: NativeDate;
|
|
192
192
|
updatedAt: NativeDate;
|
|
@@ -202,6 +202,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
202
202
|
statusLid: mongoose.Types.ObjectId;
|
|
203
203
|
applicationNumber: string;
|
|
204
204
|
queueId: mongoose.Types.ObjectId[];
|
|
205
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
205
206
|
assignedToUserDate: NativeDate;
|
|
206
207
|
isApplicationFeePaid: string;
|
|
207
208
|
bankSolicitor: string;
|
|
@@ -224,16 +225,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
224
225
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
225
226
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
226
227
|
isPortfolioConfirmed: boolean;
|
|
228
|
+
productId: mongoose.Types.ObjectId;
|
|
227
229
|
securityId: mongoose.Types.ObjectId;
|
|
228
230
|
solicitorId: mongoose.Types.ObjectId;
|
|
231
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
232
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
233
|
+
companyId: mongoose.Types.ObjectId;
|
|
229
234
|
newAuditRecordsCount: number;
|
|
230
235
|
propertyIds: mongoose.Types.ObjectId[];
|
|
231
236
|
isMandateRequested: boolean;
|
|
232
237
|
isMandateApproved: boolean;
|
|
233
238
|
mandateReviewComments: string;
|
|
239
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
234
240
|
mandateRequestedDate: string;
|
|
241
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
235
242
|
mandateReviewedDate: string;
|
|
236
243
|
isReferred: boolean;
|
|
244
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
237
245
|
referredDate: string;
|
|
238
246
|
brokerTaskCount: number;
|
|
239
247
|
lenderTaskCount: number;
|
|
@@ -255,18 +263,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
255
263
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
256
264
|
} | null | undefined;
|
|
257
265
|
currentApprivoAuditId?: number | null | undefined;
|
|
258
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
259
266
|
lastUpdated?: string | null | undefined;
|
|
260
267
|
submittedDate?: string | null | undefined;
|
|
261
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
262
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
263
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
264
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
265
268
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
266
269
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
267
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
268
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
269
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
270
270
|
} & {
|
|
271
271
|
_id: mongoose.Types.ObjectId;
|
|
272
272
|
} & {
|
|
@@ -294,6 +294,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
294
294
|
statusLid: mongoose.Types.ObjectId;
|
|
295
295
|
applicationNumber: string;
|
|
296
296
|
queueId: mongoose.Types.ObjectId[];
|
|
297
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
297
298
|
assignedToUserDate: NativeDate;
|
|
298
299
|
isApplicationFeePaid: string;
|
|
299
300
|
bankSolicitor: string;
|
|
@@ -316,16 +317,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
316
317
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
317
318
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
318
319
|
isPortfolioConfirmed: boolean;
|
|
320
|
+
productId: mongoose.Types.ObjectId;
|
|
319
321
|
securityId: mongoose.Types.ObjectId;
|
|
320
322
|
solicitorId: mongoose.Types.ObjectId;
|
|
323
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
324
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
325
|
+
companyId: mongoose.Types.ObjectId;
|
|
321
326
|
newAuditRecordsCount: number;
|
|
322
327
|
propertyIds: mongoose.Types.ObjectId[];
|
|
323
328
|
isMandateRequested: boolean;
|
|
324
329
|
isMandateApproved: boolean;
|
|
325
330
|
mandateReviewComments: string;
|
|
331
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
326
332
|
mandateRequestedDate: string;
|
|
333
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
327
334
|
mandateReviewedDate: string;
|
|
328
335
|
isReferred: boolean;
|
|
336
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
329
337
|
referredDate: string;
|
|
330
338
|
brokerTaskCount: number;
|
|
331
339
|
lenderTaskCount: number;
|
|
@@ -347,18 +355,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
347
355
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
348
356
|
} | null | undefined;
|
|
349
357
|
currentApprivoAuditId?: number | null | undefined;
|
|
350
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
351
358
|
lastUpdated?: string | null | undefined;
|
|
352
359
|
submittedDate?: string | null | undefined;
|
|
353
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
354
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
355
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
356
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
357
360
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
358
361
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
359
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
360
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
361
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
362
362
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
363
363
|
createdAt: NativeDate;
|
|
364
364
|
updatedAt: NativeDate;
|
|
@@ -374,6 +374,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
374
374
|
statusLid: mongoose.Types.ObjectId;
|
|
375
375
|
applicationNumber: string;
|
|
376
376
|
queueId: mongoose.Types.ObjectId[];
|
|
377
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
377
378
|
assignedToUserDate: NativeDate;
|
|
378
379
|
isApplicationFeePaid: string;
|
|
379
380
|
bankSolicitor: string;
|
|
@@ -396,16 +397,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
396
397
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
397
398
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
398
399
|
isPortfolioConfirmed: boolean;
|
|
400
|
+
productId: mongoose.Types.ObjectId;
|
|
399
401
|
securityId: mongoose.Types.ObjectId;
|
|
400
402
|
solicitorId: mongoose.Types.ObjectId;
|
|
403
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
404
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
405
|
+
companyId: mongoose.Types.ObjectId;
|
|
401
406
|
newAuditRecordsCount: number;
|
|
402
407
|
propertyIds: mongoose.Types.ObjectId[];
|
|
403
408
|
isMandateRequested: boolean;
|
|
404
409
|
isMandateApproved: boolean;
|
|
405
410
|
mandateReviewComments: string;
|
|
411
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
406
412
|
mandateRequestedDate: string;
|
|
413
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
407
414
|
mandateReviewedDate: string;
|
|
408
415
|
isReferred: boolean;
|
|
416
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
409
417
|
referredDate: string;
|
|
410
418
|
brokerTaskCount: number;
|
|
411
419
|
lenderTaskCount: number;
|
|
@@ -427,18 +435,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
427
435
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
428
436
|
} | null | undefined;
|
|
429
437
|
currentApprivoAuditId?: number | null | undefined;
|
|
430
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
431
438
|
lastUpdated?: string | null | undefined;
|
|
432
439
|
submittedDate?: string | null | undefined;
|
|
433
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
434
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
435
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
436
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
437
440
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
438
441
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
439
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
440
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
441
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
442
442
|
}>, {}> & mongoose.FlatRecord<{
|
|
443
443
|
createdAt: NativeDate;
|
|
444
444
|
updatedAt: NativeDate;
|
|
@@ -454,6 +454,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
454
454
|
statusLid: mongoose.Types.ObjectId;
|
|
455
455
|
applicationNumber: string;
|
|
456
456
|
queueId: mongoose.Types.ObjectId[];
|
|
457
|
+
assignedToUserId: mongoose.Types.ObjectId;
|
|
457
458
|
assignedToUserDate: NativeDate;
|
|
458
459
|
isApplicationFeePaid: string;
|
|
459
460
|
bankSolicitor: string;
|
|
@@ -476,16 +477,23 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
476
477
|
withdrawalReasonLid: mongoose.Types.ObjectId;
|
|
477
478
|
declineReasonLid: mongoose.Types.ObjectId;
|
|
478
479
|
isPortfolioConfirmed: boolean;
|
|
480
|
+
productId: mongoose.Types.ObjectId;
|
|
479
481
|
securityId: mongoose.Types.ObjectId;
|
|
480
482
|
solicitorId: mongoose.Types.ObjectId;
|
|
483
|
+
directDebitId: mongoose.Types.ObjectId;
|
|
484
|
+
mortgageId: mongoose.Types.ObjectId;
|
|
485
|
+
companyId: mongoose.Types.ObjectId;
|
|
481
486
|
newAuditRecordsCount: number;
|
|
482
487
|
propertyIds: mongoose.Types.ObjectId[];
|
|
483
488
|
isMandateRequested: boolean;
|
|
484
489
|
isMandateApproved: boolean;
|
|
485
490
|
mandateReviewComments: string;
|
|
491
|
+
mandateRequestedByUserId: mongoose.Types.ObjectId;
|
|
486
492
|
mandateRequestedDate: string;
|
|
493
|
+
mandateReviewedByUserId: mongoose.Types.ObjectId;
|
|
487
494
|
mandateReviewedDate: string;
|
|
488
495
|
isReferred: boolean;
|
|
496
|
+
referredByUserId: mongoose.Types.ObjectId;
|
|
489
497
|
referredDate: string;
|
|
490
498
|
brokerTaskCount: number;
|
|
491
499
|
lenderTaskCount: number;
|
|
@@ -507,18 +515,10 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
507
515
|
companyAnyVoluntaryEnforcedPossessionNo: string;
|
|
508
516
|
} | null | undefined;
|
|
509
517
|
currentApprivoAuditId?: number | null | undefined;
|
|
510
|
-
assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
511
518
|
lastUpdated?: string | null | undefined;
|
|
512
519
|
submittedDate?: string | null | undefined;
|
|
513
|
-
productId?: mongoose.Types.ObjectId | null | undefined;
|
|
514
|
-
directDebitId?: mongoose.Types.ObjectId | null | undefined;
|
|
515
|
-
mortgageId?: mongoose.Types.ObjectId | null | undefined;
|
|
516
|
-
companyId?: mongoose.Types.ObjectId | null | undefined;
|
|
517
520
|
valuationId?: mongoose.Types.ObjectId | null | undefined;
|
|
518
521
|
valuationReportId?: mongoose.Types.ObjectId | null | undefined;
|
|
519
|
-
mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
520
|
-
mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
521
|
-
referredByUserId?: mongoose.Types.ObjectId | null | undefined;
|
|
522
522
|
}> & {
|
|
523
523
|
_id: mongoose.Types.ObjectId;
|
|
524
524
|
} & {
|
|
@@ -6,16 +6,16 @@ const applicationSchema = new mongoose.Schema({
|
|
|
6
6
|
queueId: [{
|
|
7
7
|
type: mongoose.Schema.Types.ObjectId,
|
|
8
8
|
ref: "Queue",
|
|
9
|
-
|
|
9
|
+
default: null,
|
|
10
10
|
}],
|
|
11
|
-
assignedToUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
|
|
11
|
+
assignedToUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
12
12
|
assignedToUserDate: { type: Date, default: null },
|
|
13
13
|
applicationId: { type: String, required: true },
|
|
14
14
|
isApplicationFeePaid: { type: String, required: true },
|
|
15
15
|
applicationNumber: { type: String, required: true },
|
|
16
|
-
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
16
|
+
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
17
17
|
bankSolicitor: { type: String, default: "" },
|
|
18
|
-
brokerId: { type: mongoose.Schema.Types.ObjectId, ref: "Broker",
|
|
18
|
+
brokerId: { type: mongoose.Schema.Types.ObjectId, ref: "Broker", default: null },
|
|
19
19
|
caseManager: { type: String, default: "" },
|
|
20
20
|
caseManagerAccepted: { type: String, default: false },
|
|
21
21
|
completedReason: { type: String, default: "" },
|
|
@@ -26,15 +26,15 @@ const applicationSchema = new mongoose.Schema({
|
|
|
26
26
|
isFinanceRecommendedToApplicant: { type: String, required: true },
|
|
27
27
|
isWorkflowTaskCreated: { type: String, required: true },
|
|
28
28
|
lastUpdated: { type: String },
|
|
29
|
-
lendingTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
29
|
+
lendingTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
30
30
|
networkClubName: { type: String, default: "" },
|
|
31
31
|
isNetworkClubSubmission: { type: String, required: true },
|
|
32
32
|
newReason: { type: String, default: "" },
|
|
33
|
-
purchaseTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
33
|
+
purchaseTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
34
34
|
rejectedReason: { type: String, default: "" },
|
|
35
|
-
repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
35
|
+
repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
36
36
|
selectedProduct: { type: String, required: false },
|
|
37
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup",
|
|
37
|
+
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
38
38
|
submitReason: { type: String, default: "" },
|
|
39
39
|
submittedDate: { type: String },
|
|
40
40
|
underwriter: { type: String, default: "" },
|
|
@@ -42,19 +42,19 @@ const applicationSchema = new mongoose.Schema({
|
|
|
42
42
|
withdrawalReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
43
43
|
declineReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
44
44
|
isPortfolioConfirmed: { type: Boolean, default: false },
|
|
45
|
-
productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product",
|
|
45
|
+
productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product", default: null },
|
|
46
46
|
product: { type: String },
|
|
47
|
-
securityId: { type: mongoose.Schema.Types.ObjectId, ref: "Security",
|
|
48
|
-
solicitorId: { type: mongoose.Schema.Types.ObjectId, ref: "Solicitor",
|
|
47
|
+
securityId: { type: mongoose.Schema.Types.ObjectId, ref: "Security", default: null },
|
|
48
|
+
solicitorId: { type: mongoose.Schema.Types.ObjectId, ref: "Solicitor", default: null },
|
|
49
49
|
applicants: [
|
|
50
|
-
{ type: mongoose.Schema.Types.ObjectId, ref: "Applicant" }
|
|
50
|
+
{ type: mongoose.Schema.Types.ObjectId, ref: "Applicant", default: null }
|
|
51
51
|
],
|
|
52
52
|
isActive: { type: String, default: false },
|
|
53
53
|
riskRating: { type: String },
|
|
54
|
-
directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "Application_DirectDebit" },
|
|
54
|
+
directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "Application_DirectDebit", default: null },
|
|
55
55
|
creditProfile: creditProfileSchema,
|
|
56
|
-
mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage" },
|
|
57
|
-
companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany" },
|
|
56
|
+
mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage", default: null },
|
|
57
|
+
companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany", default: null },
|
|
58
58
|
newAuditRecordsCount: { type: Number, default: 0 }, // Ensure it is a Number
|
|
59
59
|
currentApprivoAuditId: Number,
|
|
60
60
|
propertyIds: [{ type: mongoose.Schema.Types.ObjectId, ref: "Property" }],
|
|
@@ -63,12 +63,12 @@ const applicationSchema = new mongoose.Schema({
|
|
|
63
63
|
isMandateRequested: { type: Boolean, default: false },
|
|
64
64
|
isMandateApproved: { type: Boolean, default: null },
|
|
65
65
|
mandateReviewComments: { type: String, default: "" },
|
|
66
|
-
mandateRequestedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
|
|
66
|
+
mandateRequestedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
67
67
|
mandateRequestedDate: { type: String, default: null },
|
|
68
|
-
mandateReviewedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
|
|
68
|
+
mandateReviewedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
69
69
|
mandateReviewedDate: { type: String, default: null },
|
|
70
70
|
isReferred: { type: Boolean, default: false },
|
|
71
|
-
referredByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
|
|
71
|
+
referredByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
72
72
|
referredDate: { type: String, default: null },
|
|
73
73
|
brokerTaskCount: {
|
|
74
74
|
type: Number,
|