@kipicore/dbcore 1.1.138 → 1.1.139

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.
@@ -1222,5 +1222,6 @@ export declare enum POLL_SELECTION_ERROR_MESSAGES {
1222
1222
  DELETE_FAIL = "Unable to delete Poll selection data!",
1223
1223
  NOT_FOUND = "Unable to find Poll selection data!",
1224
1224
  EXIST_POLL_OPTION = "You have already selected this option for the poll",
1225
- MAX_OPTION_ERROR = "You have reached the maximum number of options allowed for this poll."
1225
+ MAX_OPTION_ERROR = "You have reached the maximum number of options allowed for this poll.",
1226
+ POLL_EXPIRED = "This poll has expired and is no longer accepting selections."
1226
1227
  }
@@ -1357,4 +1357,5 @@ var POLL_SELECTION_ERROR_MESSAGES;
1357
1357
  POLL_SELECTION_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find Poll selection data!";
1358
1358
  POLL_SELECTION_ERROR_MESSAGES["EXIST_POLL_OPTION"] = "You have already selected this option for the poll";
1359
1359
  POLL_SELECTION_ERROR_MESSAGES["MAX_OPTION_ERROR"] = "You have reached the maximum number of options allowed for this poll.";
1360
+ POLL_SELECTION_ERROR_MESSAGES["POLL_EXPIRED"] = "This poll has expired and is no longer accepting selections.";
1360
1361
  })(POLL_SELECTION_ERROR_MESSAGES || (exports.POLL_SELECTION_ERROR_MESSAGES = POLL_SELECTION_ERROR_MESSAGES = {}));
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('account_has_receipt_details');
4
+ if (!table.academic_calendar_id) {
5
+ await queryInterface.renameColumn('account_has_receipt_details', 'academic_calender_id', // old col name
6
+ 'academic_calendar_id');
7
+ }
8
+ };
9
+ const down = async (queryInterface, Sequelize) => {
10
+ const table = await queryInterface.describeTable('account_has_receipt_details');
11
+ if (table.academic_calendar_id) {
12
+ await queryInterface.removeColumn('account_has_receipt_details', 'academic_calendar_id');
13
+ }
14
+ };
15
+ module.exports = {
16
+ up,
17
+ down,
18
+ };
@@ -24,4 +24,5 @@ export interface IAppointmentHistoryModelAttributes extends IDefaultAttributes,
24
24
  reScheduledDate?: Date;
25
25
  createdDate?: Date;
26
26
  childId?: string;
27
+ academicCalendarId?: string;
27
28
  }
@@ -24,4 +24,5 @@ export interface IAppointmentModelAttributes extends IDefaultAttributes, Documen
24
24
  scheduledDate?: Date;
25
25
  reScheduledDate?: Date;
26
26
  childId?: string;
27
+ academicCalendarId?: string;
27
28
  }
@@ -7,4 +7,5 @@ export interface IPollSelectionAttributes extends IDefaultAttributes, Document {
7
7
  optionId: string;
8
8
  academicCalendarId: string;
9
9
  instituteId: string;
10
+ expireAt: Date;
10
11
  }
@@ -38,6 +38,10 @@ const appointmentHistorySchema = new mongoose_1.Schema({
38
38
  date: {
39
39
  type: Date,
40
40
  },
41
+ academicCalendarId: {
42
+ type: String,
43
+ trim: true,
44
+ },
41
45
  appointmentNumber: {
42
46
  type: String,
43
47
  required: false,
@@ -38,6 +38,10 @@ const appointmentSchema = new mongoose_1.Schema({
38
38
  date: {
39
39
  type: Date,
40
40
  },
41
+ academicCalendarId: {
42
+ type: String,
43
+ trim: true,
44
+ },
41
45
  appointmentNumber: {
42
46
  type: String, // auto increment will handle from server side.
43
47
  required: false,
@@ -47,6 +47,10 @@ const PollSelectionSchema = new mongoose_1.Schema({
47
47
  type: String,
48
48
  required: true,
49
49
  },
50
+ expireAt: {
51
+ type: Date,
52
+ required: true,
53
+ },
50
54
  academicCalendarId: {
51
55
  type: String,
52
56
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.138",
3
+ "version": "1.1.139",
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",