@kipicore/dbcore 1.1.657 → 1.1.658
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/constants/app.d.ts +15 -12
- package/dist/constants/app.js +20 -17
- package/dist/constants/errorMessages.d.ts +17 -0
- package/dist/constants/errorMessages.js +20 -1
- package/dist/constants/successMessages.d.ts +14 -0
- package/dist/constants/successMessages.js +17 -1
- package/dist/db/psql/migrations/20260714111425-change_status_enum_to_string_in_institutes.js +46 -0
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.d.ts +2 -0
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.js +20 -0
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.d.ts +2 -0
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.js +156 -0
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.js +19 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.js +19 -0
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.d.ts +2 -0
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.js +19 -0
- package/dist/interfaces/aiModelKeysInterface.d.ts +15 -0
- package/dist/interfaces/categoriesInterface.d.ts +2 -1
- package/dist/interfaces/index.d.ts +1 -11
- package/dist/interfaces/index.js +1 -12
- package/dist/interfaces/instituteInterface.d.ts +1 -0
- package/dist/interfaces/subCategoriesInterface.d.ts +2 -1
- package/dist/interfaces/userInterface.d.ts +2 -1
- package/dist/interfaces/vendorCompanyMetaInterface.d.ts +1 -1
- package/dist/models/mongodb/index.d.ts +0 -2
- package/dist/models/mongodb/index.js +1 -6
- package/dist/models/mongodb/productMetaModel.js +8 -0
- package/dist/models/mongodb/vendorCompanyMetaModel.js +1 -1
- package/dist/models/psql/SubCategoriesModel.d.ts +2 -1
- package/dist/models/psql/SubCategoriesModel.js +5 -0
- package/dist/models/psql/aiModelKeysModel.d.ts +20 -0
- package/dist/models/psql/aiModelKeysModel.js +70 -0
- package/dist/models/psql/categoriesModel.d.ts +2 -1
- package/dist/models/psql/categoriesModel.js +5 -0
- package/dist/models/psql/index.d.ts +1 -10
- package/dist/models/psql/index.js +4 -23
- package/dist/models/psql/instituteModel.d.ts +1 -0
- package/dist/models/psql/instituteModel.js +5 -2
- package/dist/models/psql/userModel.d.ts +2 -1
- package/dist/models/psql/userModel.js +1 -0
- package/dist/types/aiModelKeysType.d.ts +3 -0
- package/dist/types/commonType.d.ts +1 -1
- package/dist/types/index.d.ts +1 -11
- package/dist/types/index.js +1 -12
- package/package.json +1 -1
- package/dist/db/psql/migrations/20260714095754-create-arena-models.js +0 -642
- package/dist/interfaces/ageGroupInterface.d.ts +0 -12
- package/dist/interfaces/assessmentTestInterface.d.ts +0 -24
- package/dist/interfaces/equipmentInterface.d.ts +0 -10
- package/dist/interfaces/equipmentInterface.js +0 -2
- package/dist/interfaces/facilityMasterInterface.d.ts +0 -9
- package/dist/interfaces/facilityMasterInterface.js +0 -2
- package/dist/interfaces/facilitySportInterface.d.ts +0 -6
- package/dist/interfaces/facilitySportInterface.js +0 -2
- package/dist/interfaces/skillInterface.d.ts +0 -15
- package/dist/interfaces/skillInterface.js +0 -2
- package/dist/interfaces/sportCategoryInterface.d.ts +0 -9
- package/dist/interfaces/sportCategoryInterface.js +0 -2
- package/dist/interfaces/sportInfoInterface.d.ts +0 -23
- package/dist/interfaces/sportInfoInterface.js +0 -2
- package/dist/interfaces/sportInterface.d.ts +0 -10
- package/dist/interfaces/sportInterface.js +0 -2
- package/dist/interfaces/sportRoleInterface.d.ts +0 -11
- package/dist/interfaces/sportRoleInterface.js +0 -2
- package/dist/interfaces/sportSubCategoryInterface.d.ts +0 -10
- package/dist/interfaces/sportSubCategoryInterface.js +0 -2
- package/dist/interfaces/unitInterface.d.ts +0 -10
- package/dist/interfaces/unitInterface.js +0 -2
- package/dist/models/mongodb/assessmentTestModel.d.ts +0 -4
- package/dist/models/mongodb/assessmentTestModel.js +0 -72
- package/dist/models/mongodb/sportInfoModel.d.ts +0 -4
- package/dist/models/mongodb/sportInfoModel.js +0 -71
- package/dist/models/psql/ageGroupModel.d.ts +0 -22
- package/dist/models/psql/ageGroupModel.js +0 -76
- package/dist/models/psql/equipmentModel.d.ts +0 -20
- package/dist/models/psql/equipmentModel.js +0 -57
- package/dist/models/psql/facilityMasterModel.d.ts +0 -18
- package/dist/models/psql/facilityMasterModel.js +0 -64
- package/dist/models/psql/facilitySportModel.d.ts +0 -12
- package/dist/models/psql/facilitySportModel.js +0 -51
- package/dist/models/psql/skillModel.d.ts +0 -25
- package/dist/models/psql/skillModel.js +0 -99
- package/dist/models/psql/sportCategoryModel.d.ts +0 -19
- package/dist/models/psql/sportCategoryModel.js +0 -53
- package/dist/models/psql/sportModel.d.ts +0 -20
- package/dist/models/psql/sportModel.js +0 -58
- package/dist/models/psql/sportRoleModel.d.ts +0 -21
- package/dist/models/psql/sportRoleModel.js +0 -71
- package/dist/models/psql/sportSubCategoryModel.d.ts +0 -20
- package/dist/models/psql/sportSubCategoryModel.js +0 -75
- package/dist/models/psql/unitModel.d.ts +0 -20
- package/dist/models/psql/unitModel.js +0 -57
- package/dist/types/ageGroupType.d.ts +0 -2
- package/dist/types/ageGroupType.js +0 -2
- package/dist/types/assessmentTestType.d.ts +0 -2
- package/dist/types/assessmentTestType.js +0 -2
- package/dist/types/equipmentType.d.ts +0 -2
- package/dist/types/equipmentType.js +0 -2
- package/dist/types/facilityMasterType.d.ts +0 -3
- package/dist/types/facilityMasterType.js +0 -2
- package/dist/types/facilitySportType.d.ts +0 -2
- package/dist/types/facilitySportType.js +0 -2
- package/dist/types/skillType.d.ts +0 -2
- package/dist/types/skillType.js +0 -2
- package/dist/types/sportCategoryType.d.ts +0 -2
- package/dist/types/sportCategoryType.js +0 -2
- package/dist/types/sportInfoType.d.ts +0 -2
- package/dist/types/sportInfoType.js +0 -2
- package/dist/types/sportRoleType.d.ts +0 -2
- package/dist/types/sportRoleType.js +0 -2
- package/dist/types/sportSubCategoryType.d.ts +0 -2
- package/dist/types/sportSubCategoryType.js +0 -2
- package/dist/types/sportType.d.ts +0 -2
- package/dist/types/sportType.js +0 -2
- package/dist/types/unitType.d.ts +0 -2
- package/dist/types/unitType.js +0 -2
- /package/dist/db/psql/migrations/{20260714095754-create-arena-models.d.ts → 20260714111425-change_status_enum_to_string_in_institutes.d.ts} +0 -0
- /package/dist/interfaces/{ageGroupInterface.js → aiModelKeysInterface.js} +0 -0
- /package/dist/{interfaces/assessmentTestInterface.js → types/aiModelKeysType.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BETTER_VALUE_TYPE, COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface ISkillModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
sportId?: string;
|
|
6
|
-
unitId?: string;
|
|
7
|
-
name: string;
|
|
8
|
-
code: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
minValue?: number;
|
|
11
|
-
maxValue?: number;
|
|
12
|
-
betterValueType?: BETTER_VALUE_TYPE;
|
|
13
|
-
valueSide?: string[];
|
|
14
|
-
status: COMMAN_STATUS;
|
|
15
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface ISportCategoryModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
code: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
status: COMMAN_STATUS;
|
|
9
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Document } from 'mongoose';
|
|
2
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
3
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
4
|
-
export interface ISportInfoSkill {
|
|
5
|
-
ageGroupId: string;
|
|
6
|
-
skillId: string;
|
|
7
|
-
minValue?: number;
|
|
8
|
-
maxValue?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ISportInfoModelAttributes extends IDefaultAttributes, Document {
|
|
11
|
-
sportId: string;
|
|
12
|
-
setupGuide?: string;
|
|
13
|
-
images?: string[];
|
|
14
|
-
documents?: string[];
|
|
15
|
-
categories?: string[];
|
|
16
|
-
subCategories?: string[];
|
|
17
|
-
equipments?: string[];
|
|
18
|
-
amenitiesNeeded?: string[];
|
|
19
|
-
infrastructure?: string[];
|
|
20
|
-
specificTests?: string[];
|
|
21
|
-
skills?: ISportInfoSkill[];
|
|
22
|
-
status: COMMAN_STATUS;
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface ISportModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
code: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
icon?: string;
|
|
9
|
-
status: COMMAN_STATUS;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface ISportRoleModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
sportId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
code: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
status: COMMAN_STATUS;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface ISportSubCategoryModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
sportId: string;
|
|
6
|
-
categoryId: string;
|
|
7
|
-
name: string;
|
|
8
|
-
code: string;
|
|
9
|
-
status: COMMAN_STATUS;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
export interface IUnitModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
code: string;
|
|
7
|
-
symbol: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
status: COMMAN_STATUS;
|
|
10
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
-
const app_1 = require("../../constants/app");
|
|
38
|
-
const targetSkillSchema = new mongoose_1.Schema({
|
|
39
|
-
skillId: { type: String, required: true },
|
|
40
|
-
ageGroupId: { type: String, required: false },
|
|
41
|
-
minValue: { type: Number, required: false },
|
|
42
|
-
}, { _id: false });
|
|
43
|
-
const assessmentTestSchema = new mongoose_1.Schema({
|
|
44
|
-
sportId: { type: String, required: false },
|
|
45
|
-
sportRoleId: { type: String, required: false },
|
|
46
|
-
ageGroupId: { type: String, required: false },
|
|
47
|
-
name: { type: String, required: true },
|
|
48
|
-
code: { type: String, required: true },
|
|
49
|
-
description: { type: String, required: false },
|
|
50
|
-
passingRules: { type: String, required: false },
|
|
51
|
-
scoreFormula: { type: String, required: false },
|
|
52
|
-
documents: { type: [String], required: false, default: [] },
|
|
53
|
-
videos: { type: [String], required: false, default: [] },
|
|
54
|
-
targetSkills: { type: [targetSkillSchema], required: false, default: [] },
|
|
55
|
-
requiredEquipment: { type: [String], required: false, default: [] },
|
|
56
|
-
status: {
|
|
57
|
-
type: String,
|
|
58
|
-
enum: Object.values(app_1.ASSESSMENT_TEST_STATUS),
|
|
59
|
-
required: true,
|
|
60
|
-
default: app_1.ASSESSMENT_TEST_STATUS.ACTIVE,
|
|
61
|
-
},
|
|
62
|
-
createdBy: { type: String, required: false },
|
|
63
|
-
updatedBy: { type: String, required: false },
|
|
64
|
-
deletedBy: { type: String, required: false },
|
|
65
|
-
deletedAt: { type: Date, default: null },
|
|
66
|
-
}, {
|
|
67
|
-
timestamps: true,
|
|
68
|
-
versionKey: false,
|
|
69
|
-
virtuals: true,
|
|
70
|
-
});
|
|
71
|
-
const AssessmentTestModel = mongoose_1.default.model('assessmentTest', assessmentTestSchema);
|
|
72
|
-
exports.default = AssessmentTestModel;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
-
const app_1 = require("../../constants/app");
|
|
38
|
-
const sportInfoSkillSchema = new mongoose_1.Schema({
|
|
39
|
-
ageGroupId: { type: String, required: true },
|
|
40
|
-
skillId: { type: String, required: true },
|
|
41
|
-
minValue: { type: Number, required: false },
|
|
42
|
-
maxValue: { type: Number, required: false },
|
|
43
|
-
}, { _id: false });
|
|
44
|
-
const sportInfoSchema = new mongoose_1.Schema({
|
|
45
|
-
sportId: { type: String, required: true, index: true },
|
|
46
|
-
setupGuide: { type: String, required: false },
|
|
47
|
-
images: { type: [String], required: false, default: [] },
|
|
48
|
-
documents: { type: [String], required: false, default: [] },
|
|
49
|
-
categories: { type: [String], required: false, default: [] },
|
|
50
|
-
subCategories: { type: [String], required: false, default: [] },
|
|
51
|
-
equipments: { type: [String], required: false, default: [] },
|
|
52
|
-
amenitiesNeeded: { type: [String], required: false, default: [] },
|
|
53
|
-
infrastructure: { type: [String], required: false, default: [] },
|
|
54
|
-
specificTests: { type: [String], required: false, default: [] },
|
|
55
|
-
skills: { type: [sportInfoSkillSchema], required: false, default: [] },
|
|
56
|
-
status: {
|
|
57
|
-
type: String,
|
|
58
|
-
enum: Object.values(app_1.COMMAN_STATUS),
|
|
59
|
-
required: true,
|
|
60
|
-
default: app_1.COMMAN_STATUS.ACTIVE,
|
|
61
|
-
},
|
|
62
|
-
createdBy: { type: String, required: false },
|
|
63
|
-
updatedBy: { type: String, required: false },
|
|
64
|
-
deletedBy: { type: String, required: false },
|
|
65
|
-
deletedAt: { type: Date, default: null },
|
|
66
|
-
}, {
|
|
67
|
-
timestamps: true,
|
|
68
|
-
versionKey: false,
|
|
69
|
-
});
|
|
70
|
-
const SportInfoModel = mongoose_1.default.model('sportInfo', sportInfoSchema, 'sport_infos');
|
|
71
|
-
exports.default = SportInfoModel;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { IAgeGroupModelAttributes } from '../../interfaces/ageGroupInterface';
|
|
3
|
-
import { TAgeGroupModelCreationAttributes } from '../../types/ageGroupType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
-
export declare class AgeGroupModel extends Model<IAgeGroupModelAttributes, TAgeGroupModelCreationAttributes> {
|
|
6
|
-
id: string;
|
|
7
|
-
sportId?: string;
|
|
8
|
-
name: string;
|
|
9
|
-
code: string;
|
|
10
|
-
minAge?: number;
|
|
11
|
-
maxAge?: number;
|
|
12
|
-
description?: string;
|
|
13
|
-
status: COMMAN_STATUS;
|
|
14
|
-
createdBy?: string;
|
|
15
|
-
updatedBy?: string;
|
|
16
|
-
deletedBy?: string;
|
|
17
|
-
readonly createdAt: Date;
|
|
18
|
-
readonly updatedAt: Date;
|
|
19
|
-
readonly deletedAt?: string;
|
|
20
|
-
static associate(models: any): void;
|
|
21
|
-
}
|
|
22
|
-
export default AgeGroupModel;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgeGroupModel = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const index_1 = require("./index");
|
|
6
|
-
class AgeGroupModel extends sequelize_1.Model {
|
|
7
|
-
static associate(models) {
|
|
8
|
-
const { UserModel, SportModel } = models;
|
|
9
|
-
AgeGroupModel.belongsTo(UserModel, {
|
|
10
|
-
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
|
-
as: 'createdByUser',
|
|
12
|
-
});
|
|
13
|
-
AgeGroupModel.belongsTo(UserModel, {
|
|
14
|
-
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
15
|
-
as: 'updatedByUser',
|
|
16
|
-
});
|
|
17
|
-
AgeGroupModel.belongsTo(UserModel, {
|
|
18
|
-
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
19
|
-
as: 'deletedByUser',
|
|
20
|
-
});
|
|
21
|
-
AgeGroupModel.belongsTo(SportModel, {
|
|
22
|
-
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
23
|
-
as: 'ageGroupSport',
|
|
24
|
-
});
|
|
25
|
-
SportModel.hasMany(AgeGroupModel, {
|
|
26
|
-
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
27
|
-
as: 'sportHasAgeGroupList',
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.AgeGroupModel = AgeGroupModel;
|
|
32
|
-
AgeGroupModel.init({
|
|
33
|
-
id: {
|
|
34
|
-
type: sequelize_1.DataTypes.UUID,
|
|
35
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
36
|
-
allowNull: false,
|
|
37
|
-
primaryKey: true,
|
|
38
|
-
},
|
|
39
|
-
sportId: {
|
|
40
|
-
type: sequelize_1.DataTypes.UUID,
|
|
41
|
-
field: 'sport_id',
|
|
42
|
-
allowNull: true,
|
|
43
|
-
},
|
|
44
|
-
name: {
|
|
45
|
-
type: sequelize_1.DataTypes.STRING,
|
|
46
|
-
allowNull: true,
|
|
47
|
-
},
|
|
48
|
-
code: {
|
|
49
|
-
type: sequelize_1.DataTypes.STRING,
|
|
50
|
-
allowNull: true,
|
|
51
|
-
},
|
|
52
|
-
minAge: {
|
|
53
|
-
type: sequelize_1.DataTypes.FLOAT,
|
|
54
|
-
field: 'min_age',
|
|
55
|
-
allowNull: true,
|
|
56
|
-
},
|
|
57
|
-
maxAge: {
|
|
58
|
-
type: sequelize_1.DataTypes.FLOAT,
|
|
59
|
-
field: 'max_age',
|
|
60
|
-
allowNull: true,
|
|
61
|
-
},
|
|
62
|
-
description: {
|
|
63
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
64
|
-
allowNull: true,
|
|
65
|
-
},
|
|
66
|
-
status: {
|
|
67
|
-
type: sequelize_1.DataTypes.STRING,
|
|
68
|
-
allowNull: true,
|
|
69
|
-
},
|
|
70
|
-
}, {
|
|
71
|
-
modelName: 'AgeGroupModel',
|
|
72
|
-
tableName: 'age_groups',
|
|
73
|
-
timestamps: true,
|
|
74
|
-
sequelize: index_1.sequelize,
|
|
75
|
-
});
|
|
76
|
-
exports.default = AgeGroupModel;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { IEquipmentModelAttributes } from '../../interfaces/equipmentInterface';
|
|
3
|
-
import { TEquipmentModelCreationAttributes } from '../../types/equipmentType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
|
-
export declare class EquipmentModel extends Model<IEquipmentModelAttributes, TEquipmentModelCreationAttributes> {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
code: string;
|
|
9
|
-
category?: 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 EquipmentModel;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EquipmentModel = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const index_1 = require("./index");
|
|
6
|
-
class EquipmentModel extends sequelize_1.Model {
|
|
7
|
-
static associate(models) {
|
|
8
|
-
const { UserModel } = models;
|
|
9
|
-
EquipmentModel.belongsTo(UserModel, {
|
|
10
|
-
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
|
-
as: 'createdByUser',
|
|
12
|
-
});
|
|
13
|
-
EquipmentModel.belongsTo(UserModel, {
|
|
14
|
-
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
15
|
-
as: 'updatedByUser',
|
|
16
|
-
});
|
|
17
|
-
EquipmentModel.belongsTo(UserModel, {
|
|
18
|
-
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
19
|
-
as: 'deletedByUser',
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.EquipmentModel = EquipmentModel;
|
|
24
|
-
EquipmentModel.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
|
-
category: {
|
|
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: 'EquipmentModel',
|
|
53
|
-
tableName: 'equipments',
|
|
54
|
-
timestamps: true,
|
|
55
|
-
sequelize: index_1.sequelize,
|
|
56
|
-
});
|
|
57
|
-
exports.default = EquipmentModel;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { IFacilityMasterModelAttributes } from '../../interfaces/facilityMasterInterface';
|
|
3
|
-
import { TFacilityMasterModelCreationAttributes } from '../../types/facilityMasterType';
|
|
4
|
-
import { COMMAN_STATUS, FACILITY_PLACE_TYPE } from '../../constants/app';
|
|
5
|
-
export default class FacilityMasterModel extends Model<IFacilityMasterModelAttributes, TFacilityMasterModelCreationAttributes> {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
code: string;
|
|
9
|
-
type: FACILITY_PLACE_TYPE;
|
|
10
|
-
status: COMMAN_STATUS;
|
|
11
|
-
createdBy?: string;
|
|
12
|
-
updatedBy?: string;
|
|
13
|
-
deletedBy?: string;
|
|
14
|
-
readonly createdAt: Date;
|
|
15
|
-
readonly updatedAt: Date;
|
|
16
|
-
readonly deletedAt?: string;
|
|
17
|
-
static associate(models: any): void;
|
|
18
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sequelize_1 = require("sequelize");
|
|
4
|
-
const index_1 = require("./index");
|
|
5
|
-
class FacilityMasterModel extends sequelize_1.Model {
|
|
6
|
-
static associate(models) {
|
|
7
|
-
const { UserModel } = models;
|
|
8
|
-
FacilityMasterModel.belongsTo(UserModel, {
|
|
9
|
-
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
10
|
-
as: 'createdByUser',
|
|
11
|
-
});
|
|
12
|
-
FacilityMasterModel.belongsTo(UserModel, {
|
|
13
|
-
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
14
|
-
as: 'updatedByUser',
|
|
15
|
-
});
|
|
16
|
-
FacilityMasterModel.belongsTo(UserModel, {
|
|
17
|
-
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
18
|
-
as: 'deletedByUser',
|
|
19
|
-
});
|
|
20
|
-
// FacilityMasterModel.belongsToMany(SportModel, {
|
|
21
|
-
// through: FacilitySportModel,
|
|
22
|
-
// foreignKey: 'facilityId',
|
|
23
|
-
// otherKey: 'sportId',
|
|
24
|
-
// as: 'facilitySportsList',
|
|
25
|
-
// });
|
|
26
|
-
// SportModel.belongsToMany(FacilityMasterModel, {
|
|
27
|
-
// through: FacilitySportModel,
|
|
28
|
-
// foreignKey: 'sportId',
|
|
29
|
-
// otherKey: 'facilityId',
|
|
30
|
-
// as: 'sportFacilitiesList',
|
|
31
|
-
// });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.default = FacilityMasterModel;
|
|
35
|
-
FacilityMasterModel.init({
|
|
36
|
-
id: {
|
|
37
|
-
type: sequelize_1.DataTypes.UUID,
|
|
38
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
39
|
-
allowNull: false,
|
|
40
|
-
primaryKey: true,
|
|
41
|
-
},
|
|
42
|
-
name: {
|
|
43
|
-
type: sequelize_1.DataTypes.STRING,
|
|
44
|
-
allowNull: true,
|
|
45
|
-
},
|
|
46
|
-
code: {
|
|
47
|
-
type: sequelize_1.DataTypes.STRING,
|
|
48
|
-
allowNull: true,
|
|
49
|
-
},
|
|
50
|
-
type: {
|
|
51
|
-
type: sequelize_1.DataTypes.STRING,
|
|
52
|
-
allowNull: true,
|
|
53
|
-
},
|
|
54
|
-
status: {
|
|
55
|
-
type: sequelize_1.DataTypes.STRING,
|
|
56
|
-
allowNull: true,
|
|
57
|
-
},
|
|
58
|
-
}, {
|
|
59
|
-
sequelize: index_1.sequelize,
|
|
60
|
-
modelName: 'FacilityMasterModel',
|
|
61
|
-
tableName: 'facility_masters',
|
|
62
|
-
paranoid: true,
|
|
63
|
-
timestamps: true,
|
|
64
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { IFacilitySportModelAttributes } from '../../interfaces/facilitySportInterface';
|
|
3
|
-
import { TFacilitySportModelCreationAttributes } from '../../types/facilitySportType';
|
|
4
|
-
export declare class FacilitySportModel extends Model<IFacilitySportModelAttributes, TFacilitySportModelCreationAttributes> {
|
|
5
|
-
id: string;
|
|
6
|
-
facilityId: string;
|
|
7
|
-
sportId: string;
|
|
8
|
-
readonly createdAt: Date;
|
|
9
|
-
readonly updatedAt: Date;
|
|
10
|
-
static associate(models: any): void;
|
|
11
|
-
}
|
|
12
|
-
export default FacilitySportModel;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FacilitySportModel = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const index_1 = require("./index");
|
|
6
|
-
class FacilitySportModel extends sequelize_1.Model {
|
|
7
|
-
static associate(models) {
|
|
8
|
-
const { FacilityMasterModel, SportModel } = models;
|
|
9
|
-
FacilitySportModel.belongsTo(FacilityMasterModel, {
|
|
10
|
-
foreignKey: { name: 'facilityId', allowNull: false, field: 'facility_id' },
|
|
11
|
-
as: 'facilitySportFacility',
|
|
12
|
-
});
|
|
13
|
-
FacilityMasterModel.hasMany(FacilitySportModel, {
|
|
14
|
-
foreignKey: { name: 'facilityId', allowNull: false, field: 'facility_id' },
|
|
15
|
-
as: 'facilitySportsList',
|
|
16
|
-
});
|
|
17
|
-
FacilitySportModel.belongsTo(SportModel, {
|
|
18
|
-
foreignKey: { name: 'sportId', allowNull: false, field: 'sport_id' },
|
|
19
|
-
as: 'facilitySportSport',
|
|
20
|
-
});
|
|
21
|
-
SportModel.hasMany(FacilitySportModel, {
|
|
22
|
-
foreignKey: { name: 'sportId', allowNull: false, field: 'sport_id' },
|
|
23
|
-
as: 'sportFacilitiesList',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.FacilitySportModel = FacilitySportModel;
|
|
28
|
-
FacilitySportModel.init({
|
|
29
|
-
id: {
|
|
30
|
-
type: sequelize_1.DataTypes.UUID,
|
|
31
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
32
|
-
allowNull: false,
|
|
33
|
-
primaryKey: true,
|
|
34
|
-
},
|
|
35
|
-
facilityId: {
|
|
36
|
-
type: sequelize_1.DataTypes.UUID,
|
|
37
|
-
field: 'facility_id',
|
|
38
|
-
allowNull: false,
|
|
39
|
-
},
|
|
40
|
-
sportId: {
|
|
41
|
-
type: sequelize_1.DataTypes.UUID,
|
|
42
|
-
field: 'sport_id',
|
|
43
|
-
allowNull: false,
|
|
44
|
-
},
|
|
45
|
-
}, {
|
|
46
|
-
modelName: 'FacilitySportModel',
|
|
47
|
-
tableName: 'facility_sports',
|
|
48
|
-
timestamps: true,
|
|
49
|
-
sequelize: index_1.sequelize,
|
|
50
|
-
});
|
|
51
|
-
exports.default = FacilitySportModel;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { ISkillModelAttributes } from '../../interfaces/skillInterface';
|
|
3
|
-
import { TSkillModelCreationAttributes } from '../../types/skillType';
|
|
4
|
-
import { BETTER_VALUE_TYPE, COMMAN_STATUS } from '../../constants/app';
|
|
5
|
-
export declare class SkillModel extends Model<ISkillModelAttributes, TSkillModelCreationAttributes> {
|
|
6
|
-
id: string;
|
|
7
|
-
sportId?: string;
|
|
8
|
-
unitId?: string;
|
|
9
|
-
name: string;
|
|
10
|
-
code: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
minValue?: number;
|
|
13
|
-
maxValue?: number;
|
|
14
|
-
betterValueType?: BETTER_VALUE_TYPE;
|
|
15
|
-
valueSide?: string[];
|
|
16
|
-
status: COMMAN_STATUS;
|
|
17
|
-
createdBy?: string;
|
|
18
|
-
updatedBy?: string;
|
|
19
|
-
deletedBy?: string;
|
|
20
|
-
readonly createdAt: Date;
|
|
21
|
-
readonly updatedAt: Date;
|
|
22
|
-
readonly deletedAt?: string;
|
|
23
|
-
static associate(models: any): void;
|
|
24
|
-
}
|
|
25
|
-
export default SkillModel;
|