@kipicore/dbcore 1.1.77 → 1.1.79

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.
@@ -708,7 +708,8 @@ export declare enum NOTIFICATION_STATUS {
708
708
  }
709
709
  export declare enum NOTIFICATION_MODULE_TYPE {
710
710
  ANNOUCEMENT = "ANNOUCEMENT",
711
- INSTITUTE_JOINING_REQUEST = "INSTITUTE_JOINING_REQUEST"
711
+ INSTITUTE_JOINING_REQUEST = "INSTITUTE_JOINING_REQUEST",
712
+ BIRTHDAY_WISH = "BIRTHDAY_WISH"
712
713
  }
713
714
  export declare enum NOTIFICATION_ACTION {
714
715
  PUSH = "PUSH",
@@ -915,6 +915,7 @@ var NOTIFICATION_MODULE_TYPE;
915
915
  (function (NOTIFICATION_MODULE_TYPE) {
916
916
  NOTIFICATION_MODULE_TYPE["ANNOUCEMENT"] = "ANNOUCEMENT";
917
917
  NOTIFICATION_MODULE_TYPE["INSTITUTE_JOINING_REQUEST"] = "INSTITUTE_JOINING_REQUEST";
918
+ NOTIFICATION_MODULE_TYPE["BIRTHDAY_WISH"] = "BIRTHDAY_WISH";
918
919
  })(NOTIFICATION_MODULE_TYPE || (exports.NOTIFICATION_MODULE_TYPE = NOTIFICATION_MODULE_TYPE = {}));
919
920
  var NOTIFICATION_ACTION;
920
921
  (function (NOTIFICATION_ACTION) {
@@ -15,11 +15,13 @@ const up = async (queryInterface, Sequelize) => {
15
15
  },
16
16
  offDayPattern: {
17
17
  type: Sequelize.ARRAY(Sequelize.INTEGER),
18
+ field: 'off_day_pattern',
18
19
  defaultValue: [],
19
20
  allowNull: true,
20
21
  },
21
22
  userType: {
22
23
  type: Sequelize.STRING,
24
+ field: 'user_type',
23
25
  defaultValue: 'TEACHER',
24
26
  allowNull: true,
25
27
  },
@@ -96,11 +98,13 @@ const up = async (queryInterface, Sequelize) => {
96
98
  },
97
99
  offDayPattern: {
98
100
  type: Sequelize.ARRAY(Sequelize.INTEGER),
101
+ field: 'off_day_pattern',
99
102
  defaultValue: [],
100
103
  allowNull: true,
101
104
  },
102
105
  userType: {
103
106
  type: Sequelize.STRING,
107
+ field: 'user_type',
104
108
  defaultValue: 'TEACHER',
105
109
  allowNull: true,
106
110
  },
@@ -122,7 +122,7 @@ const examHasAnswerSheetSchema = new mongoose_1.Schema({
122
122
  });
123
123
  // Add a pre-save hook to validate examId existence
124
124
  examHasAnswerSheetSchema.pre('save', async function (next) {
125
- const examExists = await examModel_1.default.findOne({ where: { id: this.examId } });
125
+ const examExists = await examModel_1.default.findOne({ id: this.examId });
126
126
  if (!examExists) {
127
127
  return next(new Error(errorMessages_1.EXAM_ERROR_MESSAGES.NOT_FOUND));
128
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.77",
3
+ "version": "1.1.79",
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",