@kipicore/dbcore 1.1.174 → 1.1.176
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/db/psql/migrations/20251213105516-add_taluka_in_user.js +1 -1
- package/dist/db/psql/migrations/20251224062435-student_leave_request.js +6 -0
- package/dist/db/psql/migrations/20251225065859-update_ins_in_taluka.d.ts +2 -0
- package/dist/db/psql/migrations/20251225065859-update_ins_in_taluka.js +30 -0
- package/dist/models/psql/studentLeaveRequestModel.js +16 -0
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -662,7 +662,8 @@ export declare enum PDF_TEMPLATES {
|
|
|
662
662
|
BONAFIDE_CERTIFICATE_TEMPLATE = "bonafideCertificateTemplate",
|
|
663
663
|
CHARACTER_CERTIFICATES_TEMPLATE = "characterCertificateTemplate",
|
|
664
664
|
TRIAL_CERTIFICATE_TEMPLATE = "trialCertificateTemplate",
|
|
665
|
-
HALL_TICKET_TEMPLATE = "hallTicketTemplate"
|
|
665
|
+
HALL_TICKET_TEMPLATE = "hallTicketTemplate",
|
|
666
|
+
EVENT_CERTIFICATES = "eventCertificateTemplate"
|
|
666
667
|
}
|
|
667
668
|
export declare enum EMAIL_SUBJECTS {
|
|
668
669
|
CREATE_GUARDIAN_VERIFICATION = "Verification Of Guardian Request",
|
package/dist/constants/app.js
CHANGED
|
@@ -809,6 +809,7 @@ var PDF_TEMPLATES;
|
|
|
809
809
|
PDF_TEMPLATES["CHARACTER_CERTIFICATES_TEMPLATE"] = "characterCertificateTemplate";
|
|
810
810
|
PDF_TEMPLATES["TRIAL_CERTIFICATE_TEMPLATE"] = "trialCertificateTemplate";
|
|
811
811
|
PDF_TEMPLATES["HALL_TICKET_TEMPLATE"] = "hallTicketTemplate";
|
|
812
|
+
PDF_TEMPLATES["EVENT_CERTIFICATES"] = "eventCertificateTemplate";
|
|
812
813
|
})(PDF_TEMPLATES || (exports.PDF_TEMPLATES = PDF_TEMPLATES = {}));
|
|
813
814
|
var EMAIL_SUBJECTS;
|
|
814
815
|
(function (EMAIL_SUBJECTS) {
|
|
@@ -12,7 +12,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
12
12
|
}
|
|
13
13
|
if (!institutesTable.taluka) {
|
|
14
14
|
await queryInterface.addColumn('institutes', 'taluka', {
|
|
15
|
-
type: Sequelize.
|
|
15
|
+
type: Sequelize.STRING,
|
|
16
16
|
defaultValue: null,
|
|
17
17
|
allowNull: true,
|
|
18
18
|
field: 'taluka',
|
|
@@ -15,10 +15,12 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
15
15
|
},
|
|
16
16
|
startDate: {
|
|
17
17
|
type: Sequelize.DATE,
|
|
18
|
+
field: 'start_date',
|
|
18
19
|
allowNull: true,
|
|
19
20
|
},
|
|
20
21
|
endDate: {
|
|
21
22
|
type: Sequelize.DATE,
|
|
23
|
+
field: 'end_date',
|
|
22
24
|
allowNull: true,
|
|
23
25
|
},
|
|
24
26
|
reason: {
|
|
@@ -46,6 +48,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
46
48
|
},
|
|
47
49
|
leaveType: {
|
|
48
50
|
type: Sequelize.STRING,
|
|
51
|
+
field: 'leave_type',
|
|
49
52
|
allowNull: true,
|
|
50
53
|
},
|
|
51
54
|
instituteId: {
|
|
@@ -98,10 +101,12 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
98
101
|
},
|
|
99
102
|
startDate: {
|
|
100
103
|
type: Sequelize.DATE,
|
|
104
|
+
field: 'start_date',
|
|
101
105
|
allowNull: true,
|
|
102
106
|
},
|
|
103
107
|
endDate: {
|
|
104
108
|
type: Sequelize.DATE,
|
|
109
|
+
field: 'end_date',
|
|
105
110
|
allowNull: true,
|
|
106
111
|
},
|
|
107
112
|
reason: {
|
|
@@ -129,6 +134,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
129
134
|
},
|
|
130
135
|
leaveType: {
|
|
131
136
|
type: Sequelize.STRING,
|
|
137
|
+
field: 'leave_type',
|
|
132
138
|
allowNull: true,
|
|
133
139
|
},
|
|
134
140
|
instituteId: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('institutes');
|
|
4
|
+
// Case 1: taluka column does NOT exist → add as STRING
|
|
5
|
+
if (!table.taluka) {
|
|
6
|
+
await queryInterface.addColumn('institutes', 'taluka', {
|
|
7
|
+
type: Sequelize.STRING,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
defaultValue: null,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
// Case 2: taluka exists AND type is UUID → change to STRING
|
|
13
|
+
else if (table.taluka.type &&
|
|
14
|
+
table.taluka.type.toLowerCase().includes('uuid')) {
|
|
15
|
+
await queryInterface.changeColumn('institutes', 'taluka', {
|
|
16
|
+
type: Sequelize.STRING,
|
|
17
|
+
allowNull: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const down = async (queryInterface, Sequelize) => {
|
|
22
|
+
const table = await queryInterface.describeTable('institutes');
|
|
23
|
+
if (table.taluka) {
|
|
24
|
+
await queryInterface.removeColumn('institutes', 'taluka');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
module.exports = {
|
|
28
|
+
up,
|
|
29
|
+
down,
|
|
30
|
+
};
|
|
@@ -45,6 +45,22 @@ class StudentLeaveRequestModel extends sequelize_1.Model {
|
|
|
45
45
|
},
|
|
46
46
|
as: 'fileStudentLeave',
|
|
47
47
|
});
|
|
48
|
+
StudentLeaveRequestModel.belongsTo(UserModel, {
|
|
49
|
+
foreignKey: {
|
|
50
|
+
name: 'userId',
|
|
51
|
+
allowNull: true,
|
|
52
|
+
field: 'user_id',
|
|
53
|
+
},
|
|
54
|
+
as: 'leaveUserDetails',
|
|
55
|
+
});
|
|
56
|
+
UserModel.hasMany(StudentLeaveRequestModel, {
|
|
57
|
+
foreignKey: {
|
|
58
|
+
name: 'userId',
|
|
59
|
+
allowNull: true,
|
|
60
|
+
field: 'user_id',
|
|
61
|
+
},
|
|
62
|
+
as: 'userDetailsLeaveRequest',
|
|
63
|
+
});
|
|
48
64
|
StudentLeaveRequestModel.belongsTo(UserModel, {
|
|
49
65
|
foreignKey: {
|
|
50
66
|
name: 'createdBy',
|
package/package.json
CHANGED