@kipicore/dbcore 1.1.435 → 1.1.437

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.
@@ -1094,7 +1094,9 @@ export declare enum MAINTENANCE_MODULE_NAME {
1094
1094
  KIPI_STORAGE = "KIPI_STORAGE",
1095
1095
  ID_CARD = "ID_CARD",
1096
1096
  BLOG = "BLOG",
1097
- QR_CODE_SCANNER = "QR_CODE_SCANNER"
1097
+ QR_CODE_SCANNER = "QR_CODE_SCANNER",
1098
+ CALL_REGISTER = "CALL_REGISTER",
1099
+ POSTAL_DISPATCH = "POSTAL_DISPATCH"
1098
1100
  }
1099
1101
  export declare enum APPOINTMENT_STATUS {
1100
1102
  COMPLETED = "COMPLETED",
@@ -1341,6 +1341,8 @@ var MAINTENANCE_MODULE_NAME;
1341
1341
  MAINTENANCE_MODULE_NAME["ID_CARD"] = "ID_CARD";
1342
1342
  MAINTENANCE_MODULE_NAME["BLOG"] = "BLOG";
1343
1343
  MAINTENANCE_MODULE_NAME["QR_CODE_SCANNER"] = "QR_CODE_SCANNER";
1344
+ MAINTENANCE_MODULE_NAME["CALL_REGISTER"] = "CALL_REGISTER";
1345
+ MAINTENANCE_MODULE_NAME["POSTAL_DISPATCH"] = "POSTAL_DISPATCH";
1344
1346
  })(MAINTENANCE_MODULE_NAME || (exports.MAINTENANCE_MODULE_NAME = MAINTENANCE_MODULE_NAME = {}));
1345
1347
  var APPOINTMENT_STATUS;
1346
1348
  (function (APPOINTMENT_STATUS) {
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('user_has_offer_and_discount');
4
+ if (!table.discount_breakdown) {
5
+ await queryInterface.addColumn('user_has_offer_and_discount', 'discount_breakdown', {
6
+ type: Sequelize.STRING,
7
+ field: 'note',
8
+ allowNull: true,
9
+ });
10
+ }
11
+ };
12
+ const down = async (queryInterface) => {
13
+ const table = await queryInterface.describeTable('user_has_offer_and_discount');
14
+ if (table.discount_breakdown) {
15
+ await queryInterface.removeColumn('user_has_offer_and_discount', 'discount_breakdown');
16
+ }
17
+ };
18
+ module.exports = {
19
+ up,
20
+ down,
21
+ };
@@ -12,4 +12,5 @@ export interface IUserHasOfferAndDiscountModelAttributes extends IDefaultAttribu
12
12
  applyDiscountAmount: number;
13
13
  offerApplyFor: OFFER_NAME;
14
14
  note?: string;
15
+ discountBreakdown?: string;
15
16
  }
@@ -13,6 +13,7 @@ declare class UserHasOfferAndDiscountModel extends Model<IUserHasOfferAndDiscoun
13
13
  applyDiscountAmount: number;
14
14
  offerApplyFor: OFFER_NAME;
15
15
  note: string;
16
+ discountBreakdown: string;
16
17
  createdBy: string;
17
18
  updatedBy: string;
18
19
  deletedBy: string;
@@ -100,6 +100,10 @@ UserHasOfferAndDiscountModel.init({
100
100
  type: sequelize_1.DataTypes.STRING,
101
101
  allowNull: true,
102
102
  },
103
+ discountBreakdown: {
104
+ type: sequelize_1.DataTypes.STRING,
105
+ allowNull: true,
106
+ },
103
107
  }, {
104
108
  sequelize: index_1.sequelize,
105
109
  modelName: 'UserHasOfferAndDiscountModel',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.435",
3
+ "version": "1.1.437",
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",