@kipicore/dbcore 1.1.701 → 1.1.703

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.
@@ -8,7 +8,7 @@ module.exports = {
8
8
  type: Sequelize.UUID,
9
9
  allowNull: true,
10
10
  references: {
11
- model: 'categories',
11
+ model: 'sport_categories',
12
12
  key: 'id',
13
13
  },
14
14
  onUpdate: 'CASCADE',
@@ -5,6 +5,7 @@ export interface IAssessmentTestTargetSkill {
5
5
  skillId: string;
6
6
  ageGroupId?: string;
7
7
  minValue?: number;
8
+ value?: string;
8
9
  }
9
10
  export interface IAssessmentTestModelAttributes extends IDefaultAttributes, Document {
10
11
  id: string;
@@ -13,8 +13,8 @@ export interface ISportInfoModelAttributes extends IDefaultAttributes, Document
13
13
  setupGuide?: string;
14
14
  images?: string[];
15
15
  documents?: string[];
16
- categories?: string[];
17
- subCategories?: string[];
16
+ categories?: string;
17
+ subCategories?: string;
18
18
  equipments?: string[];
19
19
  amenitiesNeeded?: string[];
20
20
  infrastructure?: string[];
@@ -39,6 +39,7 @@ const targetSkillSchema = new mongoose_1.Schema({
39
39
  skillId: { type: String, required: true },
40
40
  ageGroupId: { type: String, required: false },
41
41
  minValue: { type: Number, required: false },
42
+ value: { type: String, required: false },
42
43
  }, { _id: false });
43
44
  const assessmentTestSchema = new mongoose_1.Schema({
44
45
  sportId: { type: String, required: false },
@@ -47,8 +47,8 @@ const sportInfoSchema = new mongoose_1.Schema({
47
47
  setupGuide: { type: String, required: false },
48
48
  images: { type: [String], required: false, default: [] },
49
49
  documents: { type: [String], required: false, default: [] },
50
- categories: { type: [String], required: false, default: [] },
51
- subCategories: { type: [String], required: false, default: [] },
50
+ categories: { type: String, required: false },
51
+ subCategories: { type: String, required: false },
52
52
  equipments: { type: [String], required: false, default: [] },
53
53
  amenitiesNeeded: { type: [String], required: false, default: [] },
54
54
  infrastructure: { type: [String], required: false, default: [] },
@@ -17,12 +17,12 @@ class FacilityMasterModel extends sequelize_1.Model {
17
17
  foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
18
18
  as: 'deletedByUser',
19
19
  });
20
- const { CategoriesModel } = models;
21
- FacilityMasterModel.belongsTo(CategoriesModel, {
20
+ const { SportCategoryModel } = models;
21
+ FacilityMasterModel.belongsTo(SportCategoryModel, {
22
22
  foreignKey: { name: 'categoryId', allowNull: true, field: 'category_id' },
23
23
  as: 'category',
24
24
  });
25
- CategoriesModel.hasMany(FacilityMasterModel, {
25
+ SportCategoryModel.hasMany(FacilityMasterModel, {
26
26
  foreignKey: { name: 'categoryId', allowNull: true, field: 'category_id' },
27
27
  as: 'facilityMasters',
28
28
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.701",
3
+ "version": "1.1.703",
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",