gemcap-be-common 1.5.48 → 1.5.49

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.
@@ -7,6 +7,7 @@ exports.BBCDateModel = exports.BBCDateSchema = exports.ICreateBBCDateSchema = vo
7
7
  const joi_1 = __importDefault(require("joi"));
8
8
  const mongoose_1 = __importDefault(require("mongoose"));
9
9
  const _models_1 = require("./_models");
10
+ const BBCSheet_model_1 = require("./BBCSheet.model");
10
11
  const mongooseLeanId = require('../plugins/id.plugin');
11
12
  exports.ICreateBBCDateSchema = joi_1.default.object({
12
13
  date: joi_1.default.date().required(),
@@ -27,4 +28,8 @@ exports.BBCDateSchema = new mongoose_1.default.Schema({
27
28
  __v: { type: Number, select: false },
28
29
  }, { timestamps: true });
29
30
  exports.BBCDateSchema.plugin(mongooseLeanId);
31
+ BBCSheet_model_1.BBCSheetSchema.index({
32
+ borrowerId: 1,
33
+ bbcDate: 1,
34
+ });
30
35
  exports.BBCDateModel = mongoose_1.default.model(_models_1.MODEL_NAMES.BBCDates, exports.BBCDateSchema);
@@ -3,6 +3,7 @@ import mongoose, { Document } from 'mongoose';
3
3
 
4
4
  import { MODEL_NAMES } from './_models';
5
5
  import { ILoanStatementStatus } from './LoanStatementStatus.model';
6
+ import { BBCSheetSchema } from './BBCSheet.model';
6
7
 
7
8
  const mongooseLeanId = require('../plugins/id.plugin');
8
9
 
@@ -67,4 +68,9 @@ export const BBCDateSchema = new mongoose.Schema(
67
68
 
68
69
  BBCDateSchema.plugin(mongooseLeanId);
69
70
 
71
+ BBCSheetSchema.index({
72
+ borrowerId: 1,
73
+ bbcDate: 1,
74
+ });
75
+
70
76
  export const BBCDateModel: mongoose.Model<IBBCDateDoc> = mongoose.model<IBBCDateDoc>(MODEL_NAMES.BBCDates, BBCDateSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.48",
3
+ "version": "1.5.49",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {