@kipicore/dbcore 1.1.593 → 1.1.594
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/20260101105751-class_room_event.js +18 -0
- package/dist/db/psql/migrations/20260617084046-add_field_to_class_room_event.d.ts +2 -0
- package/dist/db/psql/migrations/20260617084046-add_field_to_class_room_event.js +31 -0
- package/dist/interfaces/classRoomEventInterface.d.ts +2 -0
- package/dist/models/psql/classRoomEvent.d.ts +2 -0
- package/dist/models/psql/classRoomEvent.js +9 -0
- package/dist/models/psql/testimonialModel.js +8 -2
- package/package.json +1 -1
|
@@ -49,6 +49,15 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
49
49
|
field: 'entity_id',
|
|
50
50
|
allowNull: true,
|
|
51
51
|
},
|
|
52
|
+
eventDate: {
|
|
53
|
+
type: Sequelize.DATE,
|
|
54
|
+
field: 'event_date',
|
|
55
|
+
allowNull: true,
|
|
56
|
+
},
|
|
57
|
+
description: {
|
|
58
|
+
type: Sequelize.STRING,
|
|
59
|
+
allowNull: true,
|
|
60
|
+
},
|
|
52
61
|
createdBy: {
|
|
53
62
|
type: Sequelize.UUID,
|
|
54
63
|
allowNull: true,
|
|
@@ -130,6 +139,15 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
130
139
|
field: 'entity_id',
|
|
131
140
|
allowNull: true,
|
|
132
141
|
},
|
|
142
|
+
eventDate: {
|
|
143
|
+
type: Sequelize.DATE,
|
|
144
|
+
field: 'event_date',
|
|
145
|
+
allowNull: true,
|
|
146
|
+
},
|
|
147
|
+
description: {
|
|
148
|
+
type: Sequelize.STRING,
|
|
149
|
+
allowNull: true,
|
|
150
|
+
},
|
|
133
151
|
createdBy: {
|
|
134
152
|
type: Sequelize.UUID,
|
|
135
153
|
allowNull: true,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const classRoomEventTable = await queryInterface.describeTable('class_room_event');
|
|
4
|
+
if (!classRoomEventTable.event_date) {
|
|
5
|
+
await queryInterface.addColumn('class_room_event', 'event_date', {
|
|
6
|
+
type: Sequelize.DATE,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
field: 'event_date',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!classRoomEventTable.description) {
|
|
12
|
+
await queryInterface.addColumn('class_room_event', 'description', {
|
|
13
|
+
type: Sequelize.STRING,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
field: 'description',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const down = async (queryInterface) => {
|
|
20
|
+
const classRoomEventTable = await queryInterface.describeTable('class_room_event');
|
|
21
|
+
if (classRoomEventTable.description) {
|
|
22
|
+
await queryInterface.removeColumn('class_room_event', 'description');
|
|
23
|
+
}
|
|
24
|
+
if (classRoomEventTable.event_date) {
|
|
25
|
+
await queryInterface.removeColumn('class_room_event', 'event_date');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
module.exports = {
|
|
29
|
+
up,
|
|
30
|
+
down,
|
|
31
|
+
};
|
|
@@ -12,6 +12,8 @@ declare class ClassRoomEventModel extends Model<IClassRoomEventModelAttributes,
|
|
|
12
12
|
perUserAmount: number;
|
|
13
13
|
academicCalendarId?: string;
|
|
14
14
|
paymentMethod: PAYMENT_TYPE[];
|
|
15
|
+
eventDate: Date;
|
|
16
|
+
description: string;
|
|
15
17
|
createdBy: string;
|
|
16
18
|
updatedBy: string;
|
|
17
19
|
deletedBy: string;
|
|
@@ -107,6 +107,15 @@ ClassRoomEventModel.init({
|
|
|
107
107
|
field: 'entity_id',
|
|
108
108
|
allowNull: true,
|
|
109
109
|
},
|
|
110
|
+
eventDate: {
|
|
111
|
+
type: sequelize_1.DataTypes.DATE,
|
|
112
|
+
field: 'event_date',
|
|
113
|
+
allowNull: true,
|
|
114
|
+
},
|
|
115
|
+
description: {
|
|
116
|
+
type: sequelize_1.DataTypes.STRING,
|
|
117
|
+
allowNull: true,
|
|
118
|
+
},
|
|
110
119
|
}, {
|
|
111
120
|
modelName: 'ClassRoomEventModel',
|
|
112
121
|
tableName: 'class_room_event',
|
|
@@ -105,12 +105,18 @@ class TestimonialModel extends sequelize_1.Model {
|
|
|
105
105
|
association: 'entityType',
|
|
106
106
|
required: true,
|
|
107
107
|
where: {
|
|
108
|
-
[sequelize_1.Op.or]: [
|
|
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
|
+
],
|
|
109
113
|
},
|
|
110
114
|
},
|
|
111
115
|
});
|
|
112
116
|
stdDataList = JSON.parse(JSON.stringify(stdDataList));
|
|
113
|
-
|
|
117
|
+
let className = stdDataList.find((item) => item.entityType?.title === 'STANDARD')?.title || null;
|
|
118
|
+
if (institute?.isPlayHouse)
|
|
119
|
+
className = stdDataList.find((item) => item.entityType?.title === 'SECTIONS')?.title || null;
|
|
114
120
|
const mediumName = stdDataList.find((item) => item.entityType?.title === 'MEDIUM')?.title || null;
|
|
115
121
|
testimonial.class = `${(0, utils_1.capitalizeFirst)(mediumName.substring(0, 3))} Medium ${(0, utils_1.capitalizeFirst)(className)}`;
|
|
116
122
|
}
|
package/package.json
CHANGED