@kipicore/dbcore 1.1.656 → 1.1.657
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 +12 -15
- package/dist/constants/app.js +17 -20
- package/dist/constants/errorMessages.d.ts +0 -17
- package/dist/constants/errorMessages.js +1 -20
- 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/interfaces/ageGroupInterface.d.ts +12 -0
- package/dist/interfaces/assessmentTestInterface.d.ts +24 -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/facilitySportInterface.d.ts +6 -0
- package/dist/interfaces/facilitySportInterface.js +2 -0
- package/dist/interfaces/index.d.ts +11 -1
- package/dist/interfaces/index.js +12 -1
- package/dist/interfaces/instituteInterface.d.ts +0 -1
- package/dist/interfaces/skillInterface.d.ts +15 -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/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/subCategoriesInterface.d.ts +1 -2
- package/dist/interfaces/unitInterface.d.ts +10 -0
- package/dist/interfaces/unitInterface.js +2 -0
- package/dist/interfaces/userInterface.d.ts +1 -2
- package/dist/interfaces/vendorCompanyMetaInterface.d.ts +1 -1
- package/dist/models/mongodb/assessmentTestModel.d.ts +4 -0
- package/dist/models/mongodb/assessmentTestModel.js +72 -0
- package/dist/models/mongodb/index.d.ts +2 -0
- package/dist/models/mongodb/index.js +6 -1
- package/dist/models/mongodb/productMetaModel.js +0 -8
- package/dist/models/mongodb/sportInfoModel.d.ts +4 -0
- package/dist/models/mongodb/sportInfoModel.js +71 -0
- package/dist/models/mongodb/vendorCompanyMetaModel.js +1 -1
- 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/facilitySportModel.d.ts +12 -0
- package/dist/models/psql/facilitySportModel.js +51 -0
- package/dist/models/psql/index.d.ts +10 -1
- package/dist/models/psql/index.js +23 -4
- package/dist/models/psql/instituteModel.d.ts +0 -1
- package/dist/models/psql/instituteModel.js +2 -5
- 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/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/unitModel.d.ts +20 -0
- package/dist/models/psql/unitModel.js +57 -0
- package/dist/models/psql/userModel.d.ts +1 -2
- package/dist/models/psql/userModel.js +0 -1
- 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 -1
- 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/facilitySportType.d.ts +2 -0
- package/dist/types/facilitySportType.js +2 -0
- package/dist/types/index.d.ts +11 -1
- package/dist/types/index.js +12 -1
- 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/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/unitType.d.ts +2 -0
- package/dist/types/unitType.js +2 -0
- package/package.json +1 -1
- 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.d.ts +0 -2
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.js +0 -20
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.d.ts +0 -2
- 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/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/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/interfaces/{aiModelKeysInterface.js → ageGroupInterface.js} +0 -0
- /package/dist/{types/aiModelKeysType.js → interfaces/assessmentTestInterface.js} +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const up = async (queryInterface, Sequelize) => {
|
|
3
|
-
const tableName = 'ai_model_keys';
|
|
4
|
-
const tableExists = await queryInterface
|
|
5
|
-
.describeTable(tableName)
|
|
6
|
-
.then(() => true)
|
|
7
|
-
.catch(() => false);
|
|
8
|
-
if (!tableExists) {
|
|
9
|
-
await queryInterface.createTable(tableName, {
|
|
10
|
-
id: {
|
|
11
|
-
type: Sequelize.UUID,
|
|
12
|
-
defaultValue: Sequelize.UUIDV4,
|
|
13
|
-
allowNull: false,
|
|
14
|
-
primaryKey: true,
|
|
15
|
-
},
|
|
16
|
-
key: {
|
|
17
|
-
type: Sequelize.STRING,
|
|
18
|
-
allowNull: false,
|
|
19
|
-
unique: true,
|
|
20
|
-
},
|
|
21
|
-
hasValue: {
|
|
22
|
-
type: Sequelize.STRING,
|
|
23
|
-
allowNull: false,
|
|
24
|
-
field: 'has_value',
|
|
25
|
-
},
|
|
26
|
-
type: {
|
|
27
|
-
type: Sequelize.STRING,
|
|
28
|
-
allowNull: false,
|
|
29
|
-
},
|
|
30
|
-
description: {
|
|
31
|
-
type: Sequelize.TEXT,
|
|
32
|
-
allowNull: false,
|
|
33
|
-
},
|
|
34
|
-
version: {
|
|
35
|
-
type: Sequelize.INTEGER,
|
|
36
|
-
allowNull: false,
|
|
37
|
-
defaultValue: 1,
|
|
38
|
-
},
|
|
39
|
-
createdBy: {
|
|
40
|
-
type: Sequelize.UUID,
|
|
41
|
-
allowNull: true,
|
|
42
|
-
field: 'created_by',
|
|
43
|
-
},
|
|
44
|
-
updatedBy: {
|
|
45
|
-
type: Sequelize.UUID,
|
|
46
|
-
allowNull: true,
|
|
47
|
-
field: 'updated_by',
|
|
48
|
-
},
|
|
49
|
-
deletedBy: {
|
|
50
|
-
type: Sequelize.UUID,
|
|
51
|
-
allowNull: true,
|
|
52
|
-
field: 'deleted_by',
|
|
53
|
-
},
|
|
54
|
-
createdAt: {
|
|
55
|
-
type: Sequelize.DATE,
|
|
56
|
-
allowNull: false,
|
|
57
|
-
field: 'created_at',
|
|
58
|
-
},
|
|
59
|
-
updatedAt: {
|
|
60
|
-
type: Sequelize.DATE,
|
|
61
|
-
allowNull: false,
|
|
62
|
-
field: 'updated_at',
|
|
63
|
-
},
|
|
64
|
-
deletedAt: {
|
|
65
|
-
type: Sequelize.DATE,
|
|
66
|
-
allowNull: true,
|
|
67
|
-
field: 'deleted_at',
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
const tableDefinition = await queryInterface.describeTable(tableName);
|
|
73
|
-
const columnsToAdd = {
|
|
74
|
-
id: {
|
|
75
|
-
type: Sequelize.UUID,
|
|
76
|
-
defaultValue: Sequelize.UUIDV4,
|
|
77
|
-
allowNull: false,
|
|
78
|
-
primaryKey: true,
|
|
79
|
-
},
|
|
80
|
-
key: {
|
|
81
|
-
type: Sequelize.STRING,
|
|
82
|
-
allowNull: false,
|
|
83
|
-
unique: true,
|
|
84
|
-
},
|
|
85
|
-
hasValue: {
|
|
86
|
-
type: Sequelize.STRING,
|
|
87
|
-
allowNull: false,
|
|
88
|
-
field: 'has_value',
|
|
89
|
-
},
|
|
90
|
-
type: {
|
|
91
|
-
type: Sequelize.STRING,
|
|
92
|
-
allowNull: false,
|
|
93
|
-
},
|
|
94
|
-
description: {
|
|
95
|
-
type: Sequelize.TEXT,
|
|
96
|
-
allowNull: false,
|
|
97
|
-
},
|
|
98
|
-
version: {
|
|
99
|
-
type: Sequelize.INTEGER,
|
|
100
|
-
allowNull: false,
|
|
101
|
-
defaultValue: 1,
|
|
102
|
-
},
|
|
103
|
-
createdBy: {
|
|
104
|
-
type: Sequelize.UUID,
|
|
105
|
-
allowNull: true,
|
|
106
|
-
field: 'created_by',
|
|
107
|
-
},
|
|
108
|
-
updatedBy: {
|
|
109
|
-
type: Sequelize.UUID,
|
|
110
|
-
allowNull: true,
|
|
111
|
-
field: 'updated_by',
|
|
112
|
-
},
|
|
113
|
-
deletedBy: {
|
|
114
|
-
type: Sequelize.UUID,
|
|
115
|
-
allowNull: true,
|
|
116
|
-
field: 'deleted_by',
|
|
117
|
-
},
|
|
118
|
-
createdAt: {
|
|
119
|
-
type: Sequelize.DATE,
|
|
120
|
-
allowNull: false,
|
|
121
|
-
field: 'created_at',
|
|
122
|
-
},
|
|
123
|
-
updatedAt: {
|
|
124
|
-
type: Sequelize.DATE,
|
|
125
|
-
allowNull: false,
|
|
126
|
-
field: 'updated_at',
|
|
127
|
-
},
|
|
128
|
-
deletedAt: {
|
|
129
|
-
type: Sequelize.DATE,
|
|
130
|
-
allowNull: true,
|
|
131
|
-
field: 'deleted_at',
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
for (const column of Object.keys(columnsToAdd)) {
|
|
135
|
-
const columnToAdd = columnsToAdd[column];
|
|
136
|
-
const tableColumn = columnToAdd.field || column;
|
|
137
|
-
if (!tableDefinition[tableColumn]) {
|
|
138
|
-
await queryInterface.addColumn(tableName, tableColumn, columnToAdd);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
const down = async (queryInterface) => {
|
|
144
|
-
const tableName = 'ai_model_keys';
|
|
145
|
-
const tableExists = await queryInterface
|
|
146
|
-
.describeTable(tableName)
|
|
147
|
-
.then(() => true)
|
|
148
|
-
.catch(() => false);
|
|
149
|
-
if (tableExists) {
|
|
150
|
-
await queryInterface.dropTable(tableName);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
module.exports = {
|
|
154
|
-
up,
|
|
155
|
-
down,
|
|
156
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
const table = await queryInterface.describeTable('categories');
|
|
5
|
-
if (!table.type) {
|
|
6
|
-
await queryInterface.addColumn('categories', 'type', {
|
|
7
|
-
type: Sequelize.STRING,
|
|
8
|
-
allowNull: true,
|
|
9
|
-
defaultValue: 'INVENTORY',
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
const table = await queryInterface.describeTable('categories');
|
|
15
|
-
if (table.type) {
|
|
16
|
-
await queryInterface.removeColumn('categories', 'type');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
const table = await queryInterface.describeTable('sub_categories');
|
|
5
|
-
if (!table.type) {
|
|
6
|
-
await queryInterface.addColumn('sub_categories', 'type', {
|
|
7
|
-
type: Sequelize.STRING,
|
|
8
|
-
allowNull: true,
|
|
9
|
-
defaultValue: 'INVENTORY',
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
const table = await queryInterface.describeTable('sub_categories');
|
|
15
|
-
if (table.type) {
|
|
16
|
-
await queryInterface.removeColumn('sub_categories', 'type');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
const table = await queryInterface.describeTable('users');
|
|
5
|
-
if (!table.status) {
|
|
6
|
-
await queryInterface.addColumn('users', 'status', {
|
|
7
|
-
type: Sequelize.STRING,
|
|
8
|
-
allowNull: true,
|
|
9
|
-
defaultValue: 'ACTIVE',
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
const table = await queryInterface.describeTable('users');
|
|
15
|
-
if (table.status) {
|
|
16
|
-
await queryInterface.removeColumn('users', 'status');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AI_MODEL_KEYS, AI_MODEL_KEY_TYPES } from "../constants";
|
|
2
|
-
export interface IAiModelKeyAttributes {
|
|
3
|
-
id: string;
|
|
4
|
-
key: AI_MODEL_KEYS;
|
|
5
|
-
hasValue: string;
|
|
6
|
-
type: AI_MODEL_KEY_TYPES;
|
|
7
|
-
description: string;
|
|
8
|
-
version: number;
|
|
9
|
-
createdBy?: string;
|
|
10
|
-
updatedBy?: string;
|
|
11
|
-
deletedBy?: string;
|
|
12
|
-
createdAt?: Date;
|
|
13
|
-
updatedAt?: Date;
|
|
14
|
-
deletedAt?: Date;
|
|
15
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Model } from 'sequelize';
|
|
2
|
-
import { AI_MODEL_KEYS, AI_MODEL_KEY_TYPES } from '../../constants';
|
|
3
|
-
import { IAiModelKeyAttributes } from '../../interfaces/aiModelKeysInterface';
|
|
4
|
-
import { TAiModelKeyCreationAttributes } from '../../types/aiModelKeysType';
|
|
5
|
-
declare class AiModelKeyModel extends Model<IAiModelKeyAttributes, TAiModelKeyCreationAttributes> {
|
|
6
|
-
id: string;
|
|
7
|
-
key: AI_MODEL_KEYS;
|
|
8
|
-
hasValue: string;
|
|
9
|
-
type: AI_MODEL_KEY_TYPES;
|
|
10
|
-
description: string;
|
|
11
|
-
version: number;
|
|
12
|
-
createdBy?: string;
|
|
13
|
-
updatedBy?: string;
|
|
14
|
-
deletedBy?: string;
|
|
15
|
-
readonly createdAt?: Date;
|
|
16
|
-
readonly updatedAt?: Date;
|
|
17
|
-
readonly deletedAt?: Date;
|
|
18
|
-
static associate(models: any): void;
|
|
19
|
-
}
|
|
20
|
-
export default AiModelKeyModel;
|
|
@@ -1,70 +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 AiModelKeyModel extends sequelize_1.Model {
|
|
6
|
-
static associate(models) {
|
|
7
|
-
const { UserModel } = models;
|
|
8
|
-
AiModelKeyModel.belongsTo(UserModel, {
|
|
9
|
-
foreignKey: {
|
|
10
|
-
name: 'createdBy',
|
|
11
|
-
allowNull: true,
|
|
12
|
-
field: 'created_by',
|
|
13
|
-
},
|
|
14
|
-
as: 'createdByUser',
|
|
15
|
-
});
|
|
16
|
-
AiModelKeyModel.belongsTo(UserModel, {
|
|
17
|
-
foreignKey: {
|
|
18
|
-
name: 'updatedBy',
|
|
19
|
-
allowNull: true,
|
|
20
|
-
field: 'updated_by',
|
|
21
|
-
},
|
|
22
|
-
as: 'updatedByUser',
|
|
23
|
-
});
|
|
24
|
-
AiModelKeyModel.belongsTo(UserModel, {
|
|
25
|
-
foreignKey: {
|
|
26
|
-
name: 'deletedBy',
|
|
27
|
-
allowNull: true,
|
|
28
|
-
field: 'deleted_by',
|
|
29
|
-
},
|
|
30
|
-
as: 'deletedByUser',
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
AiModelKeyModel.init({
|
|
35
|
-
id: {
|
|
36
|
-
type: sequelize_1.DataTypes.UUID,
|
|
37
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
38
|
-
primaryKey: true,
|
|
39
|
-
allowNull: false,
|
|
40
|
-
},
|
|
41
|
-
key: {
|
|
42
|
-
type: sequelize_1.DataTypes.STRING,
|
|
43
|
-
allowNull: false,
|
|
44
|
-
unique: true,
|
|
45
|
-
},
|
|
46
|
-
hasValue: {
|
|
47
|
-
type: sequelize_1.DataTypes.STRING,
|
|
48
|
-
allowNull: false,
|
|
49
|
-
field: 'has_value',
|
|
50
|
-
},
|
|
51
|
-
type: {
|
|
52
|
-
type: sequelize_1.DataTypes.STRING,
|
|
53
|
-
allowNull: false,
|
|
54
|
-
},
|
|
55
|
-
description: {
|
|
56
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
57
|
-
allowNull: false,
|
|
58
|
-
},
|
|
59
|
-
version: {
|
|
60
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
61
|
-
allowNull: false,
|
|
62
|
-
defaultValue: 1,
|
|
63
|
-
},
|
|
64
|
-
}, {
|
|
65
|
-
sequelize: index_1.sequelize,
|
|
66
|
-
modelName: 'AiModelKeyModel',
|
|
67
|
-
tableName: 'ai_model_keys',
|
|
68
|
-
timestamps: true,
|
|
69
|
-
});
|
|
70
|
-
exports.default = AiModelKeyModel;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Optional } from 'sequelize';
|
|
2
|
-
import { IAiModelKeyAttributes } from '../interfaces/aiModelKeysInterface';
|
|
3
|
-
export type TAiModelKeyCreationAttributes = Optional<IAiModelKeyAttributes, 'id' | 'version' | 'createdBy' | 'updatedBy' | 'deletedBy' | 'createdAt' | 'updatedAt' | 'deletedAt'>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|