@kipicore/dbcore 1.1.395 → 1.1.397

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.
@@ -773,7 +773,8 @@ export declare enum DISCOUNT_TYPE {
773
773
  }
774
774
  export declare enum SUBSCRIPTION_PLAN_CHARGE_INTERVAL {
775
775
  MONTHLY = "MONTHLY",
776
- YEARLY = "YEARLY"
776
+ YEARLY = "YEARLY",
777
+ CUSTOM = "CUSTOM"
777
778
  }
778
779
  export declare enum VALID_CURRENCY {
779
780
  COIN = "COIN",
@@ -983,6 +983,7 @@ var SUBSCRIPTION_PLAN_CHARGE_INTERVAL;
983
983
  (function (SUBSCRIPTION_PLAN_CHARGE_INTERVAL) {
984
984
  SUBSCRIPTION_PLAN_CHARGE_INTERVAL["MONTHLY"] = "MONTHLY";
985
985
  SUBSCRIPTION_PLAN_CHARGE_INTERVAL["YEARLY"] = "YEARLY";
986
+ SUBSCRIPTION_PLAN_CHARGE_INTERVAL["CUSTOM"] = "CUSTOM";
986
987
  })(SUBSCRIPTION_PLAN_CHARGE_INTERVAL || (exports.SUBSCRIPTION_PLAN_CHARGE_INTERVAL = SUBSCRIPTION_PLAN_CHARGE_INTERVAL = {}));
987
988
  var VALID_CURRENCY;
988
989
  (function (VALID_CURRENCY) {
@@ -17,6 +17,7 @@ export interface ISubscriptionPlanModelAttributes extends IDefaultAttributes, Do
17
17
  perUserCharge: number;
18
18
  perStudentCharge: number;
19
19
  chargeInterval: SUBSCRIPTION_PLAN_CHARGE_INTERVAL;
20
+ discount: number;
20
21
  discountType: DISCOUNT_TYPE;
21
22
  validCurrency: VALID_CURRENCY;
22
23
  moduleList: string[];
@@ -29,4 +30,5 @@ export interface ISubscriptionPlanModelAttributes extends IDefaultAttributes, Do
29
30
  isFree?: boolean;
30
31
  isTrial?: boolean;
31
32
  isCustom?: boolean;
33
+ validityInDays?: number;
32
34
  }
@@ -90,6 +90,11 @@ const subscriptionPlanModelSchema = new mongoose_1.Schema({
90
90
  default: app_1.SUBSCRIPTION_PLAN_CHARGE_INTERVAL.MONTHLY,
91
91
  required: true,
92
92
  },
93
+ discount: {
94
+ type: Number,
95
+ default: 0,
96
+ required: true,
97
+ },
93
98
  discountType: {
94
99
  type: String,
95
100
  default: app_1.DISCOUNT_TYPE.NONE,
@@ -136,6 +141,7 @@ const subscriptionPlanModelSchema = new mongoose_1.Schema({
136
141
  default: false,
137
142
  },
138
143
  sequence: { type: Number, required: false },
144
+ validityInDays: { type: Number, required: false },
139
145
  }, {
140
146
  timestamps: true,
141
147
  versionKey: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.395",
3
+ "version": "1.1.397",
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",