@kipicore/dbcore 1.1.295 → 1.1.297
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/index.js +2 -2
- package/dist/db/psql/migrations/20260226050211-delete_old_name.d.ts +2 -0
- package/dist/db/psql/migrations/20260226050211-delete_old_name.js +39 -0
- package/dist/db/psql/migrations/20260226050625-delete_old_name_1.d.ts +2 -0
- package/dist/db/psql/migrations/20260226050625-delete_old_name_1.js +37 -0
- package/dist/db/psql/migrations/20260226054826-delete_old_code.d.ts +2 -0
- package/dist/db/psql/migrations/20260226054826-delete_old_code.js +43 -0
- package/dist/db/psql/migrations/20260226060547-add_user_has_batch_in_not_teaching.d.ts +2 -0
- package/dist/db/psql/migrations/20260226060547-add_user_has_batch_in_not_teaching.js +22 -0
- package/dist/db/psql/seeders/20250101122757-add-default-permissions-modules.js +23 -55
- package/dist/db/psql/seeders/Data/BatchModule.js +1 -0
- package/dist/db/psql/seeders/Data/DivisionModule.js +1 -0
- package/dist/db/psql/seeders/Data/KipiStorageModule.js +8 -8
- package/dist/interfaces/userHasBatchInterface.d.ts +2 -0
- package/dist/models/psql/lectureModel.js +14 -11
- package/dist/models/psql/userHasBatchModel.d.ts +2 -0
- package/dist/models/psql/userHasBatchModel.js +6 -0
- package/package.json +1 -1
package/dist/db/psql/index.js
CHANGED
|
@@ -66,7 +66,7 @@ const CampusCarnivalModule = require('./seeders/Data/campusCarnival');
|
|
|
66
66
|
const TransportModule = require('./seeders/Data/transportModule');
|
|
67
67
|
const GreetingModule = require('./seeders/Data/greetingModule');
|
|
68
68
|
const TaskManagementModule = require('./seeders/Data/taskManagementModule');
|
|
69
|
-
const UserRoleModule = require('./seeders/Data/UserRoleModule');
|
|
69
|
+
// const UserRoleModule = require('./seeders/Data/UserRoleModule');
|
|
70
70
|
const ReportManagementModule = require('./seeders/Data/ReportManagementModule');
|
|
71
71
|
const DashboardManagementModule = require('./seeders/Data/dashboardManagementModule'); // Need to uncomment dashboard module is ready
|
|
72
72
|
const CertificateManagementModule = require('./seeders/Data/certificateManagementModule'); // Need to uncomment certificate module is ready
|
|
@@ -137,7 +137,7 @@ const allModules = [
|
|
|
137
137
|
TaskManagementModule,
|
|
138
138
|
DashboardManagementModule, // Need to uncomment dashboard module is ready
|
|
139
139
|
CertificateManagementModule, // Need to uncomment certificate module is ready
|
|
140
|
-
UserRoleModule,
|
|
140
|
+
// UserRoleModule,
|
|
141
141
|
ReportManagementModule,
|
|
142
142
|
];
|
|
143
143
|
module.exports = allModules;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
async up(queryInterface) {
|
|
4
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
5
|
+
try {
|
|
6
|
+
// Update modules table
|
|
7
|
+
await queryInterface.bulkUpdate('modules', {
|
|
8
|
+
name: 'Kipi Storage',
|
|
9
|
+
updated_at: new Date(),
|
|
10
|
+
code: 'KIPI'
|
|
11
|
+
}, {
|
|
12
|
+
code: ' KIPI',
|
|
13
|
+
}, { transaction });
|
|
14
|
+
// Update module_features table
|
|
15
|
+
await queryInterface.bulkUpdate('module_features', {
|
|
16
|
+
name: 'Kipi Store Management',
|
|
17
|
+
updated_at: new Date(),
|
|
18
|
+
code: 'KIPI.STORAGE',
|
|
19
|
+
}, {
|
|
20
|
+
code: ' KIPI.STORAGE',
|
|
21
|
+
}, { transaction });
|
|
22
|
+
await transaction.commit();
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
await transaction.rollback();
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
async down(queryInterface) {
|
|
30
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
31
|
+
try {
|
|
32
|
+
await transaction.commit();
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
await transaction.rollback();
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
async up(queryInterface) {
|
|
4
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
5
|
+
try {
|
|
6
|
+
// Update modules table
|
|
7
|
+
await queryInterface.bulkUpdate('modules', {
|
|
8
|
+
name: 'Kipi Storage',
|
|
9
|
+
updated_at: new Date(),
|
|
10
|
+
}, {
|
|
11
|
+
code: 'KIPI'
|
|
12
|
+
}, { transaction });
|
|
13
|
+
// Update module_features table
|
|
14
|
+
await queryInterface.bulkUpdate('module_features', {
|
|
15
|
+
name: 'Kipi Store Management',
|
|
16
|
+
updated_at: new Date(),
|
|
17
|
+
}, {
|
|
18
|
+
code: 'KIPI.STORAGE',
|
|
19
|
+
}, { transaction });
|
|
20
|
+
await transaction.commit();
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
await transaction.rollback();
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
async down(queryInterface) {
|
|
28
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
29
|
+
try {
|
|
30
|
+
await transaction.commit();
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
await transaction.rollback();
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
async up(queryInterface) {
|
|
4
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
5
|
+
try {
|
|
6
|
+
// Update modules table
|
|
7
|
+
await queryInterface.bulkUpdate('modules', {
|
|
8
|
+
name: 'User Role',
|
|
9
|
+
deleted_at: new Date(),
|
|
10
|
+
}, {
|
|
11
|
+
code: 'USERROLE'
|
|
12
|
+
}, { transaction });
|
|
13
|
+
// Update module_features table
|
|
14
|
+
await queryInterface.bulkUpdate('module_features', {
|
|
15
|
+
name: 'User Role Management',
|
|
16
|
+
deleted_at: new Date(),
|
|
17
|
+
}, {
|
|
18
|
+
code: 'USERROLE.USERROLEMANAGEMENT',
|
|
19
|
+
}, { transaction });
|
|
20
|
+
await queryInterface.bulkUpdate('feature_actions', {
|
|
21
|
+
name: 'Principle',
|
|
22
|
+
deleted_at: new Date(),
|
|
23
|
+
}, {
|
|
24
|
+
code: 'USERROLE.USERROLEMANAGEMENT.PRINCIPLE',
|
|
25
|
+
}, { transaction });
|
|
26
|
+
await transaction.commit();
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
await transaction.rollback();
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
async down(queryInterface) {
|
|
34
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
35
|
+
try {
|
|
36
|
+
await transaction.commit();
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
await transaction.rollback();
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('user_has_batches');
|
|
4
|
+
if (!table.is_teaching_batch) {
|
|
5
|
+
await queryInterface.addColumn('user_has_batches', 'is_teaching_batch', {
|
|
6
|
+
type: Sequelize.STRING,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
defaultValue: 'YES',
|
|
9
|
+
field: 'is_teaching_batch',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const down = async (queryInterface) => {
|
|
14
|
+
const table = await queryInterface.describeTable('user_has_batches');
|
|
15
|
+
if (table.is_teaching_batch) {
|
|
16
|
+
await queryInterface.removeColumn('user_has_batches', 'is_teaching_batch');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
module.exports = {
|
|
20
|
+
up,
|
|
21
|
+
down,
|
|
22
|
+
};
|
|
@@ -104,59 +104,27 @@ module.exports = {
|
|
|
104
104
|
if (newActions.length > 0) {
|
|
105
105
|
await queryInterface.bulkInsert('feature_actions', newActions, { transaction });
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// transaction,
|
|
128
|
-
// });
|
|
129
|
-
// }
|
|
130
|
-
async function findOldCodes(queryInterface, table, validCodes) {
|
|
131
|
-
if (validCodes.length === 0) {
|
|
132
|
-
// If no codes in the new list, return all old ones
|
|
133
|
-
return (await queryInterface.sequelize.query(`SELECT code FROM ${table} WHERE is_default=true`, { raw: true, transaction }))[0];
|
|
134
|
-
}
|
|
135
|
-
return (await queryInterface.sequelize.query(`SELECT code FROM ${table} WHERE is_default=true AND code NOT IN (:codes)`, {
|
|
136
|
-
replacements: { codes: validCodes },
|
|
137
|
-
raw: true,
|
|
138
|
-
}))[0];
|
|
107
|
+
const modulesToDelete = existingModules.filter(m => !allModulesListCode.modules.has(m.code)).map(m => m.code);
|
|
108
|
+
const featuresToDelete = existingFeatures.filter(f => !allModulesListCode.features.has(f.code)).map(f => f.code);
|
|
109
|
+
const actionsToDelete = existingActions.filter(a => !allModulesListCode.actions.has(a.code)).map(a => a.code);
|
|
110
|
+
if (actionsToDelete.length) {
|
|
111
|
+
await queryInterface.sequelize.query(`DELETE FROM feature_actions WHERE code IN (:codes)`, {
|
|
112
|
+
replacements: { codes: actionsToDelete },
|
|
113
|
+
transaction,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (featuresToDelete.length) {
|
|
117
|
+
await queryInterface.sequelize.query(`DELETE FROM module_features WHERE code IN (:codes)`, {
|
|
118
|
+
replacements: { codes: featuresToDelete },
|
|
119
|
+
transaction,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (modulesToDelete.length) {
|
|
123
|
+
await queryInterface.sequelize.query(`DELETE FROM modules WHERE code IN (:codes)`, {
|
|
124
|
+
replacements: { codes: modulesToDelete },
|
|
125
|
+
transaction,
|
|
126
|
+
});
|
|
139
127
|
}
|
|
140
|
-
// ✅ Delete old entries not in allModulesListCode
|
|
141
|
-
// await queryInterface.sequelize.query(`DELETE FROM feature_actions WHERE code NOT IN (:codes)`, {
|
|
142
|
-
// replacements: { codes: [...allModulesListCode.actions] },
|
|
143
|
-
// transaction,
|
|
144
|
-
// });
|
|
145
|
-
// await queryInterface.sequelize.query(`DELETE FROM module_features WHERE code NOT IN (:codes)`, {
|
|
146
|
-
// replacements: { codes: [...allModulesListCode.features] },
|
|
147
|
-
// transaction,
|
|
148
|
-
// });
|
|
149
|
-
// await queryInterface.sequelize.query(`DELETE FROM modules WHERE code NOT IN (:codes)`, {
|
|
150
|
-
// replacements: { codes: [...allModulesListCode.modules] },
|
|
151
|
-
// transaction,
|
|
152
|
-
// });
|
|
153
|
-
await findOldCodes(queryInterface, 'feature_actions', [...allModulesListCode.actions]);
|
|
154
|
-
await findOldCodes(queryInterface, 'module_features', [...allModulesListCode.features]);
|
|
155
|
-
await findOldCodes(queryInterface, 'modules', [...allModulesListCode.modules]);
|
|
156
|
-
// 2️⃣ Log them (or handle however you want)
|
|
157
|
-
// console.log('🚨 Old Actions not in new list:', oldActionsNotInNew);
|
|
158
|
-
// console.log('🚨 Old Features not in new list:', oldFeaturesNotInNew);
|
|
159
|
-
// console.log('🚨 Old Modules not in new list:', oldModulesNotInNew);
|
|
160
128
|
await transaction.commit();
|
|
161
129
|
}
|
|
162
130
|
catch (error) {
|
|
@@ -167,9 +135,9 @@ module.exports = {
|
|
|
167
135
|
async down(queryInterface) {
|
|
168
136
|
const transaction = await queryInterface.sequelize.transaction();
|
|
169
137
|
try {
|
|
170
|
-
await queryInterface.bulkDelete('feature_actions', { is_default: true }, { transaction });
|
|
171
|
-
await queryInterface.bulkDelete('module_features', { is_default: true }, { transaction });
|
|
172
|
-
await queryInterface.bulkDelete('modules', { is_default: true }, { transaction });
|
|
138
|
+
// await queryInterface.bulkDelete('feature_actions', { is_default: true }, { transaction });
|
|
139
|
+
// await queryInterface.bulkDelete('module_features', { is_default: true }, { transaction });
|
|
140
|
+
// await queryInterface.bulkDelete('modules', { is_default: true }, { transaction });
|
|
173
141
|
await transaction.commit();
|
|
174
142
|
}
|
|
175
143
|
catch (error) {
|
|
@@ -17,6 +17,7 @@ const BatchModule = {
|
|
|
17
17
|
{ name: 'Delete', code: 'BATCH.MANAGEMENT.DELETE', appType: [appTypeEnum.INSTITUTE_APP] },
|
|
18
18
|
{ name: 'Print', code: 'BATCH.MANAGEMENT.PRINT', appType: [appTypeEnum.INSTITUTE_APP] },
|
|
19
19
|
{ name: 'Approval', code: 'BATCH.MANAGEMENT.APPROVAL', appType: [appTypeEnum.INSTITUTE_APP] },
|
|
20
|
+
{ name: 'Assign Not Teaching Batch', code: 'BATCH.MANAGEMENT.ASSIGNNONTEACHING', appType: [appTypeEnum.INSTITUTE_APP] },
|
|
20
21
|
],
|
|
21
22
|
},
|
|
22
23
|
// {
|
|
@@ -18,6 +18,7 @@ const BatchModule = {
|
|
|
18
18
|
{ name: 'Print', code: 'BATCH.MANAGEMENT.PRINT', appType: [appTypeEnum.SCHOOL_APP] },
|
|
19
19
|
{ name: 'Approval', code: 'BATCH.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
|
|
20
20
|
{ name: 'Assign Teacher', code: 'BATCH.MANAGEMENT.ASSIGN', appType: [appTypeEnum.SCHOOL_APP] },
|
|
21
|
+
{ name: 'Assign Not Teaching Division', code: 'BATCH.MANAGEMENT.ASSIGNNONTEACHING', appType: [appTypeEnum.SCHOOL_APP] },
|
|
21
22
|
],
|
|
22
23
|
},
|
|
23
24
|
],
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
3
3
|
const appTypeEnum = require('./appType');
|
|
4
4
|
const KipiStorageModule = {
|
|
5
|
-
name: '
|
|
6
|
-
code: '
|
|
5
|
+
name: 'Kipi Storage',
|
|
6
|
+
code: 'KIPI',
|
|
7
7
|
appType: [appTypeEnum.SCHOOL_APP],
|
|
8
8
|
features: [
|
|
9
9
|
{
|
|
10
|
-
name: '
|
|
11
|
-
code: '
|
|
10
|
+
name: 'Kipi Store Management',
|
|
11
|
+
code: 'KIPI.STORAGE',
|
|
12
12
|
appType: [appTypeEnum.SCHOOL_APP],
|
|
13
13
|
actions: [
|
|
14
|
-
{ name: 'Add', code: '
|
|
15
|
-
{ name: 'Update', code: '
|
|
16
|
-
{ name: 'View', code: '
|
|
17
|
-
{ name: 'Delete', code: '
|
|
14
|
+
{ name: 'Add', code: 'KIPI.STORAGE.ADD', appType: [appTypeEnum.SCHOOL_APP] },
|
|
15
|
+
{ name: 'Update', code: 'KIPI.STORAGE.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
|
|
16
|
+
{ name: 'View', code: 'KIPI.STORAGE.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
|
|
17
|
+
{ name: 'Delete', code: 'KIPI.STORAGE.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
|
|
18
18
|
],
|
|
19
19
|
},
|
|
20
20
|
],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BOOLEAN_STATUS } from '../constants';
|
|
1
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
3
|
export interface IUserHasBatchModelAttributes extends IDefaultAttributes {
|
|
3
4
|
id: string;
|
|
@@ -5,4 +6,5 @@ export interface IUserHasBatchModelAttributes extends IDefaultAttributes {
|
|
|
5
6
|
userId: string;
|
|
6
7
|
subjects: string[];
|
|
7
8
|
academicCalendarId?: string;
|
|
9
|
+
isTeachingBatch: BOOLEAN_STATUS;
|
|
8
10
|
}
|
|
@@ -91,22 +91,17 @@ class LectureModel extends sequelize_1.Model {
|
|
|
91
91
|
};
|
|
92
92
|
if (lecture.id)
|
|
93
93
|
where = { ...where, id: { [sequelize_1.Op.ne]: lecture.id } };
|
|
94
|
-
if (lecture.batchId) {
|
|
95
|
-
if (lecture.slotId)
|
|
96
|
-
where.slotId = lecture.slotId;
|
|
97
|
-
const batchConflict = await LectureModel.findOne({ where: { ...where, batchId: lecture.batchId }, ...options });
|
|
98
|
-
if (batchConflict)
|
|
99
|
-
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.BATCH_OCCUPIED);
|
|
100
|
-
}
|
|
101
94
|
if (lecture.classRoomId) {
|
|
102
|
-
const classRoomConflict = await LectureModel.findOne({
|
|
95
|
+
const classRoomConflict = await LectureModel.findOne({
|
|
96
|
+
where: { ...where, classRoomId: lecture.classRoomId },
|
|
97
|
+
...options,
|
|
98
|
+
});
|
|
103
99
|
if (classRoomConflict)
|
|
104
100
|
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.CLASSROOM_OCCUPIED);
|
|
105
101
|
}
|
|
106
|
-
// const teacherConflictWhere = omit(where, ['slotId']);
|
|
107
102
|
if (lecture.primaryUserId) {
|
|
108
103
|
const teacherConflict = await LectureModel.findOne({
|
|
109
|
-
where: { ...
|
|
104
|
+
where: { ...where, primaryUserId: lecture.primaryUserId },
|
|
110
105
|
...options,
|
|
111
106
|
});
|
|
112
107
|
if (teacherConflict)
|
|
@@ -114,12 +109,20 @@ class LectureModel extends sequelize_1.Model {
|
|
|
114
109
|
}
|
|
115
110
|
if (lecture.secondaryUserId) {
|
|
116
111
|
const teacherConflict = await LectureModel.findOne({
|
|
117
|
-
where: { ...
|
|
112
|
+
where: { ...where, secondaryUserId: lecture.secondaryUserId },
|
|
118
113
|
...options,
|
|
119
114
|
});
|
|
120
115
|
if (teacherConflict)
|
|
121
116
|
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.TEACHER_OCCUPIED);
|
|
122
117
|
}
|
|
118
|
+
if (lecture.batchId) {
|
|
119
|
+
if (lecture.slotId)
|
|
120
|
+
where.slotId = lecture.slotId;
|
|
121
|
+
const batchConflict = await LectureModel.findOne({ where: { ...where, batchId: lecture.batchId }, ...options });
|
|
122
|
+
if (batchConflict)
|
|
123
|
+
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.BATCH_OCCUPIED);
|
|
124
|
+
}
|
|
125
|
+
// const teacherConflictWhere = omit(where, ['slotId']);
|
|
123
126
|
}
|
|
124
127
|
if (lecture.batchId) {
|
|
125
128
|
const batchWhere = { id: lecture.batchId };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { IUserHasBatchModelAttributes } from '../../interfaces/userHasBatchInterface';
|
|
3
3
|
import { TUserHasBatchModelCreationAttributes } from '../../types/userHasBatchType';
|
|
4
|
+
import { BOOLEAN_STATUS } from '../../constants';
|
|
4
5
|
declare class UserHasBatchModel extends Model<IUserHasBatchModelAttributes, TUserHasBatchModelCreationAttributes> {
|
|
5
6
|
id: string;
|
|
6
7
|
userId: string;
|
|
7
8
|
batchId: string;
|
|
8
9
|
subjects: string[];
|
|
9
10
|
academicCalendarId: string;
|
|
11
|
+
isTeachingBatch: BOOLEAN_STATUS;
|
|
10
12
|
createdBy: string;
|
|
11
13
|
updatedBy: string;
|
|
12
14
|
deletedBy: string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const sequelize_1 = require("sequelize");
|
|
4
4
|
const index_1 = require("./index");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
5
6
|
class UserHasBatchModel extends sequelize_1.Model {
|
|
6
7
|
static associate(models) {
|
|
7
8
|
const { UserModel, BatchModel, AcademicCalendarModel } = models;
|
|
@@ -100,6 +101,11 @@ UserHasBatchModel.init({
|
|
|
100
101
|
field: 'academic_calendar_id',
|
|
101
102
|
allowNull: true,
|
|
102
103
|
},
|
|
104
|
+
isTeachingBatch: {
|
|
105
|
+
type: sequelize_1.DataTypes.STRING,
|
|
106
|
+
field: 'is_teaching_batch',
|
|
107
|
+
defaultValue: constants_1.BOOLEAN_STATUS.YES,
|
|
108
|
+
},
|
|
103
109
|
}, {
|
|
104
110
|
modelName: 'UserHasBatchModel',
|
|
105
111
|
tableName: 'user_has_batches',
|
package/package.json
CHANGED