gemcap-be-common 1.5.172 → 1.5.174
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.
|
@@ -58,67 +58,85 @@ export interface ILoanPayment {
|
|
|
58
58
|
settlementCode?: string;
|
|
59
59
|
paymentOrder?: string[];
|
|
60
60
|
}
|
|
61
|
+
export interface ILoanPaymentLean extends ILoanPayment {
|
|
62
|
+
_id: mongoose.Types.ObjectId;
|
|
63
|
+
}
|
|
64
|
+
export interface ILoanPaymentPlain extends Omit<ILoanPayment, 'productId' | 'paid' | 'loanTransactions'> {
|
|
65
|
+
_id: string;
|
|
66
|
+
productId: string;
|
|
67
|
+
paid: {
|
|
68
|
+
_id?: string;
|
|
69
|
+
statementId: string;
|
|
70
|
+
amount: number;
|
|
71
|
+
}[];
|
|
72
|
+
loanTransactions: {
|
|
73
|
+
_id?: string;
|
|
74
|
+
transactionId: string;
|
|
75
|
+
amount: number;
|
|
76
|
+
}[];
|
|
77
|
+
}
|
|
61
78
|
export interface ILoanPaymentWithId extends ILoanPayment {
|
|
62
79
|
_id: mongoose.Types.ObjectId;
|
|
63
80
|
}
|
|
64
81
|
export interface ILoanPaymentDoc extends ILoanPayment, Document {
|
|
65
82
|
}
|
|
83
|
+
export type TILoanPaymentModel = mongoose.Model<ILoanPayment>;
|
|
66
84
|
export declare const LoanPaymentSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
67
85
|
timestamps: true;
|
|
68
86
|
}, {
|
|
69
87
|
createdAt: NativeDate;
|
|
70
88
|
updatedAt: NativeDate;
|
|
71
89
|
} & {
|
|
72
|
-
loanTransactions: mongoose.Types.DocumentArray<{
|
|
73
|
-
amount?: number;
|
|
74
|
-
transactionId?: mongoose.Types.ObjectId;
|
|
75
|
-
}>;
|
|
76
90
|
date: Date;
|
|
77
91
|
productId: mongoose.Types.ObjectId;
|
|
78
92
|
amount: number;
|
|
79
|
-
paymentOrder: string[];
|
|
80
93
|
paid: mongoose.Types.DocumentArray<{
|
|
81
94
|
amount?: number;
|
|
82
95
|
statementId?: mongoose.Types.ObjectId;
|
|
83
96
|
}>;
|
|
84
|
-
|
|
97
|
+
paymentOrder: string[];
|
|
98
|
+
loanTransactions: mongoose.Types.DocumentArray<{
|
|
99
|
+
amount?: number;
|
|
100
|
+
transactionId?: mongoose.Types.ObjectId;
|
|
101
|
+
}>;
|
|
85
102
|
settlementCode?: string;
|
|
103
|
+
__v?: number;
|
|
86
104
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
87
105
|
createdAt: NativeDate;
|
|
88
106
|
updatedAt: NativeDate;
|
|
89
107
|
} & {
|
|
90
|
-
loanTransactions: mongoose.Types.DocumentArray<{
|
|
91
|
-
amount?: number;
|
|
92
|
-
transactionId?: mongoose.Types.ObjectId;
|
|
93
|
-
}>;
|
|
94
108
|
date: Date;
|
|
95
109
|
productId: mongoose.Types.ObjectId;
|
|
96
110
|
amount: number;
|
|
97
|
-
paymentOrder: string[];
|
|
98
111
|
paid: mongoose.Types.DocumentArray<{
|
|
99
112
|
amount?: number;
|
|
100
113
|
statementId?: mongoose.Types.ObjectId;
|
|
101
114
|
}>;
|
|
102
|
-
|
|
115
|
+
paymentOrder: string[];
|
|
116
|
+
loanTransactions: mongoose.Types.DocumentArray<{
|
|
117
|
+
amount?: number;
|
|
118
|
+
transactionId?: mongoose.Types.ObjectId;
|
|
119
|
+
}>;
|
|
103
120
|
settlementCode?: string;
|
|
121
|
+
__v?: number;
|
|
104
122
|
}>> & mongoose.FlatRecord<{
|
|
105
123
|
createdAt: NativeDate;
|
|
106
124
|
updatedAt: NativeDate;
|
|
107
125
|
} & {
|
|
108
|
-
loanTransactions: mongoose.Types.DocumentArray<{
|
|
109
|
-
amount?: number;
|
|
110
|
-
transactionId?: mongoose.Types.ObjectId;
|
|
111
|
-
}>;
|
|
112
126
|
date: Date;
|
|
113
127
|
productId: mongoose.Types.ObjectId;
|
|
114
128
|
amount: number;
|
|
115
|
-
paymentOrder: string[];
|
|
116
129
|
paid: mongoose.Types.DocumentArray<{
|
|
117
130
|
amount?: number;
|
|
118
131
|
statementId?: mongoose.Types.ObjectId;
|
|
119
132
|
}>;
|
|
120
|
-
|
|
133
|
+
paymentOrder: string[];
|
|
134
|
+
loanTransactions: mongoose.Types.DocumentArray<{
|
|
135
|
+
amount?: number;
|
|
136
|
+
transactionId?: mongoose.Types.ObjectId;
|
|
137
|
+
}>;
|
|
121
138
|
settlementCode?: string;
|
|
139
|
+
__v?: number;
|
|
122
140
|
}> & {
|
|
123
141
|
_id: mongoose.Types.ObjectId;
|
|
124
142
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import mongoose, { Document } from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
|
+
import { IProductBroker } from './ProductBroker.model';
|
|
4
5
|
|
|
5
6
|
export const LOAN_PAYMENT_FIELDS = [
|
|
6
7
|
'_id',
|
|
@@ -34,12 +35,39 @@ export interface ILoanPayment {
|
|
|
34
35
|
date: Date;
|
|
35
36
|
productId: mongoose.Types.ObjectId;
|
|
36
37
|
amount: number;
|
|
37
|
-
paid: {
|
|
38
|
-
|
|
38
|
+
paid: {
|
|
39
|
+
_id?: mongoose.Types.ObjectId;
|
|
40
|
+
statementId: mongoose.Types.ObjectId;
|
|
41
|
+
amount: number;
|
|
42
|
+
}[];
|
|
43
|
+
loanTransactions: {
|
|
44
|
+
_id?: mongoose.Types.ObjectId;
|
|
45
|
+
transactionId: mongoose.Types.ObjectId;
|
|
46
|
+
amount: number;
|
|
47
|
+
}[];
|
|
39
48
|
settlementCode?: string;
|
|
40
49
|
paymentOrder?: string[];
|
|
41
50
|
}
|
|
42
51
|
|
|
52
|
+
export interface ILoanPaymentLean extends ILoanPayment {
|
|
53
|
+
_id: mongoose.Types.ObjectId;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ILoanPaymentPlain extends Omit<ILoanPayment, 'productId' | 'paid' | 'loanTransactions'> {
|
|
57
|
+
_id: string;
|
|
58
|
+
productId: string;
|
|
59
|
+
paid: {
|
|
60
|
+
_id?: string;
|
|
61
|
+
statementId: string;
|
|
62
|
+
amount: number;
|
|
63
|
+
}[];
|
|
64
|
+
loanTransactions: {
|
|
65
|
+
_id?: string;
|
|
66
|
+
transactionId: string;
|
|
67
|
+
amount: number;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
|
|
43
71
|
export interface ILoanPaymentWithId extends ILoanPayment {
|
|
44
72
|
_id: mongoose.Types.ObjectId;
|
|
45
73
|
}
|
|
@@ -47,6 +75,8 @@ export interface ILoanPaymentWithId extends ILoanPayment {
|
|
|
47
75
|
export interface ILoanPaymentDoc extends ILoanPayment, Document {
|
|
48
76
|
}
|
|
49
77
|
|
|
78
|
+
export type TILoanPaymentModel = mongoose.Model<ILoanPayment>;
|
|
79
|
+
|
|
50
80
|
export const LoanPaymentSchema = new mongoose.Schema(
|
|
51
81
|
{
|
|
52
82
|
date: {
|
package/models/_index.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
-
order: number;
|
|
35
34
|
amount: number;
|
|
35
|
+
order: number;
|
|
36
36
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
37
37
|
apDate: Date;
|
|
38
38
|
__v?: number;
|
|
@@ -45,8 +45,8 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
order: number;
|
|
49
48
|
amount: number;
|
|
49
|
+
order: number;
|
|
50
50
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
51
51
|
apDate: Date;
|
|
52
52
|
__v?: number;
|
|
@@ -59,8 +59,8 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
order: number;
|
|
63
62
|
amount: number;
|
|
63
|
+
order: number;
|
|
64
64
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
65
65
|
apDate: Date;
|
|
66
66
|
__v?: number;
|
package/package.json
CHANGED
|
@@ -84,10 +84,10 @@ export declare class BorrowerService {
|
|
|
84
84
|
getBorrowerCodesMap(): Promise<Map<string, string>>;
|
|
85
85
|
getBorrowerStatementDetails(borrowers: IBorrowerDoc[]): Promise<{
|
|
86
86
|
[x: string]: {
|
|
87
|
-
ENTIRE_LOAN?: boolean;
|
|
88
87
|
SELECTED_PERIOD?: boolean;
|
|
89
|
-
|
|
88
|
+
ENTIRE_LOAN?: boolean;
|
|
90
89
|
LAST_MONTH?: boolean;
|
|
90
|
+
CURRENT_MONTH?: boolean;
|
|
91
91
|
TERM_LOAN?: boolean;
|
|
92
92
|
};
|
|
93
93
|
}>;
|