@kipicore/dbcore 1.1.687 → 1.1.688
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.
- package/dist/configs/env.d.ts +0 -2
- package/dist/configs/env.js +0 -4
- package/dist/configs/index.d.ts +0 -2
- package/dist/configs/index.js +0 -2
- package/dist/constants/app.d.ts +29 -27
- package/dist/constants/app.js +39 -37
- package/dist/constants/errorMessages.d.ts +1 -20
- package/dist/constants/errorMessages.js +1 -22
- package/dist/constants/successMessages.d.ts +0 -14
- package/dist/constants/successMessages.js +1 -17
- package/dist/db/psql/migrations/20260714095754-create-arena-models.js +642 -0
- package/dist/db/psql/migrations/20260720092201-replace-facility-sports-with-sport-group-data.d.ts +2 -0
- package/dist/db/psql/migrations/20260720092201-replace-facility-sports-with-sport-group-data.js +138 -0
- package/dist/db/psql/migrations/20260722143500-create-school_has_sports.js +71 -0
- package/dist/db/psql/migrations/20260728170500-add_sports_academy_id_to_testimonials.js +21 -0
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.js +0 -3
- package/dist/helpers/utils.d.ts +3 -5
- package/dist/helpers/utils.js +31 -58
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -4
- package/dist/interfaces/ageGroupInterface.d.ts +12 -0
- package/dist/interfaces/amenityInterface.d.ts +23 -0
- package/dist/interfaces/assessmentTestInterface.d.ts +23 -0
- package/dist/interfaces/assessmentTestInterface.js +2 -0
- package/dist/interfaces/categoriesInterface.d.ts +1 -2
- package/dist/interfaces/equipmentInterface.d.ts +10 -0
- package/dist/interfaces/equipmentInterface.js +2 -0
- package/dist/interfaces/facilityMasterInterface.d.ts +9 -0
- package/dist/interfaces/facilityMasterInterface.js +2 -0
- package/dist/interfaces/index.d.ts +17 -1
- package/dist/interfaces/index.js +18 -1
- package/dist/interfaces/instituteInterface.d.ts +0 -1
- package/dist/interfaces/instituteOwnershipHistoryInterface.d.ts +1 -2
- package/dist/interfaces/institutePartnersInterface.d.ts +1 -2
- package/dist/interfaces/photosGalleryInterface.d.ts +3 -1
- package/dist/interfaces/schoolHasSportInterface.d.ts +7 -0
- package/dist/interfaces/schoolHasSportInterface.js +2 -0
- package/dist/interfaces/skillInterface.d.ts +19 -0
- package/dist/interfaces/skillInterface.js +2 -0
- package/dist/interfaces/sportCategoryInterface.d.ts +9 -0
- package/dist/interfaces/sportCategoryInterface.js +2 -0
- package/dist/interfaces/sportGroupDataInterface.d.ts +7 -0
- package/dist/interfaces/sportGroupDataInterface.js +2 -0
- package/dist/interfaces/sportInfoInterface.d.ts +23 -0
- package/dist/interfaces/sportInfoInterface.js +2 -0
- package/dist/interfaces/sportInterface.d.ts +10 -0
- package/dist/interfaces/sportInterface.js +2 -0
- package/dist/interfaces/sportRoleInterface.d.ts +11 -0
- package/dist/interfaces/sportRoleInterface.js +2 -0
- package/dist/interfaces/sportSubCategoryInterface.d.ts +10 -0
- package/dist/interfaces/sportSubCategoryInterface.js +2 -0
- package/dist/interfaces/sportsAcademyInterface.d.ts +39 -0
- package/dist/interfaces/sportsAcademyInterface.js +2 -0
- package/dist/interfaces/studentSportTestInterface.d.ts +20 -0
- package/dist/interfaces/studentSportTestInterface.js +2 -0
- package/dist/interfaces/subCategoriesInterface.d.ts +1 -2
- package/dist/interfaces/subscriptionPlanInterface.d.ts +1 -2
- package/dist/interfaces/testimonialInterface.d.ts +1 -0
- package/dist/interfaces/unitInterface.d.ts +10 -0
- package/dist/interfaces/unitInterface.js +2 -0
- package/dist/interfaces/userAcademyMetaInterface.d.ts +18 -0
- package/dist/interfaces/userAcademyMetaInterface.js +2 -0
- package/dist/interfaces/userAmenityInterface.d.ts +23 -0
- package/dist/interfaces/userAmenityInterface.js +2 -0
- package/dist/interfaces/userInterface.d.ts +1 -3
- package/dist/interfaces/vendorCompanyMetaInterface.d.ts +2 -5
- package/dist/models/mongodb/amenityModel.d.ts +4 -0
- package/dist/models/mongodb/amenityModel.js +72 -0
- package/dist/models/mongodb/assessmentTestModel.d.ts +4 -0
- package/dist/models/mongodb/assessmentTestModel.js +72 -0
- package/dist/models/mongodb/index.d.ts +6 -0
- package/dist/models/mongodb/index.js +14 -1
- package/dist/models/mongodb/photosGalleryModel.js +5 -1
- package/dist/models/mongodb/productMetaModel.js +1 -9
- package/dist/models/mongodb/sportInfoModel.d.ts +4 -0
- package/dist/models/mongodb/sportInfoModel.js +71 -0
- package/dist/models/mongodb/sportsAcademyModel.d.ts +4 -0
- package/dist/models/mongodb/sportsAcademyModel.js +89 -0
- package/dist/models/mongodb/studentSportTestModel.d.ts +4 -0
- package/dist/models/mongodb/studentSportTestModel.js +68 -0
- package/dist/models/mongodb/subscriptionPlanModel.js +0 -5
- package/dist/models/mongodb/userAcademyMetaModel.d.ts +4 -0
- package/dist/models/mongodb/userAcademyMetaModel.js +113 -0
- package/dist/models/mongodb/userAmenityModel.d.ts +4 -0
- package/dist/models/mongodb/userAmenityModel.js +72 -0
- package/dist/models/mongodb/vendorCompanyMetaModel.js +1 -15
- package/dist/models/psql/SubCategoriesModel.d.ts +1 -2
- package/dist/models/psql/SubCategoriesModel.js +0 -5
- package/dist/models/psql/ageGroupModel.d.ts +22 -0
- package/dist/models/psql/ageGroupModel.js +76 -0
- package/dist/models/psql/categoriesModel.d.ts +1 -2
- package/dist/models/psql/categoriesModel.js +0 -5
- package/dist/models/psql/equipmentModel.d.ts +20 -0
- package/dist/models/psql/equipmentModel.js +57 -0
- package/dist/models/psql/facilityMasterModel.d.ts +18 -0
- package/dist/models/psql/facilityMasterModel.js +64 -0
- package/dist/models/psql/fileStorageModel.js +4 -3
- package/dist/models/psql/index.d.ts +11 -1
- package/dist/models/psql/index.js +25 -4
- package/dist/models/psql/instituteModel.d.ts +0 -1
- package/dist/models/psql/instituteModel.js +2 -5
- package/dist/models/psql/instituteOwnershipHistoryModel.d.ts +1 -2
- package/dist/models/psql/instituteOwnershipHistoryModel.js +3 -8
- package/dist/models/psql/institutePartnersModel.d.ts +1 -2
- package/dist/models/psql/institutePartnersModel.js +3 -8
- package/dist/models/psql/schoolHasSportModel.d.ts +17 -0
- package/dist/models/psql/schoolHasSportModel.js +76 -0
- package/dist/models/psql/skillModel.d.ts +25 -0
- package/dist/models/psql/skillModel.js +99 -0
- package/dist/models/psql/sportCategoryModel.d.ts +19 -0
- package/dist/models/psql/sportCategoryModel.js +53 -0
- package/dist/models/psql/sportGroupDataModel.d.ts +13 -0
- package/dist/models/psql/sportGroupDataModel.js +64 -0
- package/dist/models/psql/sportModel.d.ts +20 -0
- package/dist/models/psql/sportModel.js +58 -0
- package/dist/models/psql/sportRoleModel.d.ts +21 -0
- package/dist/models/psql/sportRoleModel.js +71 -0
- package/dist/models/psql/sportSubCategoryModel.d.ts +20 -0
- package/dist/models/psql/sportSubCategoryModel.js +75 -0
- package/dist/models/psql/testimonialModel.d.ts +1 -0
- package/dist/models/psql/testimonialModel.js +8 -7
- package/dist/models/psql/unitModel.d.ts +20 -0
- package/dist/models/psql/unitModel.js +57 -0
- package/dist/models/psql/userModel.d.ts +1 -3
- package/dist/models/psql/userModel.js +2 -2
- package/dist/types/ageGroupType.d.ts +2 -0
- package/dist/types/ageGroupType.js +2 -0
- package/dist/types/assessmentTestType.d.ts +2 -0
- package/dist/types/assessmentTestType.js +2 -0
- package/dist/types/commonType.d.ts +1 -29
- package/dist/types/equipmentType.d.ts +2 -0
- package/dist/types/equipmentType.js +2 -0
- package/dist/types/facilityMasterType.d.ts +3 -0
- package/dist/types/facilityMasterType.js +2 -0
- package/dist/types/index.d.ts +17 -1
- package/dist/types/index.js +18 -1
- package/dist/types/schoolHasSportType.d.ts +2 -0
- package/dist/types/schoolHasSportType.js +2 -0
- package/dist/types/skillType.d.ts +2 -0
- package/dist/types/skillType.js +2 -0
- package/dist/types/sportCategoryType.d.ts +2 -0
- package/dist/types/sportCategoryType.js +2 -0
- package/dist/types/sportGroupDataType.d.ts +3 -0
- package/dist/types/sportGroupDataType.js +2 -0
- package/dist/types/sportInfoType.d.ts +2 -0
- package/dist/types/sportInfoType.js +2 -0
- package/dist/types/sportRoleType.d.ts +2 -0
- package/dist/types/sportRoleType.js +2 -0
- package/dist/types/sportSubCategoryType.d.ts +2 -0
- package/dist/types/sportSubCategoryType.js +2 -0
- package/dist/types/sportType.d.ts +2 -0
- package/dist/types/sportType.js +2 -0
- package/dist/types/sportsAcademyType.d.ts +2 -0
- package/dist/types/sportsAcademyType.js +2 -0
- package/dist/types/studentSportTestType.d.ts +2 -0
- package/dist/types/studentSportTestType.js +2 -0
- package/dist/types/unitType.d.ts +2 -0
- package/dist/types/unitType.js +2 -0
- package/dist/types/userAcademyMetaType.d.ts +2 -0
- package/dist/types/userAcademyMetaType.js +2 -0
- package/dist/types/userAmenityType.d.ts +2 -0
- package/dist/types/userAmenityType.js +2 -0
- package/package.json +2 -10
- package/dist/commonValidator/commandValidator.d.ts +0 -27
- package/dist/commonValidator/commandValidator.js +0 -225
- package/dist/commonValidator/index.d.ts +0 -3
- package/dist/commonValidator/index.js +0 -24
- package/dist/commonValidator/joiCommonValidator.d.ts +0 -12
- package/dist/commonValidator/joiCommonValidator.js +0 -47
- package/dist/commonValidator/joiSchemaBuilder.d.ts +0 -6
- package/dist/commonValidator/joiSchemaBuilder.js +0 -70
- package/dist/configs/logger.d.ts +0 -2
- package/dist/configs/logger.js +0 -44
- package/dist/configs/redisConfig.d.ts +0 -4
- package/dist/configs/redisConfig.js +0 -32
- package/dist/db/psql/migrations/20260714111425-change_status_enum_to_string_in_institutes.js +0 -46
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.js +0 -20
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.js +0 -156
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.d.ts +0 -2
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.js +0 -19
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.d.ts +0 -2
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.js +0 -19
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.d.ts +0 -2
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.js +0 -19
- package/dist/db/psql/migrations/20260721000001-add-deleted-at-to-rms-maintenance-activities.d.ts +0 -2
- package/dist/db/psql/migrations/20260721000001-add-deleted-at-to-rms-maintenance-activities.js +0 -12
- package/dist/db/psql/migrations/20260721000002-change-uploaded-from-enum-to-string-in-file-storage.d.ts +0 -2
- package/dist/db/psql/migrations/20260721000002-change-uploaded-from-enum-to-string-in-file-storage.js +0 -42
- package/dist/db/psql/migrations/20260722130134-add_portfolio_theme_to_users.d.ts +0 -2
- package/dist/db/psql/migrations/20260722130134-add_portfolio_theme_to_users.js +0 -22
- package/dist/db/psql/migrations/20260727123149-add_vendorCompanyId_to_institute_ownership_histories.d.ts +0 -2
- package/dist/db/psql/migrations/20260727123149-add_vendorCompanyId_to_institute_ownership_histories.js +0 -23
- package/dist/db/psql/migrations/20260727130802-add_vendorCompanyId_to_institute_partners.d.ts +0 -2
- package/dist/db/psql/migrations/20260727130802-add_vendorCompanyId_to_institute_partners.js +0 -23
- package/dist/db/psql/migrations/20260727132312-make_instituteId_and_vendorCompanyId_optional_in_institute_partners.d.ts +0 -2
- package/dist/db/psql/migrations/20260727132312-make_instituteId_and_vendorCompanyId_optional_in_institute_partners.js +0 -28
- package/dist/db/psql/migrations/20260727132747-make_instituteId_and_vendorCompanyId_optional_in_institute_ownership_histories.d.ts +0 -2
- package/dist/db/psql/migrations/20260727132747-make_instituteId_and_vendorCompanyId_optional_in_institute_ownership_histories.js +0 -25
- package/dist/helpers/sendEmail.d.ts +0 -3
- package/dist/helpers/sendEmail.js +0 -117
- package/dist/helpers/sendNotification.d.ts +0 -4
- package/dist/helpers/sendNotification.js +0 -34
- package/dist/helpers/sendSMS.d.ts +0 -5
- package/dist/helpers/sendSMS.js +0 -34
- package/dist/interfaces/aiModelKeysInterface.d.ts +0 -15
- package/dist/models/psql/aiModelKeysModel.d.ts +0 -20
- package/dist/models/psql/aiModelKeysModel.js +0 -70
- package/dist/queues/emailQueue.d.ts +0 -3
- package/dist/queues/emailQueue.js +0 -22
- package/dist/queues/emailWorker.d.ts +0 -3
- package/dist/queues/emailWorker.js +0 -33
- package/dist/queues/index.d.ts +0 -2
- package/dist/queues/index.js +0 -18
- package/dist/types/aiModelKeysType.d.ts +0 -3
- /package/dist/db/psql/migrations/{20260714111425-change_status_enum_to_string_in_institutes.d.ts → 20260714095754-create-arena-models.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20260714131500-add_note_to_institutes.d.ts → 20260722143500-create-school_has_sports.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20260715150000-create-ai-model-keys.d.ts → 20260728170500-add_sports_academy_id_to_testimonials.d.ts} +0 -0
- /package/dist/interfaces/{aiModelKeysInterface.js → ageGroupInterface.js} +0 -0
- /package/dist/{types/aiModelKeysType.js → interfaces/amenityInterface.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { ISportModelAttributes } from '../../interfaces/sportInterface';
|
|
3
|
+
import { TSportModelCreationAttributes } from '../../types/sportType';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
+
export declare class SportModel extends Model<ISportModelAttributes, TSportModelCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
code: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
status: COMMAN_STATUS;
|
|
12
|
+
createdBy?: string;
|
|
13
|
+
updatedBy?: string;
|
|
14
|
+
deletedBy?: string;
|
|
15
|
+
readonly createdAt: Date;
|
|
16
|
+
readonly updatedAt: Date;
|
|
17
|
+
readonly deletedAt?: string;
|
|
18
|
+
static associate(models: any): void;
|
|
19
|
+
}
|
|
20
|
+
export default SportModel;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SportModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class SportModel extends sequelize_1.Model {
|
|
7
|
+
static associate(models) {
|
|
8
|
+
const { UserModel, FileStorageModel } = models;
|
|
9
|
+
SportModel.belongsTo(FileStorageModel, { foreignKey: 'icon', as: 'iconFile' });
|
|
10
|
+
SportModel.belongsTo(UserModel, {
|
|
11
|
+
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
12
|
+
as: 'createdByUser',
|
|
13
|
+
});
|
|
14
|
+
SportModel.belongsTo(UserModel, {
|
|
15
|
+
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
16
|
+
as: 'updatedByUser',
|
|
17
|
+
});
|
|
18
|
+
SportModel.belongsTo(UserModel, {
|
|
19
|
+
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
20
|
+
as: 'deletedByUser',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.SportModel = SportModel;
|
|
25
|
+
SportModel.init({
|
|
26
|
+
id: {
|
|
27
|
+
type: sequelize_1.DataTypes.UUID,
|
|
28
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
29
|
+
allowNull: false,
|
|
30
|
+
primaryKey: true,
|
|
31
|
+
},
|
|
32
|
+
name: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING,
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
code: {
|
|
37
|
+
type: sequelize_1.DataTypes.STRING,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
icon: {
|
|
45
|
+
type: sequelize_1.DataTypes.UUID,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
},
|
|
48
|
+
status: {
|
|
49
|
+
type: sequelize_1.DataTypes.STRING,
|
|
50
|
+
allowNull: true,
|
|
51
|
+
},
|
|
52
|
+
}, {
|
|
53
|
+
modelName: 'SportModel',
|
|
54
|
+
tableName: 'sports',
|
|
55
|
+
timestamps: true,
|
|
56
|
+
sequelize: index_1.sequelize,
|
|
57
|
+
});
|
|
58
|
+
exports.default = SportModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { ISportRoleModelAttributes } from '../../interfaces/sportRoleInterface';
|
|
3
|
+
import { TSportRoleModelCreationAttributes } from '../../types/sportRoleType';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
+
export declare class SportRoleModel extends Model<ISportRoleModelAttributes, TSportRoleModelCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
sportId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
status: COMMAN_STATUS;
|
|
13
|
+
createdBy?: string;
|
|
14
|
+
updatedBy?: string;
|
|
15
|
+
deletedBy?: string;
|
|
16
|
+
readonly createdAt: Date;
|
|
17
|
+
readonly updatedAt: Date;
|
|
18
|
+
readonly deletedAt?: string;
|
|
19
|
+
static associate(models: any): void;
|
|
20
|
+
}
|
|
21
|
+
export default SportRoleModel;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SportRoleModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class SportRoleModel extends sequelize_1.Model {
|
|
7
|
+
static associate(models) {
|
|
8
|
+
const { UserModel, SportModel, FileStorageModel } = models;
|
|
9
|
+
SportRoleModel.belongsTo(FileStorageModel, { foreignKey: 'icon', as: 'iconFile' });
|
|
10
|
+
SportRoleModel.belongsTo(UserModel, {
|
|
11
|
+
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
12
|
+
as: 'createdByUser',
|
|
13
|
+
});
|
|
14
|
+
SportRoleModel.belongsTo(UserModel, {
|
|
15
|
+
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
16
|
+
as: 'updatedByUser',
|
|
17
|
+
});
|
|
18
|
+
SportRoleModel.belongsTo(UserModel, {
|
|
19
|
+
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
20
|
+
as: 'deletedByUser',
|
|
21
|
+
});
|
|
22
|
+
SportRoleModel.belongsTo(SportModel, {
|
|
23
|
+
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
24
|
+
as: 'sportRoleSport',
|
|
25
|
+
});
|
|
26
|
+
SportModel.hasMany(SportRoleModel, {
|
|
27
|
+
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
28
|
+
as: 'sportHasSportRoleList',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.SportRoleModel = SportRoleModel;
|
|
33
|
+
SportRoleModel.init({
|
|
34
|
+
id: {
|
|
35
|
+
type: sequelize_1.DataTypes.UUID,
|
|
36
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
37
|
+
allowNull: false,
|
|
38
|
+
primaryKey: true,
|
|
39
|
+
},
|
|
40
|
+
sportId: {
|
|
41
|
+
type: sequelize_1.DataTypes.UUID,
|
|
42
|
+
field: 'sport_id',
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
name: {
|
|
46
|
+
type: sequelize_1.DataTypes.STRING,
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
code: {
|
|
50
|
+
type: sequelize_1.DataTypes.STRING,
|
|
51
|
+
allowNull: true,
|
|
52
|
+
},
|
|
53
|
+
description: {
|
|
54
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
55
|
+
allowNull: true,
|
|
56
|
+
},
|
|
57
|
+
icon: {
|
|
58
|
+
type: sequelize_1.DataTypes.UUID,
|
|
59
|
+
allowNull: true,
|
|
60
|
+
},
|
|
61
|
+
status: {
|
|
62
|
+
type: sequelize_1.DataTypes.STRING,
|
|
63
|
+
allowNull: true,
|
|
64
|
+
},
|
|
65
|
+
}, {
|
|
66
|
+
modelName: 'SportRoleModel',
|
|
67
|
+
tableName: 'sport_roles',
|
|
68
|
+
timestamps: true,
|
|
69
|
+
sequelize: index_1.sequelize,
|
|
70
|
+
});
|
|
71
|
+
exports.default = SportRoleModel;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { ISportSubCategoryModelAttributes } from '../../interfaces/sportSubCategoryInterface';
|
|
3
|
+
import { TSportSubCategoryModelCreationAttributes } from '../../types/sportSubCategoryType';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
+
export declare class SportSubCategoryModel extends Model<ISportSubCategoryModelAttributes, TSportSubCategoryModelCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
sportId: string;
|
|
8
|
+
categoryId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
code: string;
|
|
11
|
+
status: COMMAN_STATUS;
|
|
12
|
+
createdBy?: string;
|
|
13
|
+
updatedBy?: string;
|
|
14
|
+
deletedBy?: string;
|
|
15
|
+
readonly createdAt: Date;
|
|
16
|
+
readonly updatedAt: Date;
|
|
17
|
+
readonly deletedAt?: string;
|
|
18
|
+
static associate(models: any): void;
|
|
19
|
+
}
|
|
20
|
+
export default SportSubCategoryModel;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SportSubCategoryModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class SportSubCategoryModel extends sequelize_1.Model {
|
|
7
|
+
static associate(models) {
|
|
8
|
+
const { UserModel, SportModel, SportCategoryModel } = models;
|
|
9
|
+
SportSubCategoryModel.belongsTo(UserModel, {
|
|
10
|
+
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
|
+
as: 'createdByUser',
|
|
12
|
+
});
|
|
13
|
+
SportSubCategoryModel.belongsTo(UserModel, {
|
|
14
|
+
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
15
|
+
as: 'updatedByUser',
|
|
16
|
+
});
|
|
17
|
+
SportSubCategoryModel.belongsTo(UserModel, {
|
|
18
|
+
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
19
|
+
as: 'deletedByUser',
|
|
20
|
+
});
|
|
21
|
+
SportSubCategoryModel.belongsTo(SportModel, {
|
|
22
|
+
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
23
|
+
as: 'sportSubCategorySport',
|
|
24
|
+
});
|
|
25
|
+
SportModel.hasMany(SportSubCategoryModel, {
|
|
26
|
+
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
27
|
+
as: 'sportHasSportSubCategoryList',
|
|
28
|
+
});
|
|
29
|
+
SportSubCategoryModel.belongsTo(SportCategoryModel, {
|
|
30
|
+
foreignKey: { name: 'categoryId', allowNull: true, field: 'category_id' },
|
|
31
|
+
as: 'sportSubCategoryCategory',
|
|
32
|
+
});
|
|
33
|
+
SportCategoryModel.hasMany(SportSubCategoryModel, {
|
|
34
|
+
foreignKey: { name: 'categoryId', allowNull: true, field: 'category_id' },
|
|
35
|
+
as: 'categoryHasSportSubCategoryList',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SportSubCategoryModel = SportSubCategoryModel;
|
|
40
|
+
SportSubCategoryModel.init({
|
|
41
|
+
id: {
|
|
42
|
+
type: sequelize_1.DataTypes.UUID,
|
|
43
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
primaryKey: true,
|
|
46
|
+
},
|
|
47
|
+
sportId: {
|
|
48
|
+
type: sequelize_1.DataTypes.UUID,
|
|
49
|
+
field: 'sport_id',
|
|
50
|
+
allowNull: true,
|
|
51
|
+
},
|
|
52
|
+
categoryId: {
|
|
53
|
+
type: sequelize_1.DataTypes.UUID,
|
|
54
|
+
field: 'category_id',
|
|
55
|
+
allowNull: true,
|
|
56
|
+
},
|
|
57
|
+
name: {
|
|
58
|
+
type: sequelize_1.DataTypes.STRING,
|
|
59
|
+
allowNull: true,
|
|
60
|
+
},
|
|
61
|
+
code: {
|
|
62
|
+
type: sequelize_1.DataTypes.STRING,
|
|
63
|
+
allowNull: true,
|
|
64
|
+
},
|
|
65
|
+
status: {
|
|
66
|
+
type: sequelize_1.DataTypes.STRING,
|
|
67
|
+
allowNull: true,
|
|
68
|
+
},
|
|
69
|
+
}, {
|
|
70
|
+
modelName: 'SportSubCategoryModel',
|
|
71
|
+
tableName: 'sport_sub_categories',
|
|
72
|
+
timestamps: true,
|
|
73
|
+
sequelize: index_1.sequelize,
|
|
74
|
+
});
|
|
75
|
+
exports.default = SportSubCategoryModel;
|
|
@@ -65,7 +65,7 @@ class TestimonialModel extends sequelize_1.Model {
|
|
|
65
65
|
const { InstituteModel, UserModel, InstituteEntityModel } = models;
|
|
66
66
|
const beforeCreateOrUpdateHook = async (testimonial) => {
|
|
67
67
|
let institute = null;
|
|
68
|
-
if (testimonial
|
|
68
|
+
if (testimonial?.instituteId) {
|
|
69
69
|
institute = await InstituteModel.findByPk(testimonial.instituteId);
|
|
70
70
|
if (!institute) {
|
|
71
71
|
throw new Error(errorMessages_1.INSTITUTE_ERROR_MESSAGES.NOT_FOUND);
|
|
@@ -80,7 +80,7 @@ class TestimonialModel extends sequelize_1.Model {
|
|
|
80
80
|
testimonial.userType = user.type;
|
|
81
81
|
}
|
|
82
82
|
testimonial.class = `${(0, utils_1.fromSnakeCaseToNormalText)(testimonial.userType)}`;
|
|
83
|
-
if (testimonial.userId && testimonial
|
|
83
|
+
if (testimonial.userId && testimonial?.instituteId && testimonial.userType !== app_1.USER_TYPES.PARENTS) {
|
|
84
84
|
const userInstituteMetaWhere = {
|
|
85
85
|
userId: testimonial.userId,
|
|
86
86
|
instituteId: testimonial.instituteId,
|
|
@@ -105,11 +105,7 @@ class TestimonialModel extends sequelize_1.Model {
|
|
|
105
105
|
association: 'entityType',
|
|
106
106
|
required: true,
|
|
107
107
|
where: {
|
|
108
|
-
[sequelize_1.Op.or]: [
|
|
109
|
-
{ title: { [sequelize_1.Op.iLike]: 'STANDARD' } },
|
|
110
|
-
{ title: { [sequelize_1.Op.iLike]: 'MEDIUM' } },
|
|
111
|
-
{ title: { [sequelize_1.Op.iLike]: 'SECTIONS' } },
|
|
112
|
-
],
|
|
108
|
+
[sequelize_1.Op.or]: [{ title: { [sequelize_1.Op.iLike]: 'STANDARD' } }, { title: { [sequelize_1.Op.iLike]: 'MEDIUM' } }, { title: { [sequelize_1.Op.iLike]: 'SECTIONS' } }],
|
|
113
109
|
},
|
|
114
110
|
},
|
|
115
111
|
});
|
|
@@ -172,6 +168,11 @@ TestimonialModel.init({
|
|
|
172
168
|
field: 'academic_calendar_id',
|
|
173
169
|
allowNull: true,
|
|
174
170
|
},
|
|
171
|
+
sportsAcademyId: {
|
|
172
|
+
type: sequelize_1.DataTypes.STRING,
|
|
173
|
+
field: 'sports_academy_id',
|
|
174
|
+
allowNull: true,
|
|
175
|
+
},
|
|
175
176
|
}, {
|
|
176
177
|
modelName: 'TestimonialModel',
|
|
177
178
|
tableName: 'testimonials',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { IUnitModelAttributes } from '../../interfaces/unitInterface';
|
|
3
|
+
import { TUnitModelCreationAttributes } from '../../types/unitType';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
+
export declare class UnitModel extends Model<IUnitModelAttributes, TUnitModelCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
code: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
status: COMMAN_STATUS;
|
|
12
|
+
createdBy?: string;
|
|
13
|
+
updatedBy?: string;
|
|
14
|
+
deletedBy?: string;
|
|
15
|
+
readonly createdAt: Date;
|
|
16
|
+
readonly updatedAt: Date;
|
|
17
|
+
readonly deletedAt?: string;
|
|
18
|
+
static associate(models: any): void;
|
|
19
|
+
}
|
|
20
|
+
export default UnitModel;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnitModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class UnitModel extends sequelize_1.Model {
|
|
7
|
+
static associate(models) {
|
|
8
|
+
const { UserModel } = models;
|
|
9
|
+
UnitModel.belongsTo(UserModel, {
|
|
10
|
+
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
|
+
as: 'createdByUser',
|
|
12
|
+
});
|
|
13
|
+
UnitModel.belongsTo(UserModel, {
|
|
14
|
+
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
15
|
+
as: 'updatedByUser',
|
|
16
|
+
});
|
|
17
|
+
UnitModel.belongsTo(UserModel, {
|
|
18
|
+
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
19
|
+
as: 'deletedByUser',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.UnitModel = UnitModel;
|
|
24
|
+
UnitModel.init({
|
|
25
|
+
id: {
|
|
26
|
+
type: sequelize_1.DataTypes.UUID,
|
|
27
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
28
|
+
allowNull: false,
|
|
29
|
+
primaryKey: true,
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
type: sequelize_1.DataTypes.STRING,
|
|
33
|
+
allowNull: true,
|
|
34
|
+
},
|
|
35
|
+
code: {
|
|
36
|
+
type: sequelize_1.DataTypes.STRING,
|
|
37
|
+
allowNull: true,
|
|
38
|
+
},
|
|
39
|
+
symbol: {
|
|
40
|
+
type: sequelize_1.DataTypes.STRING,
|
|
41
|
+
allowNull: true,
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
45
|
+
allowNull: true,
|
|
46
|
+
},
|
|
47
|
+
status: {
|
|
48
|
+
type: sequelize_1.DataTypes.STRING,
|
|
49
|
+
allowNull: true,
|
|
50
|
+
},
|
|
51
|
+
}, {
|
|
52
|
+
modelName: 'UnitModel',
|
|
53
|
+
tableName: 'units',
|
|
54
|
+
timestamps: true,
|
|
55
|
+
sequelize: index_1.sequelize,
|
|
56
|
+
});
|
|
57
|
+
exports.default = UnitModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { APP_TYPE, EMAIL_VERIFICATION, MOBILE_VERIFICATION,
|
|
2
|
+
import { APP_TYPE, EMAIL_VERIFICATION, MOBILE_VERIFICATION, USER_TYPES } from '../../constants/app';
|
|
3
3
|
import { IUserAttributes } from '../../interfaces/userInterface';
|
|
4
4
|
import { TUserCreationAttributes } from '../../types/userType';
|
|
5
5
|
declare class UserModel extends Model<IUserAttributes, TUserCreationAttributes> implements IUserAttributes {
|
|
@@ -44,8 +44,6 @@ declare class UserModel extends Model<IUserAttributes, TUserCreationAttributes>
|
|
|
44
44
|
district?: string;
|
|
45
45
|
area?: string;
|
|
46
46
|
taluka?: string;
|
|
47
|
-
status?: USER_STATUS;
|
|
48
|
-
portfolioTheme?: string;
|
|
49
47
|
readonly createdAt: Date;
|
|
50
48
|
readonly deletedAt: string;
|
|
51
49
|
readonly updatedAt: Date;
|
|
@@ -75,6 +75,8 @@ class UserModel extends sequelize_1.Model {
|
|
|
75
75
|
[app_1.USER_TYPES.PARENTS]: 'K-PAR',
|
|
76
76
|
[app_1.USER_TYPES.DRIVER]: 'K-DRI',
|
|
77
77
|
[app_1.USER_TYPES.VENDOR]: 'K-VEN',
|
|
78
|
+
[app_1.USER_TYPES.SPORT_INSTITUTE_OWNER]: 'K-SIO',
|
|
79
|
+
[app_1.USER_TYPES.SPORT_TRAINER]: 'K-ST',
|
|
78
80
|
};
|
|
79
81
|
const prefix = USER_TYPE_PREFIXES[userType] || `K-${userType.substring(0, 3).toUpperCase()}`;
|
|
80
82
|
let data = await uniqueNumberCounterModel_1.default.findOne({ type, userType, instituteId: null });
|
|
@@ -186,8 +188,6 @@ UserModel.init({
|
|
|
186
188
|
medications: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'medications' },
|
|
187
189
|
relation: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
188
190
|
taluka: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
189
|
-
status: { type: sequelize_1.DataTypes.STRING, allowNull: true, defaultValue: app_1.USER_STATUS.ACTIVE },
|
|
190
|
-
portfolioTheme: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'portfolio_theme' }
|
|
191
191
|
}, {
|
|
192
192
|
modelName: 'UserModel',
|
|
193
193
|
tableName: 'users',
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import Joi from 'joi';
|
|
2
|
-
import { APP_TYPE } from '../constants/app';
|
|
3
|
-
export type TCustomHeaders = {
|
|
4
|
-
appType?: APP_TYPE;
|
|
5
|
-
token?: string;
|
|
6
|
-
deviceId?: string;
|
|
7
|
-
deviceToken?: string;
|
|
8
|
-
academicCalendarId?: string;
|
|
9
|
-
instituteId?: string;
|
|
10
|
-
};
|
|
11
1
|
export type TPaginationOptions<T> = {
|
|
12
2
|
limit: number | undefined;
|
|
13
3
|
totalRecords: number;
|
|
@@ -15,23 +5,5 @@ export type TPaginationOptions<T> = {
|
|
|
15
5
|
hasPreviousPage: boolean;
|
|
16
6
|
hasNextPage: boolean;
|
|
17
7
|
currentPage: number;
|
|
18
|
-
recordList
|
|
19
|
-
};
|
|
20
|
-
export type SchemaRules<TField> = {
|
|
21
|
-
required?: TField[];
|
|
22
|
-
optional?: TField[];
|
|
23
|
-
allowNull?: TField[];
|
|
24
|
-
forbidden?: TField[];
|
|
25
|
-
singleOrArray?: TField[];
|
|
26
|
-
singleOrArrayOrNull?: TField[];
|
|
27
|
-
customFields?: Record<string, Joi.Schema>;
|
|
28
|
-
nestedRequired?: string[];
|
|
8
|
+
recordList: T[];
|
|
29
9
|
};
|
|
30
|
-
export interface CrudValidatorRules<TField> {
|
|
31
|
-
create?: SchemaRules<TField>;
|
|
32
|
-
update?: SchemaRules<TField>;
|
|
33
|
-
getAll?: SchemaRules<TField>;
|
|
34
|
-
getAllWithPagination?: SchemaRules<TField>;
|
|
35
|
-
getById?: SchemaRules<TField>;
|
|
36
|
-
delete?: SchemaRules<TField>;
|
|
37
|
-
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IFacilityMasterModelAttributes } from '../interfaces/facilityMasterInterface';
|
|
3
|
+
export type TFacilityMasterModelCreationAttributes = Optional<IFacilityMasterModelAttributes, 'id' | 'createdBy' | 'updatedBy' | 'deletedBy' | 'createdAt' | 'updatedAt' | 'deletedAt'>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -233,7 +233,6 @@ export * from './userFinalResultType';
|
|
|
233
233
|
export * from './refundType';
|
|
234
234
|
export * from './kipiverseContactFormType';
|
|
235
235
|
export * from './moduleDocsType';
|
|
236
|
-
export * from './aiModelKeysType';
|
|
237
236
|
export * from './accountFinancialYearType';
|
|
238
237
|
export * from './accountPeriodLockType';
|
|
239
238
|
export * from './accountNumberSequenceType';
|
|
@@ -244,3 +243,20 @@ export * from './accountCostCenterType';
|
|
|
244
243
|
export * from './accountVoucherTypeType';
|
|
245
244
|
export * from './vendorCompanyMetaType';
|
|
246
245
|
export * from './productMetaType';
|
|
246
|
+
export * from './sportType';
|
|
247
|
+
export * from './sportCategoryType';
|
|
248
|
+
export * from './sportSubCategoryType';
|
|
249
|
+
export * from './sportRoleType';
|
|
250
|
+
export * from './equipmentType';
|
|
251
|
+
export * from './facilityMasterType';
|
|
252
|
+
export * from './sportGroupDataType';
|
|
253
|
+
export * from './unitType';
|
|
254
|
+
export * from './skillType';
|
|
255
|
+
export * from './ageGroupType';
|
|
256
|
+
export * from './assessmentTestType';
|
|
257
|
+
export * from './sportInfoType';
|
|
258
|
+
export * from './schoolHasSportType';
|
|
259
|
+
export * from './studentSportTestType';
|
|
260
|
+
export * from './sportsAcademyType';
|
|
261
|
+
export * from './userAmenityType';
|
|
262
|
+
export * from './userAcademyMetaType';
|
package/dist/types/index.js
CHANGED
|
@@ -249,7 +249,6 @@ __exportStar(require("./userFinalResultType"), exports);
|
|
|
249
249
|
__exportStar(require("./refundType"), exports);
|
|
250
250
|
__exportStar(require("./kipiverseContactFormType"), exports);
|
|
251
251
|
__exportStar(require("./moduleDocsType"), exports);
|
|
252
|
-
__exportStar(require("./aiModelKeysType"), exports);
|
|
253
252
|
__exportStar(require("./accountFinancialYearType"), exports);
|
|
254
253
|
__exportStar(require("./accountPeriodLockType"), exports);
|
|
255
254
|
__exportStar(require("./accountNumberSequenceType"), exports);
|
|
@@ -260,3 +259,21 @@ __exportStar(require("./accountCostCenterType"), exports);
|
|
|
260
259
|
__exportStar(require("./accountVoucherTypeType"), exports);
|
|
261
260
|
__exportStar(require("./vendorCompanyMetaType"), exports);
|
|
262
261
|
__exportStar(require("./productMetaType"), exports);
|
|
262
|
+
// Arena Module
|
|
263
|
+
__exportStar(require("./sportType"), exports);
|
|
264
|
+
__exportStar(require("./sportCategoryType"), exports);
|
|
265
|
+
__exportStar(require("./sportSubCategoryType"), exports);
|
|
266
|
+
__exportStar(require("./sportRoleType"), exports);
|
|
267
|
+
__exportStar(require("./equipmentType"), exports);
|
|
268
|
+
__exportStar(require("./facilityMasterType"), exports);
|
|
269
|
+
__exportStar(require("./sportGroupDataType"), exports);
|
|
270
|
+
__exportStar(require("./unitType"), exports);
|
|
271
|
+
__exportStar(require("./skillType"), exports);
|
|
272
|
+
__exportStar(require("./ageGroupType"), exports);
|
|
273
|
+
__exportStar(require("./assessmentTestType"), exports);
|
|
274
|
+
__exportStar(require("./sportInfoType"), exports);
|
|
275
|
+
__exportStar(require("./schoolHasSportType"), exports);
|
|
276
|
+
__exportStar(require("./studentSportTestType"), exports);
|
|
277
|
+
__exportStar(require("./sportsAcademyType"), exports);
|
|
278
|
+
__exportStar(require("./userAmenityType"), exports);
|
|
279
|
+
__exportStar(require("./userAcademyMetaType"), exports);
|