@kipicore/dbcore 1.1.718 → 1.1.720
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/db/psql/migrations/20260810135826-add_description_to_sport_academy_batches.d.ts +2 -0
- package/dist/db/psql/migrations/20260810135826-add_description_to_sport_academy_batches.js +13 -0
- package/dist/interfaces/photosGalleryInterface.d.ts +3 -2
- package/dist/interfaces/sportAcademyBatchInterface.d.ts +1 -0
- package/dist/models/mongodb/photosGalleryModel.js +8 -0
- package/dist/models/psql/sportAcademyBatchModel.d.ts +1 -0
- package/dist/models/psql/sportAcademyBatchModel.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.addColumn('sport_academy_batches', 'description', {
|
|
6
|
+
type: Sequelize.TEXT,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
});
|
|
9
|
+
},
|
|
10
|
+
async down(queryInterface, Sequelize) {
|
|
11
|
+
await queryInterface.removeColumn('sport_academy_batches', 'description');
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -11,9 +11,10 @@ export interface IGalleryAlbumAttributes extends IDefaultAttributes, Document {
|
|
|
11
11
|
albumName: string;
|
|
12
12
|
files: IGalleryFile[];
|
|
13
13
|
status: COMMAN_STATUS;
|
|
14
|
-
instituteId
|
|
14
|
+
instituteId?: string;
|
|
15
15
|
date?: Date;
|
|
16
16
|
academicCalendarId?: string;
|
|
17
17
|
sportsAcademyId?: string;
|
|
18
|
-
|
|
18
|
+
userAmenityId?: string;
|
|
19
|
+
sportId?: string;
|
|
19
20
|
}
|
|
@@ -82,6 +82,14 @@ const PhotosGalleryModelSchema = new mongoose_1.Schema({
|
|
|
82
82
|
type: String,
|
|
83
83
|
required: false,
|
|
84
84
|
},
|
|
85
|
+
userAmenityId: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: false,
|
|
88
|
+
},
|
|
89
|
+
sportId: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: false,
|
|
92
|
+
},
|
|
85
93
|
}, { timestamps: true, versionKey: false });
|
|
86
94
|
PhotosGalleryModelSchema.index({
|
|
87
95
|
instituteId: 1,
|
|
@@ -6,7 +6,7 @@ const index_1 = require("./index");
|
|
|
6
6
|
const app_1 = require("../../constants/app");
|
|
7
7
|
class SportAcademyBatchModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, SportModel
|
|
9
|
+
const { UserModel, SportModel } = models;
|
|
10
10
|
SportAcademyBatchModel.belongsTo(SportModel, {
|
|
11
11
|
foreignKey: { name: 'sportId', allowNull: true, field: 'sport_id' },
|
|
12
12
|
as: 'sport',
|
|
@@ -71,6 +71,10 @@ SportAcademyBatchModel.init({
|
|
|
71
71
|
allowNull: true,
|
|
72
72
|
field: 'batch_capacity',
|
|
73
73
|
},
|
|
74
|
+
description: {
|
|
75
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
76
|
+
allowNull: true,
|
|
77
|
+
},
|
|
74
78
|
status: {
|
|
75
79
|
type: sequelize_1.DataTypes.STRING,
|
|
76
80
|
allowNull: true,
|
package/package.json
CHANGED