gemcap-be-common 1.5.90 → 1.5.92
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/Facility.model.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.FacilitySchema = new mongoose_1.default.Schema({
|
|
|
17
17
|
required: true,
|
|
18
18
|
},
|
|
19
19
|
name: {
|
|
20
|
-
type:
|
|
20
|
+
type: String,
|
|
21
21
|
required: true,
|
|
22
22
|
},
|
|
23
23
|
order: {
|
|
@@ -31,5 +31,5 @@ exports.FacilitySchema = new mongoose_1.default.Schema({
|
|
|
31
31
|
timestamps: { createdAt: true, updatedAt: true },
|
|
32
32
|
versionKey: false,
|
|
33
33
|
});
|
|
34
|
-
exports.FacilitySchema.index({ borrowerId: 1,
|
|
34
|
+
exports.FacilitySchema.index({ borrowerId: 1, uiId: 1 }, { unique: true });
|
|
35
35
|
exports.Facility = mongoose_1.default.model(_models_1.MODEL_NAMES.facilities, exports.FacilitySchema);
|
package/models/Facility.model.ts
CHANGED
|
@@ -39,7 +39,7 @@ export const FacilitySchema = new mongoose.Schema<IFacility, TFacilityModel>(
|
|
|
39
39
|
required: true,
|
|
40
40
|
},
|
|
41
41
|
name: {
|
|
42
|
-
type:
|
|
42
|
+
type: String,
|
|
43
43
|
required: true,
|
|
44
44
|
},
|
|
45
45
|
order: {
|
|
@@ -57,7 +57,7 @@ export const FacilitySchema = new mongoose.Schema<IFacility, TFacilityModel>(
|
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
FacilitySchema.index(
|
|
60
|
-
{ borrowerId: 1,
|
|
60
|
+
{ borrowerId: 1, uiId: 1 },
|
|
61
61
|
{ unique: true },
|
|
62
62
|
);
|
|
63
63
|
|
package/models/Yield.model.d.ts
CHANGED
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
import Joi from 'joi';
|
|
31
31
|
import mongoose from 'mongoose';
|
|
32
32
|
import { ISelectedMonth } from '../helpers/date.helper';
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
33
|
+
import { ILoanChargePlain } from './LoanCharges.model';
|
|
34
|
+
import { ILoanProductPlain } from './LoanProducts.model';
|
|
35
35
|
export declare const yieldParamsValidationSchema: Joi.ObjectSchema<IYieldParams>;
|
|
36
36
|
export declare enum ETotalType {
|
|
37
37
|
AVERAGE_BALANCE = "AVERAGE_BALANCE",
|
|
@@ -65,12 +65,12 @@ export interface IYieldData {
|
|
|
65
65
|
}
|
|
66
66
|
export interface IYieldViewData {
|
|
67
67
|
order: number;
|
|
68
|
-
charge:
|
|
69
|
-
product:
|
|
68
|
+
charge: ILoanChargePlain;
|
|
69
|
+
product: ILoanProductPlain;
|
|
70
70
|
title: string;
|
|
71
71
|
class?: string;
|
|
72
|
-
[key: `value-${string}`]: number | string |
|
|
73
|
-
[key: `valuePercent-${string}`]: number | string |
|
|
72
|
+
[key: `value-${string}`]: number | string | ILoanChargePlain | ILoanProductPlain;
|
|
73
|
+
[key: `valuePercent-${string}`]: number | string | ILoanChargePlain | ILoanProductPlain;
|
|
74
74
|
}
|
|
75
75
|
export interface IYieldDataDoc extends IYieldData, mongoose.Document {
|
|
76
76
|
_id: mongoose.Types.ObjectId;
|
package/models/Yield.model.ts
CHANGED
|
@@ -3,8 +3,8 @@ import mongoose from 'mongoose';
|
|
|
3
3
|
|
|
4
4
|
import { ISelectedMonth } from '../helpers/date.helper';
|
|
5
5
|
import { MODEL_NAMES } from './_models';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { ILoanChargePlain } from './LoanCharges.model';
|
|
7
|
+
import { ILoanProductPlain } from './LoanProducts.model';
|
|
8
8
|
|
|
9
9
|
export const yieldParamsValidationSchema = Joi.object<IYieldParams>({
|
|
10
10
|
periodStart: Joi.object({
|
|
@@ -67,13 +67,13 @@ export interface IYieldData {
|
|
|
67
67
|
|
|
68
68
|
export interface IYieldViewData {
|
|
69
69
|
order: number;
|
|
70
|
-
charge:
|
|
71
|
-
product:
|
|
70
|
+
charge: ILoanChargePlain;
|
|
71
|
+
product: ILoanProductPlain;
|
|
72
72
|
title: string;
|
|
73
73
|
class?: string;
|
|
74
74
|
|
|
75
|
-
[key: `value-${string}`]: number | string |
|
|
76
|
-
[key: `valuePercent-${string}`]: number | string |
|
|
75
|
+
[key: `value-${string}`]: number | string | ILoanChargePlain | ILoanProductPlain;
|
|
76
|
+
[key: `valuePercent-${string}`]: number | string | ILoanChargePlain | ILoanProductPlain;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export interface IYieldDataDoc extends IYieldData, mongoose.Document {
|
package/models/_index.d.ts
CHANGED
|
@@ -36,9 +36,9 @@ export declare const allSchemas: {
|
|
|
36
36
|
updatedAt: NativeDate;
|
|
37
37
|
} & {
|
|
38
38
|
order: number;
|
|
39
|
-
amount: number;
|
|
40
39
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
41
40
|
apDate: Date;
|
|
41
|
+
amount: number;
|
|
42
42
|
__v?: number;
|
|
43
43
|
poNumber?: string;
|
|
44
44
|
customerName?: string;
|
|
@@ -50,9 +50,9 @@ export declare const allSchemas: {
|
|
|
50
50
|
updatedAt: NativeDate;
|
|
51
51
|
} & {
|
|
52
52
|
order: number;
|
|
53
|
-
amount: number;
|
|
54
53
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
55
54
|
apDate: Date;
|
|
55
|
+
amount: number;
|
|
56
56
|
__v?: number;
|
|
57
57
|
poNumber?: string;
|
|
58
58
|
customerName?: string;
|
|
@@ -64,9 +64,9 @@ export declare const allSchemas: {
|
|
|
64
64
|
updatedAt: NativeDate;
|
|
65
65
|
} & {
|
|
66
66
|
order: number;
|
|
67
|
-
amount: number;
|
|
68
67
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
69
68
|
apDate: Date;
|
|
69
|
+
amount: number;
|
|
70
70
|
__v?: number;
|
|
71
71
|
poNumber?: string;
|
|
72
72
|
customerName?: string;
|