@kipicore/dbcore 1.1.436 → 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.
@@ -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.436",
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",