@dynamatix/gb-schemas 1.3.352 → 1.3.354
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.
|
@@ -101,7 +101,7 @@ applicationSchema.virtual('noOfApplicants').get(function () {
|
|
|
101
101
|
applicationSchema.virtual('applicationTypeName').get(function () {
|
|
102
102
|
return this.applicationTypeLid instanceof mongoose.Types.ObjectId
|
|
103
103
|
? null
|
|
104
|
-
: this.applicationTypeLid?.
|
|
104
|
+
: this.applicationTypeLid?.text ?? null;
|
|
105
105
|
});
|
|
106
106
|
// Virtual property 'lendingType'
|
|
107
107
|
applicationSchema.virtual('lendingType').get(function () {
|
|
@@ -121,10 +121,11 @@ applicationSchema.virtual('status').get(function () {
|
|
|
121
121
|
});
|
|
122
122
|
// Ensure the fields are populated when querying
|
|
123
123
|
applicationSchema.pre('find', function () {
|
|
124
|
-
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid');
|
|
124
|
+
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid').populate('applicants');
|
|
125
125
|
});
|
|
126
126
|
applicationSchema.pre('findOne', function () {
|
|
127
|
-
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid');
|
|
127
|
+
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid').populate('applicants');
|
|
128
|
+
;
|
|
128
129
|
});
|
|
129
130
|
// Virtual property 'LTV %'
|
|
130
131
|
applicationSchema.virtual('ltv').get(function () {
|
|
@@ -36,7 +36,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
36
36
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
37
37
|
createdOn?: string | null | undefined;
|
|
38
38
|
additionalData?: {
|
|
39
|
-
concernComments: string;
|
|
40
39
|
resolvedComments: string;
|
|
41
40
|
rejectionReason: string;
|
|
42
41
|
rejectionDate: string;
|
|
@@ -50,6 +49,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
50
49
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
51
50
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
52
51
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
52
|
+
concernComments?: string | null | undefined;
|
|
53
53
|
acceptedDate?: string | null | undefined;
|
|
54
54
|
} | null | undefined;
|
|
55
55
|
status?: number | null | undefined;
|
|
@@ -64,7 +64,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
64
64
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
65
65
|
createdOn?: string | null | undefined;
|
|
66
66
|
additionalData?: {
|
|
67
|
-
concernComments: string;
|
|
68
67
|
resolvedComments: string;
|
|
69
68
|
rejectionReason: string;
|
|
70
69
|
rejectionDate: string;
|
|
@@ -78,6 +77,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
78
77
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
79
78
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
80
79
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
80
|
+
concernComments?: string | null | undefined;
|
|
81
81
|
acceptedDate?: string | null | undefined;
|
|
82
82
|
} | null | undefined;
|
|
83
83
|
status?: number | null | undefined;
|
|
@@ -92,7 +92,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
92
92
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
93
93
|
createdOn?: string | null | undefined;
|
|
94
94
|
additionalData?: {
|
|
95
|
-
concernComments: string;
|
|
96
95
|
resolvedComments: string;
|
|
97
96
|
rejectionReason: string;
|
|
98
97
|
rejectionDate: string;
|
|
@@ -106,6 +105,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
106
105
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
107
106
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
108
107
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
108
|
+
concernComments?: string | null | undefined;
|
|
109
109
|
acceptedDate?: string | null | undefined;
|
|
110
110
|
} | null | undefined;
|
|
111
111
|
status?: number | null | undefined;
|
|
@@ -126,7 +126,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
126
126
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
127
127
|
createdOn?: string | null | undefined;
|
|
128
128
|
additionalData?: {
|
|
129
|
-
concernComments: string;
|
|
130
129
|
resolvedComments: string;
|
|
131
130
|
rejectionReason: string;
|
|
132
131
|
rejectionDate: string;
|
|
@@ -140,6 +139,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
140
139
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
141
140
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
142
141
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
142
|
+
concernComments?: string | null | undefined;
|
|
143
143
|
acceptedDate?: string | null | undefined;
|
|
144
144
|
} | null | undefined;
|
|
145
145
|
status?: number | null | undefined;
|
|
@@ -154,7 +154,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
154
154
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
155
155
|
createdOn?: string | null | undefined;
|
|
156
156
|
additionalData?: {
|
|
157
|
-
concernComments: string;
|
|
158
157
|
resolvedComments: string;
|
|
159
158
|
rejectionReason: string;
|
|
160
159
|
rejectionDate: string;
|
|
@@ -168,6 +167,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
168
167
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
169
168
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
170
169
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
170
|
+
concernComments?: string | null | undefined;
|
|
171
171
|
acceptedDate?: string | null | undefined;
|
|
172
172
|
} | null | undefined;
|
|
173
173
|
status?: number | null | undefined;
|
|
@@ -182,7 +182,6 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
182
182
|
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
183
183
|
createdOn?: string | null | undefined;
|
|
184
184
|
additionalData?: {
|
|
185
|
-
concernComments: string;
|
|
186
185
|
resolvedComments: string;
|
|
187
186
|
rejectionReason: string;
|
|
188
187
|
rejectionDate: string;
|
|
@@ -196,6 +195,7 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
196
195
|
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
197
196
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
198
197
|
concernTypeLid?: mongoose.Types.ObjectId | null | undefined;
|
|
198
|
+
concernComments?: string | null | undefined;
|
|
199
199
|
acceptedDate?: string | null | undefined;
|
|
200
200
|
} | null | undefined;
|
|
201
201
|
status?: number | null | undefined;
|
|
@@ -7,7 +7,7 @@ const additionalDataSchema = new mongoose.Schema({
|
|
|
7
7
|
responderId: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
8
8
|
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Status", required: false },
|
|
9
9
|
concernTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "ConcernType", required: false },
|
|
10
|
-
concernComments: { type: String, required:
|
|
10
|
+
concernComments: { type: String, required: false },
|
|
11
11
|
resolvedComments: { type: String, default: "" },
|
|
12
12
|
acceptedDate: { type: String },
|
|
13
13
|
rejectionReason: { type: String, default: null },
|