gemcap-be-common 1.5.176 → 1.5.178
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.
- package/models/Borrower.model.d.ts +28 -22
- package/models/Borrower.model.js +4 -0
- package/models/Borrower.model.ts +8 -1
- package/models/BorrowerCompliance.model.d.ts +58 -58
- package/models/BorrowerFinanceSettings.model.d.ts +96 -0
- package/models/BorrowerFinanceSettings.model.js +44 -0
- package/models/BorrowerFinanceSettings.model.ts +78 -0
- package/models/CategoryGroup.model.d.ts +3 -3
- package/models/CustomerAPGroup.model.d.ts +3 -3
- package/models/CustomerGroup.model.d.ts +3 -3
- package/models/Equipment.model.d.ts +3 -3
- package/models/FinancialCompliance.model.d.ts +6 -6
- package/models/Inventory.model.d.ts +3 -3
- package/models/InventoryItem.model.d.ts +3 -3
- package/models/InventorySeasonalRates.model.d.ts +3 -3
- package/models/LoanPayment.model.d.ts +18 -18
- package/models/LoanProducts.model.d.ts +15 -15
- package/models/PostponedTransactions.model.d.ts +3 -3
- package/models/ProductBroker.model.d.ts +15 -15
- package/models/_index.d.ts +6 -6
- package/models/_models.d.ts +1 -0
- package/models/_models.js +1 -0
- package/models/_models.ts +3 -0
- package/package.json +1 -1
- package/services/borrowers.service.d.ts +2 -2
- package/services/compliance-borrowers.service.d.ts +1 -1
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -43,6 +43,7 @@ export interface IBorrower {
|
|
|
43
43
|
reserveCodeCompanyId: mongoose.Types.ObjectId | null;
|
|
44
44
|
reserveCodeId: mongoose.Types.ObjectId | null;
|
|
45
45
|
organizationId: mongoose.Types.ObjectId;
|
|
46
|
+
companyId?: mongoose.Types.ObjectId | null;
|
|
46
47
|
schemas: IMapSchema[];
|
|
47
48
|
}
|
|
48
49
|
export interface IBorrowerDoc extends IBorrower, Document {
|
|
@@ -55,10 +56,12 @@ export interface IBorrowerLean extends IBorrower {
|
|
|
55
56
|
createdAt: Date;
|
|
56
57
|
updatedAt: Date;
|
|
57
58
|
}
|
|
58
|
-
export interface IBorrowerPlain extends Omit<IBorrower, 'organizationId' | 'reserveCodeId'> {
|
|
59
|
+
export interface IBorrowerPlain extends Omit<IBorrower, 'reserveCodeCompanyId' | 'organizationId' | 'reserveCodeId' | 'companyId'> {
|
|
59
60
|
_id: string;
|
|
61
|
+
reserveCodeCompanyId: string;
|
|
60
62
|
organizationId: string;
|
|
61
63
|
reserveCodeId: string;
|
|
64
|
+
companyId: string;
|
|
62
65
|
createdAt: Date;
|
|
63
66
|
updatedAt: Date;
|
|
64
67
|
}
|
|
@@ -69,71 +72,74 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
69
72
|
createdAt: NativeDate;
|
|
70
73
|
updatedAt: NativeDate;
|
|
71
74
|
} & {
|
|
72
|
-
|
|
75
|
+
accrueToReserve: boolean;
|
|
73
76
|
name: string;
|
|
74
|
-
title: string;
|
|
75
77
|
active: boolean;
|
|
78
|
+
code: string;
|
|
79
|
+
title: string;
|
|
76
80
|
accrualStatus: boolean;
|
|
77
|
-
|
|
78
|
-
organizationId?: mongoose.Types.ObjectId;
|
|
79
|
-
reserveCodeId?: mongoose.Types.ObjectId;
|
|
81
|
+
companyId?: mongoose.Types.ObjectId;
|
|
80
82
|
accrueToReserveAppliedFrom?: Date;
|
|
81
83
|
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
84
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
85
|
+
__v?: number;
|
|
86
|
+
organizationId?: mongoose.Types.ObjectId;
|
|
82
87
|
schemas?: mongoose.Types.DocumentArray<{
|
|
83
|
-
name: string;
|
|
84
88
|
type: string;
|
|
89
|
+
name: string;
|
|
85
90
|
data: mongoose.Types.DocumentArray<{
|
|
86
91
|
column: string;
|
|
87
92
|
databaseTitle: string;
|
|
88
93
|
}>;
|
|
89
94
|
}>;
|
|
90
|
-
__v?: number;
|
|
91
95
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
92
96
|
createdAt: NativeDate;
|
|
93
97
|
updatedAt: NativeDate;
|
|
94
98
|
} & {
|
|
95
|
-
|
|
99
|
+
accrueToReserve: boolean;
|
|
96
100
|
name: string;
|
|
97
|
-
title: string;
|
|
98
101
|
active: boolean;
|
|
102
|
+
code: string;
|
|
103
|
+
title: string;
|
|
99
104
|
accrualStatus: boolean;
|
|
100
|
-
|
|
101
|
-
organizationId?: mongoose.Types.ObjectId;
|
|
102
|
-
reserveCodeId?: mongoose.Types.ObjectId;
|
|
105
|
+
companyId?: mongoose.Types.ObjectId;
|
|
103
106
|
accrueToReserveAppliedFrom?: Date;
|
|
104
107
|
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
108
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
109
|
+
__v?: number;
|
|
110
|
+
organizationId?: mongoose.Types.ObjectId;
|
|
105
111
|
schemas?: mongoose.Types.DocumentArray<{
|
|
106
|
-
name: string;
|
|
107
112
|
type: string;
|
|
113
|
+
name: string;
|
|
108
114
|
data: mongoose.Types.DocumentArray<{
|
|
109
115
|
column: string;
|
|
110
116
|
databaseTitle: string;
|
|
111
117
|
}>;
|
|
112
118
|
}>;
|
|
113
|
-
__v?: number;
|
|
114
119
|
}>> & mongoose.FlatRecord<{
|
|
115
120
|
createdAt: NativeDate;
|
|
116
121
|
updatedAt: NativeDate;
|
|
117
122
|
} & {
|
|
118
|
-
|
|
123
|
+
accrueToReserve: boolean;
|
|
119
124
|
name: string;
|
|
120
|
-
title: string;
|
|
121
125
|
active: boolean;
|
|
126
|
+
code: string;
|
|
127
|
+
title: string;
|
|
122
128
|
accrualStatus: boolean;
|
|
123
|
-
|
|
124
|
-
organizationId?: mongoose.Types.ObjectId;
|
|
125
|
-
reserveCodeId?: mongoose.Types.ObjectId;
|
|
129
|
+
companyId?: mongoose.Types.ObjectId;
|
|
126
130
|
accrueToReserveAppliedFrom?: Date;
|
|
127
131
|
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
132
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
133
|
+
__v?: number;
|
|
134
|
+
organizationId?: mongoose.Types.ObjectId;
|
|
128
135
|
schemas?: mongoose.Types.DocumentArray<{
|
|
129
|
-
name: string;
|
|
130
136
|
type: string;
|
|
137
|
+
name: string;
|
|
131
138
|
data: mongoose.Types.DocumentArray<{
|
|
132
139
|
column: string;
|
|
133
140
|
databaseTitle: string;
|
|
134
141
|
}>;
|
|
135
142
|
}>;
|
|
136
|
-
__v?: number;
|
|
137
143
|
}> & {
|
|
138
144
|
_id: mongoose.Types.ObjectId;
|
|
139
145
|
}>;
|
package/models/Borrower.model.js
CHANGED
|
@@ -50,6 +50,10 @@ exports.BorrowerSchema = new mongoose_1.default.Schema({
|
|
|
50
50
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
51
51
|
ref: _models_1.MODEL_NAMES.organizations,
|
|
52
52
|
},
|
|
53
|
+
companyId: {
|
|
54
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
55
|
+
ref: _models_1.MODEL_NAMES.companies,
|
|
56
|
+
},
|
|
53
57
|
schemas: {
|
|
54
58
|
required: false,
|
|
55
59
|
type: [
|
package/models/Borrower.model.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface IBorrower {
|
|
|
25
25
|
reserveCodeCompanyId: mongoose.Types.ObjectId | null;
|
|
26
26
|
reserveCodeId: mongoose.Types.ObjectId | null;
|
|
27
27
|
organizationId: mongoose.Types.ObjectId;
|
|
28
|
+
companyId?: mongoose.Types.ObjectId | null;
|
|
28
29
|
schemas: IMapSchema[];
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -40,10 +41,12 @@ export interface IBorrowerLean extends IBorrower {
|
|
|
40
41
|
updatedAt: Date;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
export interface IBorrowerPlain extends Omit<IBorrower, 'organizationId' | 'reserveCodeId'> {
|
|
44
|
+
export interface IBorrowerPlain extends Omit<IBorrower, 'reserveCodeCompanyId' | 'organizationId' | 'reserveCodeId' | 'companyId'> {
|
|
44
45
|
_id: string;
|
|
46
|
+
reserveCodeCompanyId: string;
|
|
45
47
|
organizationId: string;
|
|
46
48
|
reserveCodeId: string;
|
|
49
|
+
companyId: string;
|
|
47
50
|
createdAt: Date;
|
|
48
51
|
updatedAt: Date;
|
|
49
52
|
}
|
|
@@ -94,6 +97,10 @@ export const BorrowerSchema = new mongoose.Schema(
|
|
|
94
97
|
type: mongoose.Schema.Types.ObjectId,
|
|
95
98
|
ref: MODEL_NAMES.organizations,
|
|
96
99
|
},
|
|
100
|
+
companyId: {
|
|
101
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
102
|
+
ref: MODEL_NAMES.companies,
|
|
103
|
+
},
|
|
97
104
|
schemas: {
|
|
98
105
|
required: false,
|
|
99
106
|
type: [
|
|
@@ -79,34 +79,13 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
79
79
|
createdAt: NativeDate;
|
|
80
80
|
updatedAt: NativeDate;
|
|
81
81
|
} & {
|
|
82
|
-
borrower: mongoose.Types.ObjectId;
|
|
83
|
-
complianceNotes: mongoose.Types.DocumentArray<{
|
|
84
|
-
date: Date;
|
|
85
|
-
note: string;
|
|
86
|
-
user?: string;
|
|
87
|
-
}>;
|
|
88
|
-
borrowerNotes: mongoose.Types.DocumentArray<{
|
|
89
|
-
date: Date;
|
|
90
|
-
note: string;
|
|
91
|
-
user?: string;
|
|
92
|
-
}>;
|
|
93
|
-
mainEmails: mongoose.Types.DocumentArray<{
|
|
94
|
-
title?: string;
|
|
95
|
-
email?: string;
|
|
96
|
-
isActive?: boolean;
|
|
97
|
-
}>;
|
|
98
|
-
financialEmails: mongoose.Types.DocumentArray<{
|
|
99
|
-
title?: string;
|
|
100
|
-
email?: string;
|
|
101
|
-
isActive?: boolean;
|
|
102
|
-
}>;
|
|
103
82
|
items: mongoose.Types.DocumentArray<{
|
|
104
83
|
createdAt: NativeDate;
|
|
105
84
|
updatedAt: NativeDate;
|
|
106
85
|
} & {
|
|
107
86
|
emailAddresses: mongoose.Types.DocumentArray<{
|
|
108
|
-
title?: string;
|
|
109
87
|
email?: string;
|
|
88
|
+
title?: string;
|
|
110
89
|
isActive?: boolean;
|
|
111
90
|
}>;
|
|
112
91
|
instances: mongoose.Types.DocumentArray<{
|
|
@@ -120,26 +99,14 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
120
99
|
uploadedAt?: Date;
|
|
121
100
|
uploadedBy?: string;
|
|
122
101
|
}>;
|
|
102
|
+
status?: string;
|
|
123
103
|
nextDate?: Date;
|
|
124
104
|
submittedDate?: Date;
|
|
125
|
-
status?: string;
|
|
126
105
|
}>;
|
|
127
|
-
startDate?: Date;
|
|
128
106
|
frequency?: string;
|
|
107
|
+
startDate?: Date;
|
|
129
108
|
item?: mongoose.Types.ObjectId;
|
|
130
109
|
}>;
|
|
131
|
-
__v?: number;
|
|
132
|
-
email?: string;
|
|
133
|
-
isVisible?: boolean;
|
|
134
|
-
isEmailingActive?: boolean;
|
|
135
|
-
isDailyTransactionsEmailingActive?: boolean;
|
|
136
|
-
plaidAccessToken?: string;
|
|
137
|
-
fundingStatus?: string;
|
|
138
|
-
lastEmailSentAt?: Date;
|
|
139
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
140
|
-
createdAt: NativeDate;
|
|
141
|
-
updatedAt: NativeDate;
|
|
142
|
-
} & {
|
|
143
110
|
borrower: mongoose.Types.ObjectId;
|
|
144
111
|
complianceNotes: mongoose.Types.DocumentArray<{
|
|
145
112
|
date: Date;
|
|
@@ -152,22 +119,34 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
152
119
|
user?: string;
|
|
153
120
|
}>;
|
|
154
121
|
mainEmails: mongoose.Types.DocumentArray<{
|
|
155
|
-
title?: string;
|
|
156
122
|
email?: string;
|
|
123
|
+
title?: string;
|
|
157
124
|
isActive?: boolean;
|
|
158
125
|
}>;
|
|
159
126
|
financialEmails: mongoose.Types.DocumentArray<{
|
|
160
|
-
title?: string;
|
|
161
127
|
email?: string;
|
|
128
|
+
title?: string;
|
|
162
129
|
isActive?: boolean;
|
|
163
130
|
}>;
|
|
131
|
+
__v?: number;
|
|
132
|
+
email?: string;
|
|
133
|
+
isVisible?: boolean;
|
|
134
|
+
isEmailingActive?: boolean;
|
|
135
|
+
isDailyTransactionsEmailingActive?: boolean;
|
|
136
|
+
plaidAccessToken?: string;
|
|
137
|
+
fundingStatus?: string;
|
|
138
|
+
lastEmailSentAt?: Date;
|
|
139
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
140
|
+
createdAt: NativeDate;
|
|
141
|
+
updatedAt: NativeDate;
|
|
142
|
+
} & {
|
|
164
143
|
items: mongoose.Types.DocumentArray<{
|
|
165
144
|
createdAt: NativeDate;
|
|
166
145
|
updatedAt: NativeDate;
|
|
167
146
|
} & {
|
|
168
147
|
emailAddresses: mongoose.Types.DocumentArray<{
|
|
169
|
-
title?: string;
|
|
170
148
|
email?: string;
|
|
149
|
+
title?: string;
|
|
171
150
|
isActive?: boolean;
|
|
172
151
|
}>;
|
|
173
152
|
instances: mongoose.Types.DocumentArray<{
|
|
@@ -181,26 +160,14 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
181
160
|
uploadedAt?: Date;
|
|
182
161
|
uploadedBy?: string;
|
|
183
162
|
}>;
|
|
163
|
+
status?: string;
|
|
184
164
|
nextDate?: Date;
|
|
185
165
|
submittedDate?: Date;
|
|
186
|
-
status?: string;
|
|
187
166
|
}>;
|
|
188
|
-
startDate?: Date;
|
|
189
167
|
frequency?: string;
|
|
168
|
+
startDate?: Date;
|
|
190
169
|
item?: mongoose.Types.ObjectId;
|
|
191
170
|
}>;
|
|
192
|
-
__v?: number;
|
|
193
|
-
email?: string;
|
|
194
|
-
isVisible?: boolean;
|
|
195
|
-
isEmailingActive?: boolean;
|
|
196
|
-
isDailyTransactionsEmailingActive?: boolean;
|
|
197
|
-
plaidAccessToken?: string;
|
|
198
|
-
fundingStatus?: string;
|
|
199
|
-
lastEmailSentAt?: Date;
|
|
200
|
-
}>> & mongoose.FlatRecord<{
|
|
201
|
-
createdAt: NativeDate;
|
|
202
|
-
updatedAt: NativeDate;
|
|
203
|
-
} & {
|
|
204
171
|
borrower: mongoose.Types.ObjectId;
|
|
205
172
|
complianceNotes: mongoose.Types.DocumentArray<{
|
|
206
173
|
date: Date;
|
|
@@ -213,22 +180,34 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
213
180
|
user?: string;
|
|
214
181
|
}>;
|
|
215
182
|
mainEmails: mongoose.Types.DocumentArray<{
|
|
216
|
-
title?: string;
|
|
217
183
|
email?: string;
|
|
184
|
+
title?: string;
|
|
218
185
|
isActive?: boolean;
|
|
219
186
|
}>;
|
|
220
187
|
financialEmails: mongoose.Types.DocumentArray<{
|
|
221
|
-
title?: string;
|
|
222
188
|
email?: string;
|
|
189
|
+
title?: string;
|
|
223
190
|
isActive?: boolean;
|
|
224
191
|
}>;
|
|
192
|
+
__v?: number;
|
|
193
|
+
email?: string;
|
|
194
|
+
isVisible?: boolean;
|
|
195
|
+
isEmailingActive?: boolean;
|
|
196
|
+
isDailyTransactionsEmailingActive?: boolean;
|
|
197
|
+
plaidAccessToken?: string;
|
|
198
|
+
fundingStatus?: string;
|
|
199
|
+
lastEmailSentAt?: Date;
|
|
200
|
+
}>> & mongoose.FlatRecord<{
|
|
201
|
+
createdAt: NativeDate;
|
|
202
|
+
updatedAt: NativeDate;
|
|
203
|
+
} & {
|
|
225
204
|
items: mongoose.Types.DocumentArray<{
|
|
226
205
|
createdAt: NativeDate;
|
|
227
206
|
updatedAt: NativeDate;
|
|
228
207
|
} & {
|
|
229
208
|
emailAddresses: mongoose.Types.DocumentArray<{
|
|
230
|
-
title?: string;
|
|
231
209
|
email?: string;
|
|
210
|
+
title?: string;
|
|
232
211
|
isActive?: boolean;
|
|
233
212
|
}>;
|
|
234
213
|
instances: mongoose.Types.DocumentArray<{
|
|
@@ -242,14 +221,35 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
|
|
|
242
221
|
uploadedAt?: Date;
|
|
243
222
|
uploadedBy?: string;
|
|
244
223
|
}>;
|
|
224
|
+
status?: string;
|
|
245
225
|
nextDate?: Date;
|
|
246
226
|
submittedDate?: Date;
|
|
247
|
-
status?: string;
|
|
248
227
|
}>;
|
|
249
|
-
startDate?: Date;
|
|
250
228
|
frequency?: string;
|
|
229
|
+
startDate?: Date;
|
|
251
230
|
item?: mongoose.Types.ObjectId;
|
|
252
231
|
}>;
|
|
232
|
+
borrower: mongoose.Types.ObjectId;
|
|
233
|
+
complianceNotes: mongoose.Types.DocumentArray<{
|
|
234
|
+
date: Date;
|
|
235
|
+
note: string;
|
|
236
|
+
user?: string;
|
|
237
|
+
}>;
|
|
238
|
+
borrowerNotes: mongoose.Types.DocumentArray<{
|
|
239
|
+
date: Date;
|
|
240
|
+
note: string;
|
|
241
|
+
user?: string;
|
|
242
|
+
}>;
|
|
243
|
+
mainEmails: mongoose.Types.DocumentArray<{
|
|
244
|
+
email?: string;
|
|
245
|
+
title?: string;
|
|
246
|
+
isActive?: boolean;
|
|
247
|
+
}>;
|
|
248
|
+
financialEmails: mongoose.Types.DocumentArray<{
|
|
249
|
+
email?: string;
|
|
250
|
+
title?: string;
|
|
251
|
+
isActive?: boolean;
|
|
252
|
+
}>;
|
|
253
253
|
__v?: number;
|
|
254
254
|
email?: string;
|
|
255
255
|
isVisible?: boolean;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import mongoose from 'mongoose';
|
|
26
|
+
export interface IBorrowerFinanceSettings {
|
|
27
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
28
|
+
companyId: mongoose.Types.ObjectId | null;
|
|
29
|
+
accrualEnabled: boolean;
|
|
30
|
+
accrualAppliedFrom: Date | null;
|
|
31
|
+
accrueToReserve: boolean;
|
|
32
|
+
accrueToReserveAppliedFrom: Date | null;
|
|
33
|
+
reserveCodeCompanyId: mongoose.Types.ObjectId | null;
|
|
34
|
+
reserveCodeId: mongoose.Types.ObjectId | null;
|
|
35
|
+
}
|
|
36
|
+
export type TBorrowerFinanceSettingsDoc = mongoose.HydratedDocument<IBorrowerFinanceSettings>;
|
|
37
|
+
export interface IBorrowerFinanceSettingsLean extends IBorrowerFinanceSettings {
|
|
38
|
+
_id: mongoose.Types.ObjectId;
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
updatedAt: Date;
|
|
41
|
+
}
|
|
42
|
+
export interface IIBorrowerFinanceSettingsPlain extends Omit<IBorrowerFinanceSettings, 'borrowerId' | 'companyId' | 'reserveCodeCompanyId' | 'reserveCodeId'> {
|
|
43
|
+
_id: string;
|
|
44
|
+
borrowerId: string;
|
|
45
|
+
companyId: string;
|
|
46
|
+
reserveCodeCompanyId: string;
|
|
47
|
+
reserveCodeId: string;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export type TBorrowerFinanceSettingsModel = mongoose.Model<TBorrowerFinanceSettingsDoc>;
|
|
52
|
+
export declare const BorrowerFinanceSettingsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
53
|
+
timestamps: true;
|
|
54
|
+
}, {
|
|
55
|
+
createdAt: NativeDate;
|
|
56
|
+
updatedAt: NativeDate;
|
|
57
|
+
} & {
|
|
58
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
59
|
+
accrualEnabled: boolean;
|
|
60
|
+
accrueToReserve: boolean;
|
|
61
|
+
companyId?: mongoose.Types.ObjectId;
|
|
62
|
+
accrualAppliedFrom?: Date;
|
|
63
|
+
accrueToReserveAppliedFrom?: Date;
|
|
64
|
+
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
65
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
66
|
+
__v?: number;
|
|
67
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
68
|
+
createdAt: NativeDate;
|
|
69
|
+
updatedAt: NativeDate;
|
|
70
|
+
} & {
|
|
71
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
72
|
+
accrualEnabled: boolean;
|
|
73
|
+
accrueToReserve: boolean;
|
|
74
|
+
companyId?: mongoose.Types.ObjectId;
|
|
75
|
+
accrualAppliedFrom?: Date;
|
|
76
|
+
accrueToReserveAppliedFrom?: Date;
|
|
77
|
+
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
78
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
79
|
+
__v?: number;
|
|
80
|
+
}>> & mongoose.FlatRecord<{
|
|
81
|
+
createdAt: NativeDate;
|
|
82
|
+
updatedAt: NativeDate;
|
|
83
|
+
} & {
|
|
84
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
85
|
+
accrualEnabled: boolean;
|
|
86
|
+
accrueToReserve: boolean;
|
|
87
|
+
companyId?: mongoose.Types.ObjectId;
|
|
88
|
+
accrualAppliedFrom?: Date;
|
|
89
|
+
accrueToReserveAppliedFrom?: Date;
|
|
90
|
+
reserveCodeCompanyId?: mongoose.Types.ObjectId;
|
|
91
|
+
reserveCodeId?: mongoose.Types.ObjectId;
|
|
92
|
+
__v?: number;
|
|
93
|
+
}> & {
|
|
94
|
+
_id: mongoose.Types.ObjectId;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const BorrowerFinanceSettingsModel: mongoose.Model<TBorrowerFinanceSettingsDoc>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BorrowerFinanceSettingsModel = exports.BorrowerFinanceSettingsSchema = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
const _models_1 = require("./_models");
|
|
9
|
+
exports.BorrowerFinanceSettingsSchema = new mongoose_1.default.Schema({
|
|
10
|
+
borrowerId: {
|
|
11
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
12
|
+
ref: _models_1.MODEL_NAMES.borrowers,
|
|
13
|
+
required: true,
|
|
14
|
+
unique: true,
|
|
15
|
+
},
|
|
16
|
+
accrualEnabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
accrualAppliedFrom: {
|
|
21
|
+
type: Date,
|
|
22
|
+
},
|
|
23
|
+
accrueToReserve: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
accrueToReserveAppliedFrom: {
|
|
28
|
+
type: Date,
|
|
29
|
+
},
|
|
30
|
+
reserveCodeCompanyId: {
|
|
31
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
32
|
+
ref: _models_1.MODEL_NAMES.companies,
|
|
33
|
+
},
|
|
34
|
+
reserveCodeId: {
|
|
35
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
36
|
+
ref: _models_1.MODEL_NAMES.quickbooksAccounts,
|
|
37
|
+
},
|
|
38
|
+
companyId: {
|
|
39
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
40
|
+
ref: _models_1.MODEL_NAMES.companies,
|
|
41
|
+
},
|
|
42
|
+
__v: { type: Number, select: false },
|
|
43
|
+
}, { timestamps: true });
|
|
44
|
+
exports.BorrowerFinanceSettingsModel = mongoose_1.default.model(_models_1.MODEL_NAMES.BorrowerFinanceSettings, exports.BorrowerFinanceSettingsSchema);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
import { MODEL_NAMES } from './_models';
|
|
4
|
+
|
|
5
|
+
export interface IBorrowerFinanceSettings {
|
|
6
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
7
|
+
companyId: mongoose.Types.ObjectId | null;
|
|
8
|
+
|
|
9
|
+
accrualEnabled: boolean;
|
|
10
|
+
accrualAppliedFrom: Date | null;
|
|
11
|
+
|
|
12
|
+
accrueToReserve: boolean;
|
|
13
|
+
accrueToReserveAppliedFrom: Date | null;
|
|
14
|
+
|
|
15
|
+
reserveCodeCompanyId: mongoose.Types.ObjectId | null;
|
|
16
|
+
reserveCodeId: mongoose.Types.ObjectId | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type TBorrowerFinanceSettingsDoc = mongoose.HydratedDocument<IBorrowerFinanceSettings>;
|
|
20
|
+
|
|
21
|
+
export interface IBorrowerFinanceSettingsLean extends IBorrowerFinanceSettings {
|
|
22
|
+
_id: mongoose.Types.ObjectId;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IIBorrowerFinanceSettingsPlain extends Omit<IBorrowerFinanceSettings, 'borrowerId' | 'companyId' | 'reserveCodeCompanyId' | 'reserveCodeId'> {
|
|
28
|
+
_id: string;
|
|
29
|
+
borrowerId: string;
|
|
30
|
+
companyId: string;
|
|
31
|
+
reserveCodeCompanyId: string;
|
|
32
|
+
reserveCodeId: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type TBorrowerFinanceSettingsModel = mongoose.Model<TBorrowerFinanceSettingsDoc>;
|
|
38
|
+
|
|
39
|
+
export const BorrowerFinanceSettingsSchema = new mongoose.Schema(
|
|
40
|
+
{
|
|
41
|
+
borrowerId: {
|
|
42
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
43
|
+
ref: MODEL_NAMES.borrowers,
|
|
44
|
+
required: true,
|
|
45
|
+
unique: true,
|
|
46
|
+
},
|
|
47
|
+
accrualEnabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
accrualAppliedFrom: {
|
|
52
|
+
type: Date,
|
|
53
|
+
},
|
|
54
|
+
accrueToReserve: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
accrueToReserveAppliedFrom: {
|
|
59
|
+
type: Date,
|
|
60
|
+
},
|
|
61
|
+
reserveCodeCompanyId: {
|
|
62
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
63
|
+
ref: MODEL_NAMES.companies,
|
|
64
|
+
},
|
|
65
|
+
reserveCodeId: {
|
|
66
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
67
|
+
ref: MODEL_NAMES.quickbooksAccounts,
|
|
68
|
+
},
|
|
69
|
+
companyId: {
|
|
70
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
71
|
+
ref: MODEL_NAMES.companies,
|
|
72
|
+
},
|
|
73
|
+
__v: { type: Number, select: false },
|
|
74
|
+
},
|
|
75
|
+
{ timestamps: true },
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
export const BorrowerFinanceSettingsModel: mongoose.Model<TBorrowerFinanceSettingsDoc> = mongoose.model<TBorrowerFinanceSettingsDoc>(MODEL_NAMES.BorrowerFinanceSettings, BorrowerFinanceSettingsSchema);
|
|
@@ -45,24 +45,24 @@ export declare const CategoryGroupSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
groupName: string;
|
|
49
48
|
borrowerId: mongoose.Types.ObjectId;
|
|
49
|
+
groupName: string;
|
|
50
50
|
items: string[];
|
|
51
51
|
__v?: number;
|
|
52
52
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
53
53
|
createdAt: NativeDate;
|
|
54
54
|
updatedAt: NativeDate;
|
|
55
55
|
} & {
|
|
56
|
-
groupName: string;
|
|
57
56
|
borrowerId: mongoose.Types.ObjectId;
|
|
57
|
+
groupName: string;
|
|
58
58
|
items: string[];
|
|
59
59
|
__v?: number;
|
|
60
60
|
}>> & mongoose.FlatRecord<{
|
|
61
61
|
createdAt: NativeDate;
|
|
62
62
|
updatedAt: NativeDate;
|
|
63
63
|
} & {
|
|
64
|
-
groupName: string;
|
|
65
64
|
borrowerId: mongoose.Types.ObjectId;
|
|
65
|
+
groupName: string;
|
|
66
66
|
items: string[];
|
|
67
67
|
__v?: number;
|
|
68
68
|
}> & {
|
|
@@ -45,24 +45,24 @@ export declare const CustomerAPGroupSchema: mongoose.Schema<any, mongoose.Model<
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
groupName: string;
|
|
49
48
|
borrowerId: mongoose.Types.ObjectId;
|
|
49
|
+
groupName: string;
|
|
50
50
|
items: string[];
|
|
51
51
|
__v?: number;
|
|
52
52
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
53
53
|
createdAt: NativeDate;
|
|
54
54
|
updatedAt: NativeDate;
|
|
55
55
|
} & {
|
|
56
|
-
groupName: string;
|
|
57
56
|
borrowerId: mongoose.Types.ObjectId;
|
|
57
|
+
groupName: string;
|
|
58
58
|
items: string[];
|
|
59
59
|
__v?: number;
|
|
60
60
|
}>> & mongoose.FlatRecord<{
|
|
61
61
|
createdAt: NativeDate;
|
|
62
62
|
updatedAt: NativeDate;
|
|
63
63
|
} & {
|
|
64
|
-
groupName: string;
|
|
65
64
|
borrowerId: mongoose.Types.ObjectId;
|
|
65
|
+
groupName: string;
|
|
66
66
|
items: string[];
|
|
67
67
|
__v?: number;
|
|
68
68
|
}> & {
|
|
@@ -45,24 +45,24 @@ export declare const CustomerGroupSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
groupName: string;
|
|
49
48
|
borrowerId: mongoose.Types.ObjectId;
|
|
49
|
+
groupName: string;
|
|
50
50
|
items: string[];
|
|
51
51
|
__v?: number;
|
|
52
52
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
53
53
|
createdAt: NativeDate;
|
|
54
54
|
updatedAt: NativeDate;
|
|
55
55
|
} & {
|
|
56
|
-
groupName: string;
|
|
57
56
|
borrowerId: mongoose.Types.ObjectId;
|
|
57
|
+
groupName: string;
|
|
58
58
|
items: string[];
|
|
59
59
|
__v?: number;
|
|
60
60
|
}>> & mongoose.FlatRecord<{
|
|
61
61
|
createdAt: NativeDate;
|
|
62
62
|
updatedAt: NativeDate;
|
|
63
63
|
} & {
|
|
64
|
-
groupName: string;
|
|
65
64
|
borrowerId: mongoose.Types.ObjectId;
|
|
65
|
+
groupName: string;
|
|
66
66
|
items: string[];
|
|
67
67
|
__v?: number;
|
|
68
68
|
}> & {
|