@kipicore/dbcore 1.1.89 → 1.1.91

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.
@@ -6,7 +6,6 @@ export interface IAssignFileModelAttributes extends IDefaultAttributes, Document
6
6
  userId: string;
7
7
  instituteId: string;
8
8
  fileStorageId: string;
9
- academicCalendarId: string;
10
9
  expiredAt: Date;
11
10
  type: ASSIGN_FILE_TYPE;
12
11
  }
@@ -57,10 +57,6 @@ const AssignFileSchema = new mongoose_1.Schema({
57
57
  type: String,
58
58
  required: true,
59
59
  },
60
- academicCalendarId: {
61
- type: String,
62
- required: true,
63
- },
64
60
  createdBy: {
65
61
  type: String,
66
62
  },
@@ -525,7 +525,7 @@ const addDocsDetailsHook = async (subjectIndexList, where = {}, options = {}) =>
525
525
  let completedChapterLastLecture = [];
526
526
  if (subject.assignedUsers && subject.assignedUsers.length && options?.reqUser?.type === app_1.USER_TYPES.STUDENT) {
527
527
  const lectureList = await lectureModel_1.default.findAll({
528
- where: { subject: { [sequelize_1.Op.in]: [subject.subject] } },
528
+ where: { subject: { [sequelize_1.Op.in]: [subject.subject] }, checkedOutAt: { [sequelize_1.Op.not]: null }, checkedInAt: { [sequelize_1.Op.not]: null } },
529
529
  order: [['checkedInAt', 'DESC']],
530
530
  limit: 1,
531
531
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.89",
3
+ "version": "1.1.91",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",