@kipicore/dbcore 1.1.408 → 1.1.409

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.
@@ -2,7 +2,7 @@ import { Document } from 'mongoose';
2
2
  import { IDefaultAttributes } from './commonInterface';
3
3
  import { APP_TYPE } from '../constants';
4
4
  export interface IModulePriceList {
5
- moduleId: string;
5
+ moduleCode: string;
6
6
  price: number;
7
7
  expiredDate?: Date;
8
8
  }
@@ -40,7 +40,7 @@ const modulePriceModelSchema = new mongoose_1.Schema({
40
40
  title: { type: String, required: true },
41
41
  moduleList: [
42
42
  {
43
- moduleId: {
43
+ moduleCode: {
44
44
  type: String,
45
45
  required: true,
46
46
  validate: {
@@ -48,7 +48,7 @@ const modulePriceModelSchema = new mongoose_1.Schema({
48
48
  const appType = this.ownerDocument().appType;
49
49
  const module = await psql_1.ModuleModel.findOne({
50
50
  where: {
51
- id: value,
51
+ code: value,
52
52
  isDefault: true,
53
53
  roleId: null,
54
54
  appType,
@@ -56,7 +56,7 @@ const modulePriceModelSchema = new mongoose_1.Schema({
56
56
  });
57
57
  return !!module;
58
58
  },
59
- message: 'Invalid moduleId: module not found or not allowed',
59
+ message: 'Invalid module code: module not found or not allowed',
60
60
  },
61
61
  },
62
62
  price: { type: Number, required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.408",
3
+ "version": "1.1.409",
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",