@kipicore/dbcore 1.1.132 → 1.1.133
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 +2 -1
- package/dist/constants/app.js +1 -0
- package/dist/constants/errorMessages.d.ts +2 -1
- package/dist/constants/errorMessages.js +1 -0
- package/dist/db/psql/migrations/20251125045339-income_expense_model.js +4 -4
- package/dist/db/psql/migrations/20251210100917-id_add_typemanagement.js +5 -5
- package/dist/db/psql/migrations/20251210104353-id_add_floorManagement.js +5 -5
- package/dist/interfaces/incomeExpenseInterface.d.ts +1 -1
- package/dist/interfaces/roleInterface.d.ts +1 -1
- package/dist/interfaces/subjectIndexInterface.d.ts +1 -1
- package/dist/interfaces/typeManagementInterface.d.ts +1 -1
- package/dist/interfaces/userHasRoleInterface.d.ts +1 -1
- package/dist/models/mongodb/subjectIndexModel.js +1 -1
- package/dist/models/psql/incomeExpenseModel.d.ts +1 -1
- package/dist/models/psql/incomeExpenseModel.js +6 -6
- package/dist/models/psql/roleModel.d.ts +1 -1
- package/dist/models/psql/roleModel.js +4 -4
- package/dist/models/psql/subjectHasFeeModel.d.ts +1 -1
- package/dist/models/psql/subjectHasFeeModel.js +1 -1
- package/dist/models/psql/typeManagementModel.d.ts +1 -1
- package/dist/models/psql/typeManagementModel.js +6 -6
- package/dist/models/psql/userHasRoleModel.d.ts +1 -1
- package/dist/models/psql/userHasRoleModel.js +4 -4
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -257,7 +257,8 @@ export declare enum USER_INSTITUTE_META_STATUS {
|
|
|
257
257
|
REJECTED = "REJECTED",
|
|
258
258
|
LEFT = "LEFT",
|
|
259
259
|
BLOCKED = "BLOCKED",
|
|
260
|
-
SUBSCRIPTION_PLAN_EXPIRED = "SUBSCRIPTION_PLAN_EXPIRED"
|
|
260
|
+
SUBSCRIPTION_PLAN_EXPIRED = "SUBSCRIPTION_PLAN_EXPIRED",
|
|
261
|
+
DRAFT = "DRAFT"
|
|
261
262
|
}
|
|
262
263
|
export declare enum EMPLOYMENT_TYPE {
|
|
263
264
|
PART_TIME = "PART_TIME",
|
package/dist/constants/app.js
CHANGED
|
@@ -318,6 +318,7 @@ var USER_INSTITUTE_META_STATUS;
|
|
|
318
318
|
USER_INSTITUTE_META_STATUS["LEFT"] = "LEFT";
|
|
319
319
|
USER_INSTITUTE_META_STATUS["BLOCKED"] = "BLOCKED";
|
|
320
320
|
USER_INSTITUTE_META_STATUS["SUBSCRIPTION_PLAN_EXPIRED"] = "SUBSCRIPTION_PLAN_EXPIRED";
|
|
321
|
+
USER_INSTITUTE_META_STATUS["DRAFT"] = "DRAFT";
|
|
321
322
|
})(USER_INSTITUTE_META_STATUS || (exports.USER_INSTITUTE_META_STATUS = USER_INSTITUTE_META_STATUS = {}));
|
|
322
323
|
var EMPLOYMENT_TYPE;
|
|
323
324
|
(function (EMPLOYMENT_TYPE) {
|
|
@@ -504,7 +504,8 @@ export declare enum USER_INSTITUTE_META_ERROR_MESSAGES {
|
|
|
504
504
|
CAN_NOT_UPDATE_BATCH_FOUND = "Cannot update institute data: dependency found between removed data and assigned batch",
|
|
505
505
|
CAN_NOT_UPDATE_LECTURE_FOUND = "Institute update failed: removed data is linked to an existing lectures",
|
|
506
506
|
USER_ALREADY_FIL_FROM = "User already filUp form",
|
|
507
|
-
CAN_NOT_UPDATE_ENTITY_FOUND = "Institute update failed: removed data is linked to an existing group"
|
|
507
|
+
CAN_NOT_UPDATE_ENTITY_FOUND = "Institute update failed: removed data is linked to an existing group",
|
|
508
|
+
CAN_NOT_LEFT = "User cannot be removed as they hold certain responsibilities."
|
|
508
509
|
}
|
|
509
510
|
export declare enum PARENTS_ERROR_MESSAGES {
|
|
510
511
|
CREATE_FAIL = "Unable to save parents data!",
|
|
@@ -553,6 +553,7 @@ var USER_INSTITUTE_META_ERROR_MESSAGES;
|
|
|
553
553
|
USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_UPDATE_LECTURE_FOUND"] = "Institute update failed: removed data is linked to an existing lectures";
|
|
554
554
|
USER_INSTITUTE_META_ERROR_MESSAGES["USER_ALREADY_FIL_FROM"] = "User already filUp form";
|
|
555
555
|
USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_UPDATE_ENTITY_FOUND"] = "Institute update failed: removed data is linked to an existing group";
|
|
556
|
+
USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_LEFT"] = "User cannot be removed as they hold certain responsibilities.";
|
|
556
557
|
})(USER_INSTITUTE_META_ERROR_MESSAGES || (exports.USER_INSTITUTE_META_ERROR_MESSAGES = USER_INSTITUTE_META_ERROR_MESSAGES = {}));
|
|
557
558
|
var PARENTS_ERROR_MESSAGES;
|
|
558
559
|
(function (PARENTS_ERROR_MESSAGES) {
|
|
@@ -18,9 +18,9 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
18
18
|
field: 'institute_id',
|
|
19
19
|
allowNull: true,
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
academicCalendarId: {
|
|
22
22
|
type: Sequelize.UUID,
|
|
23
|
-
field: '
|
|
23
|
+
field: 'academic_calendar_id',
|
|
24
24
|
allowNull: true,
|
|
25
25
|
},
|
|
26
26
|
type: {
|
|
@@ -85,9 +85,9 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
85
85
|
field: 'institute_id',
|
|
86
86
|
allowNull: true,
|
|
87
87
|
},
|
|
88
|
-
|
|
88
|
+
academicCalendarId: {
|
|
89
89
|
type: Sequelize.UUID,
|
|
90
|
-
field: '
|
|
90
|
+
field: 'academic_calendar_id',
|
|
91
91
|
allowNull: true,
|
|
92
92
|
},
|
|
93
93
|
type: {
|
|
@@ -9,12 +9,12 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
9
9
|
field: 'old_id',
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
if (!table.
|
|
13
|
-
await queryInterface.addColumn('type_management', '
|
|
12
|
+
if (!table.academic_calendar_id) {
|
|
13
|
+
await queryInterface.addColumn('type_management', 'academic_calendar_id', {
|
|
14
14
|
type: Sequelize.UUID,
|
|
15
15
|
defaultValue: null,
|
|
16
16
|
allowNull: true,
|
|
17
|
-
field: '
|
|
17
|
+
field: 'academic_calendar_id',
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -23,8 +23,8 @@ const down = async (queryInterface, Sequelize) => {
|
|
|
23
23
|
if (table.old_id) {
|
|
24
24
|
await queryInterface.removeColumn('type_management', 'old_id');
|
|
25
25
|
}
|
|
26
|
-
if (table.
|
|
27
|
-
await queryInterface.removeColumn('type_management', '
|
|
26
|
+
if (table.academic_calendar_id) {
|
|
27
|
+
await queryInterface.removeColumn('type_management', 'academic_calendar_id');
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
module.exports = {
|
|
@@ -9,12 +9,12 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
9
9
|
field: 'old_id',
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
if (!table.
|
|
13
|
-
await queryInterface.addColumn('floor_management', '
|
|
12
|
+
if (!table.academic_calendar_id) {
|
|
13
|
+
await queryInterface.addColumn('floor_management', 'academic_calendar_id', {
|
|
14
14
|
type: Sequelize.UUID,
|
|
15
15
|
defaultValue: null,
|
|
16
16
|
allowNull: true,
|
|
17
|
-
field: '
|
|
17
|
+
field: 'academic_calendar_id',
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -23,8 +23,8 @@ const down = async (queryInterface, Sequelize) => {
|
|
|
23
23
|
if (table.old_id) {
|
|
24
24
|
await queryInterface.removeColumn('floor_management', 'old_id');
|
|
25
25
|
}
|
|
26
|
-
if (table.
|
|
27
|
-
await queryInterface.removeColumn('floor_management', '
|
|
26
|
+
if (table.academic_calendar_id) {
|
|
27
|
+
await queryInterface.removeColumn('floor_management', 'academic_calendar_id');
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
module.exports = {
|
|
@@ -4,7 +4,7 @@ export interface IIncomeExpenseModelAttributes extends IDefaultAttributes {
|
|
|
4
4
|
id: string;
|
|
5
5
|
date: Date;
|
|
6
6
|
instituteId: string;
|
|
7
|
-
|
|
7
|
+
academicCalendarId: string;
|
|
8
8
|
amount: number;
|
|
9
9
|
type: INCOME_EXPENSE_TYPE;
|
|
10
10
|
source: INCOME_EXPENSE_SOURCE;
|
|
@@ -17,7 +17,7 @@ export interface IRoleAttributes extends IDefaultAttributes {
|
|
|
17
17
|
appType: APP_TYPE;
|
|
18
18
|
isInstituteDefault?: boolean;
|
|
19
19
|
oldId?: string;
|
|
20
|
-
|
|
20
|
+
academicCalendarId?: string;
|
|
21
21
|
}
|
|
22
22
|
interface IRoleFeatureAction extends TModuleFeatureCreationAttributes {
|
|
23
23
|
actions: TFeatureActionCreationAttributes[];
|
|
@@ -46,6 +46,6 @@ export interface ISubjectIndexModelAttributes extends IDefaultAttributes, Docume
|
|
|
46
46
|
assignedUsers?: IAssignedUsersAttributes[];
|
|
47
47
|
selectedCategoryIds?: string[];
|
|
48
48
|
courseId?: string;
|
|
49
|
-
|
|
49
|
+
academicCalendarId?: string;
|
|
50
50
|
oldId?: string;
|
|
51
51
|
}
|
|
@@ -8,7 +8,7 @@ export declare class IncomeExpenseModel extends Model<IIncomeExpenseModelAttribu
|
|
|
8
8
|
source: string;
|
|
9
9
|
amount: number;
|
|
10
10
|
instituteId: string;
|
|
11
|
-
|
|
11
|
+
academicCalendarId: string;
|
|
12
12
|
static associate(models: any): void;
|
|
13
13
|
}
|
|
14
14
|
export default IncomeExpenseModel;
|
|
@@ -43,15 +43,15 @@ class IncomeExpenseModel extends sequelize_1.Model {
|
|
|
43
43
|
});
|
|
44
44
|
IncomeExpenseModel.belongsTo(AcademicCalendarModel, {
|
|
45
45
|
foreignKey: {
|
|
46
|
-
name: '
|
|
47
|
-
field: '
|
|
46
|
+
name: 'academicCalendarId',
|
|
47
|
+
field: 'academic_calendar_id',
|
|
48
48
|
},
|
|
49
49
|
as: 'incomeExpenseAcademicCalender',
|
|
50
50
|
});
|
|
51
51
|
AcademicCalendarModel.hasMany(IncomeExpenseModel, {
|
|
52
52
|
foreignKey: {
|
|
53
|
-
name: '
|
|
54
|
-
field: '
|
|
53
|
+
name: 'academicCalendarId',
|
|
54
|
+
field: 'academic_calendar_id',
|
|
55
55
|
},
|
|
56
56
|
as: 'AcademicCalenderIncomeExpense',
|
|
57
57
|
});
|
|
@@ -70,9 +70,9 @@ IncomeExpenseModel.init({
|
|
|
70
70
|
field: 'institute_id',
|
|
71
71
|
allowNull: true,
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
academicCalendarId: {
|
|
74
74
|
type: sequelize_1.DataTypes.UUID,
|
|
75
|
-
field: '
|
|
75
|
+
field: 'academic_calendar_id',
|
|
76
76
|
allowNull: true,
|
|
77
77
|
},
|
|
78
78
|
type: {
|
|
@@ -13,7 +13,7 @@ declare class RoleModel extends Model<IRoleAttributes, TRoleCreationAttributes>
|
|
|
13
13
|
appType: APP_TYPE;
|
|
14
14
|
isInstituteDefault?: boolean;
|
|
15
15
|
oldId?: string;
|
|
16
|
-
|
|
16
|
+
academicCalendarId?: string;
|
|
17
17
|
createdBy: string;
|
|
18
18
|
updatedBy: string;
|
|
19
19
|
deletedBy: string;
|
|
@@ -27,11 +27,11 @@ class RoleModel extends sequelize_1.Model {
|
|
|
27
27
|
as: 'childOldRole',
|
|
28
28
|
});
|
|
29
29
|
RoleModel.belongsTo(AcademicCalendarModel, {
|
|
30
|
-
foreignKey: { name: '
|
|
30
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
31
31
|
as: 'roleAcaCal',
|
|
32
32
|
});
|
|
33
33
|
AcademicCalendarModel.hasMany(RoleModel, {
|
|
34
|
-
foreignKey: { name: '
|
|
34
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
35
35
|
as: 'AcaCalRole',
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -86,9 +86,9 @@ RoleModel.init({
|
|
|
86
86
|
field: 'old_id',
|
|
87
87
|
allowNull: true,
|
|
88
88
|
},
|
|
89
|
-
|
|
89
|
+
academicCalendarId: {
|
|
90
90
|
type: sequelize_1.DataTypes.UUID,
|
|
91
|
-
field: '
|
|
91
|
+
field: 'academic_calendar_id',
|
|
92
92
|
allowNull: true,
|
|
93
93
|
}
|
|
94
94
|
}, {
|
|
@@ -10,7 +10,7 @@ declare class TypeManagementModel extends Model<ITypeManagementModelAttributes,
|
|
|
10
10
|
type: TYPE_MANAGEMENT_TYPE;
|
|
11
11
|
isInstituteDefault: boolean;
|
|
12
12
|
isDefault: boolean;
|
|
13
|
-
|
|
13
|
+
academicCalendarId?: string;
|
|
14
14
|
oldId?: string;
|
|
15
15
|
createdBy: string;
|
|
16
16
|
updatedBy: string;
|
|
@@ -20,15 +20,15 @@ class TypeManagementModel extends sequelize_1.Model {
|
|
|
20
20
|
});
|
|
21
21
|
TypeManagementModel.belongsTo(AcademicCalendarModel, {
|
|
22
22
|
foreignKey: {
|
|
23
|
-
name: '
|
|
24
|
-
field: '
|
|
23
|
+
name: 'academicCalendarId',
|
|
24
|
+
field: 'academic_calendar_id',
|
|
25
25
|
},
|
|
26
26
|
as: 'typeManagementAcaCal',
|
|
27
27
|
});
|
|
28
28
|
AcademicCalendarModel.hasMany(TypeManagementModel, {
|
|
29
29
|
foreignKey: {
|
|
30
|
-
name: '
|
|
31
|
-
field: '
|
|
30
|
+
name: 'academicCalendarId',
|
|
31
|
+
field: 'academic_calendar_id',
|
|
32
32
|
},
|
|
33
33
|
as: 'AcaCalTypeManagement',
|
|
34
34
|
});
|
|
@@ -141,9 +141,9 @@ TypeManagementModel.init({
|
|
|
141
141
|
field: 'is_default',
|
|
142
142
|
defaultValue: false,
|
|
143
143
|
},
|
|
144
|
-
|
|
144
|
+
academicCalendarId: {
|
|
145
145
|
type: sequelize_1.DataTypes.UUID,
|
|
146
|
-
field: '
|
|
146
|
+
field: 'academic_calendar_id',
|
|
147
147
|
allowNull: true,
|
|
148
148
|
},
|
|
149
149
|
oldId: {
|
|
@@ -9,7 +9,7 @@ declare class UserHasRoleModel extends Model<IUserHasRoleAttributes, TUserHasRol
|
|
|
9
9
|
roleId: string;
|
|
10
10
|
instituteId?: string;
|
|
11
11
|
oldId?: string;
|
|
12
|
-
|
|
12
|
+
academicCalendarId?: string;
|
|
13
13
|
createdBy?: string;
|
|
14
14
|
updatedBy?: string;
|
|
15
15
|
deletedBy?: string;
|
|
@@ -27,11 +27,11 @@ class UserHasRoleModel extends sequelize_1.Model {
|
|
|
27
27
|
as: 'childUserHRole',
|
|
28
28
|
});
|
|
29
29
|
UserHasRoleModel.belongsTo(AcademicCalendarModel, {
|
|
30
|
-
foreignKey: { name: '
|
|
30
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
31
31
|
as: 'userHRollAcaCal',
|
|
32
32
|
});
|
|
33
33
|
AcademicCalendarModel.hasMany(UserHasRoleModel, {
|
|
34
|
-
foreignKey: { name: '
|
|
34
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
35
35
|
as: 'acaCalUserHasR',
|
|
36
36
|
});
|
|
37
37
|
UserHasRoleModel.belongsTo(UserModel, {
|
|
@@ -80,9 +80,9 @@ UserHasRoleModel.init({
|
|
|
80
80
|
field: 'old_id',
|
|
81
81
|
allowNull: true,
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
academicCalendarId: {
|
|
84
84
|
type: sequelize_1.DataTypes.UUID,
|
|
85
|
-
field: '
|
|
85
|
+
field: 'academic_calendar_id',
|
|
86
86
|
allowNull: true,
|
|
87
87
|
},
|
|
88
88
|
}, {
|
package/package.json
CHANGED