@kipicore/dbcore 1.1.208 → 1.1.210
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 +4 -1
- package/dist/constants/app.js +3 -0
- package/dist/db/psql/index.js +7 -1
- package/dist/db/psql/migrations/20260119124136-student_feehistroy_update_feeType.d.ts +2 -0
- package/dist/db/psql/migrations/20260119124136-student_feehistroy_update_feeType.js +32 -0
- package/dist/db/psql/migrations/20260119130105-student_feeType_update.d.ts +2 -0
- package/dist/db/psql/migrations/20260119130105-student_feeType_update.js +35 -0
- package/dist/db/psql/migrations/20260119130624-student_histroy_update.d.ts +2 -0
- package/dist/db/psql/migrations/20260119130624-student_histroy_update.js +35 -0
- package/dist/db/psql/seeders/Data/GenerateIdModule.js +3 -1
- package/dist/db/psql/seeders/Data/campusCarnival.js +1 -0
- package/dist/db/psql/seeders/Data/certificateManagementModule.d.ts +13 -0
- package/dist/db/psql/seeders/Data/certificateManagementModule.js +31 -0
- package/dist/db/psql/seeders/Data/dashboardManagementModule.d.ts +13 -0
- package/dist/db/psql/seeders/Data/dashboardManagementModule.js +38 -0
- package/dist/db/psql/seeders/Data/transportModule.d.ts +13 -0
- package/dist/db/psql/seeders/Data/transportModule.js +43 -0
- package/dist/interfaces/studentFeeHistoryInterface.d.ts +3 -1
- package/dist/interfaces/studentFeeTypeCollectionInterface.d.ts +3 -1
- package/dist/models/psql/studentFeeHistoryModel.d.ts +3 -1
- package/dist/models/psql/studentFeeHistoryModel.js +29 -3
- package/dist/models/psql/studentFeeTypeCollectionModel.d.ts +2 -0
- package/dist/models/psql/studentFeeTypeCollectionModel.js +19 -1
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -680,7 +680,10 @@ export declare enum EMAIL_SUBJECTS {
|
|
|
680
680
|
TEACHER_VERIFICATION = "Verification Of Joining Institute as Teacher",
|
|
681
681
|
STUDENT_VERIFICATION = "Verification Of Joining School as Student",
|
|
682
682
|
CONTACT_SUPPORT = "Contact Support for Institute",
|
|
683
|
-
FEEDBACK = "Feedback for Institute"
|
|
683
|
+
FEEDBACK = "Feedback for Institute",
|
|
684
|
+
ACHIEVEMENT_CERTIFICATE = "Your Achievement Certificate",
|
|
685
|
+
PARTICIPATION_CERTIFICATE = "Your Participation Certificate",
|
|
686
|
+
ADD_ADMIN_VERIFICATION = "You\u2019ve been added as Admin Staff into institute"
|
|
684
687
|
}
|
|
685
688
|
export declare const bankAccountRegexMap: Record<'SBIN' | 'HDFC' | 'ICIC' | 'UTIB' | 'PUNB' | 'BARB' | 'KKBK' | 'YESB' | 'CNRB' | 'UBIN' | 'INDB' | 'IDFB' | 'FDRL' | 'HSBC' | 'RATN' | 'SIBL' | 'KVBL' | 'UCBA' | 'BKID' | 'CBIN' | 'IOBA' | 'DBSS' | 'VIJB' | 'BKDN' | 'SYNB' | 'TMBL' | 'CIUB' | 'SCBL' | 'SRCB', RegExp>;
|
|
686
689
|
export declare const templateKeyWord: {
|
package/dist/constants/app.js
CHANGED
|
@@ -830,6 +830,9 @@ var EMAIL_SUBJECTS;
|
|
|
830
830
|
EMAIL_SUBJECTS["STUDENT_VERIFICATION"] = "Verification Of Joining School as Student";
|
|
831
831
|
EMAIL_SUBJECTS["CONTACT_SUPPORT"] = "Contact Support for Institute";
|
|
832
832
|
EMAIL_SUBJECTS["FEEDBACK"] = "Feedback for Institute";
|
|
833
|
+
EMAIL_SUBJECTS["ACHIEVEMENT_CERTIFICATE"] = "Your Achievement Certificate";
|
|
834
|
+
EMAIL_SUBJECTS["PARTICIPATION_CERTIFICATE"] = "Your Participation Certificate";
|
|
835
|
+
EMAIL_SUBJECTS["ADD_ADMIN_VERIFICATION"] = "You\u2019ve been added as Admin Staff into institute";
|
|
833
836
|
})(EMAIL_SUBJECTS || (exports.EMAIL_SUBJECTS = EMAIL_SUBJECTS = {}));
|
|
834
837
|
exports.bankAccountRegexMap = {
|
|
835
838
|
SBIN: /^[0-9]{11}$/, // State Bank of India
|
package/dist/db/psql/index.js
CHANGED
|
@@ -62,6 +62,9 @@ const RulesRegulationModule = require('./seeders/Data/rulesRegulationModule');
|
|
|
62
62
|
const BirthdayModule = require('./seeders/Data/birthdayModule');
|
|
63
63
|
const BlogModule = require('./seeders/Data/blogModule');
|
|
64
64
|
const CampusCarnivalModule = require('./seeders/Data/campusCarnival');
|
|
65
|
+
// const TransportModule = require('./seeders/Data/transportModule'); // Need to uncomment transport module is ready
|
|
66
|
+
// const DashboardManagementModule = require('./seeders/Data/dashboardManagementModule'); // Need to uncomment dashboard module is ready
|
|
67
|
+
// const CertificateManagementModule = require('./seeders/Data/certificateManagementModule'); // Need to uncomment certificate module is ready
|
|
65
68
|
const allModules = [
|
|
66
69
|
AcademicCalendarModule,
|
|
67
70
|
// AdministrativeStaffModule,
|
|
@@ -122,6 +125,9 @@ const allModules = [
|
|
|
122
125
|
RulesRegulationModule,
|
|
123
126
|
BirthdayModule,
|
|
124
127
|
BlogModule,
|
|
125
|
-
CampusCarnivalModule
|
|
128
|
+
CampusCarnivalModule,
|
|
129
|
+
// TransportModule // Need to uncomment transport module is ready
|
|
130
|
+
// DashboardManagementModule // Need to uncomment dashboard module is ready
|
|
131
|
+
// CertificateManagementModule // Need to uncomment certificate module is ready
|
|
126
132
|
];
|
|
127
133
|
module.exports = allModules;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('student_fee_history');
|
|
4
|
+
// Check if column already exists
|
|
5
|
+
if (!table.fee_type_id) {
|
|
6
|
+
await queryInterface.sequelize.query(`
|
|
7
|
+
UPDATE student_fee_history
|
|
8
|
+
SET fee_type_id = fee_type_id[1]
|
|
9
|
+
WHERE fee_type_id IS NOT NULL
|
|
10
|
+
AND array_length(fee_type_id, 1) > 0;
|
|
11
|
+
`);
|
|
12
|
+
// 2. Change column type to UUID
|
|
13
|
+
await queryInterface.changeColumn('student_fee_history', 'fee_type_id', {
|
|
14
|
+
type: Sequelize.UUID,
|
|
15
|
+
allowNull: true,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const down = async (queryInterface, Sequelize) => {
|
|
20
|
+
const table = await queryInterface.describeTable('student_fee_history');
|
|
21
|
+
// Remove only if column exists
|
|
22
|
+
if (table.fee_type_id) {
|
|
23
|
+
await queryInterface.changeColumn('student_fee_history', 'fee_type_id', {
|
|
24
|
+
type: Sequelize.ARRAY(Sequelize.STRING),
|
|
25
|
+
allowNull: true,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
module.exports = {
|
|
30
|
+
up,
|
|
31
|
+
down,
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('student_fee_type_collection');
|
|
4
|
+
// Check if column already exists
|
|
5
|
+
if (!table.subject_id) {
|
|
6
|
+
await queryInterface.addColumn('student_fee_type_collection', 'subject_id', {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: null,
|
|
9
|
+
allowNull: true,
|
|
10
|
+
field: 'subject_id',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (!table.batch_id) {
|
|
14
|
+
await queryInterface.addColumn('student_fee_type_collection', 'batch_id', {
|
|
15
|
+
type: Sequelize.UUID,
|
|
16
|
+
defaultValue: null,
|
|
17
|
+
allowNull: true,
|
|
18
|
+
field: 'batch_id',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const down = async (queryInterface, Sequelize) => {
|
|
23
|
+
const table = await queryInterface.describeTable('student_fee_type_collection');
|
|
24
|
+
// Remove only if column exists
|
|
25
|
+
if (table.subject_id) {
|
|
26
|
+
await queryInterface.removeColumn('student_fee_type_collection', 'subject_id');
|
|
27
|
+
}
|
|
28
|
+
if (table.batch_id) {
|
|
29
|
+
await queryInterface.removeColumn('student_fee_type_collection', 'batch_id');
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
module.exports = {
|
|
33
|
+
up,
|
|
34
|
+
down,
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('student_fee_history');
|
|
4
|
+
// Check if column already exists
|
|
5
|
+
if (!table.subject_id) {
|
|
6
|
+
await queryInterface.addColumn('student_fee_history', 'subject_id', {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: null,
|
|
9
|
+
allowNull: true,
|
|
10
|
+
field: 'subject_id',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (!table.batch_id) {
|
|
14
|
+
await queryInterface.addColumn('student_fee_history', 'batch_id', {
|
|
15
|
+
type: Sequelize.UUID,
|
|
16
|
+
defaultValue: null,
|
|
17
|
+
allowNull: true,
|
|
18
|
+
field: 'batch_id',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const down = async (queryInterface, Sequelize) => {
|
|
23
|
+
const table = await queryInterface.describeTable('student_fee_history');
|
|
24
|
+
// Remove only if column exists
|
|
25
|
+
if (table.subject_id) {
|
|
26
|
+
await queryInterface.removeColumn('student_fee_history', 'subject_id');
|
|
27
|
+
}
|
|
28
|
+
if (table.batch_id) {
|
|
29
|
+
await queryInterface.removeColumn('student_fee_history', 'batch_id');
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
module.exports = {
|
|
33
|
+
up,
|
|
34
|
+
down,
|
|
35
|
+
};
|
|
@@ -11,7 +11,9 @@ const GenerateIdModule = {
|
|
|
11
11
|
code: 'GENERATEIDCARD.GENERATEIDCARD',
|
|
12
12
|
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
13
13
|
actions: [
|
|
14
|
-
{ name: '
|
|
14
|
+
{ name: 'Add', code: 'GENERATEIDCARD.GENERATEIDCARD.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
15
|
+
{ name: 'View', code: 'GENERATEIDCARD.GENERATEIDCARD.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
16
|
+
{ name: 'Update', code: 'GENERATEIDCARD.GENERATEIDCARD.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
15
17
|
],
|
|
16
18
|
},
|
|
17
19
|
],
|
|
@@ -25,6 +25,7 @@ const CampusCarnivalModule = {
|
|
|
25
25
|
{ name: 'Update', code: 'CAMPUSCARNIVAL.COMPETITIONMANAGEMENT.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
|
|
26
26
|
{ name: 'View', code: 'CAMPUSCARNIVAL.COMPETITIONMANAGEMENT.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
|
|
27
27
|
{ name: 'Delete', code: 'CAMPUSCARNIVAL.COMPETITIONMANAGEMENT.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
|
|
28
|
+
{ name: 'Winner', code: 'CAMPUSCARNIVAL.COMPETITIONMANAGEMENT.WINNER', appType: [appTypeEnum.SCHOOL_APP] },
|
|
28
29
|
],
|
|
29
30
|
},
|
|
30
31
|
{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const appTypeEnum = require('./appType');
|
|
3
|
+
const CertificateManagementModule = {
|
|
4
|
+
name: 'Certificate',
|
|
5
|
+
code: 'CERTIFICATE',
|
|
6
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
7
|
+
features: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Certificate Templates',
|
|
10
|
+
code: 'CERTIFICATE.CERTIFICATEMANAGEMENT',
|
|
11
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
12
|
+
actions: [
|
|
13
|
+
{ name: 'View', code: 'CERTIFICATE.CERTIFICATEMANAGEMENT.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
14
|
+
{ name: 'Add', code: 'CERTIFICATE.CERTIFICATEMANAGEMENT.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
15
|
+
{ name: 'Update', code: 'CERTIFICATE.CERTIFICATEMANAGEMENT.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
16
|
+
{ name: 'Delete', code: 'CERTIFICATE.CERTIFICATEMANAGEMENT.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Certificate Generation',
|
|
21
|
+
code: 'CERTIFICATE.CERTIFICATEGENERATION',
|
|
22
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
23
|
+
actions: [
|
|
24
|
+
{ name: 'View', code: 'CERTIFICATE.CERTIFICATEGENERATION.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
25
|
+
{ name: 'Add', code: 'CERTIFICATE.CERTIFICATEGENERATION.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
26
|
+
{ name: 'Delete', code: 'CERTIFICATE.CERTIFICATEGENERATION.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
module.exports = CertificateManagementModule;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const appTypeEnum = require('./appType');
|
|
3
|
+
const DashboardManagementModule = {
|
|
4
|
+
name: 'Dashboard Management',
|
|
5
|
+
code: 'DASHBOARD',
|
|
6
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
7
|
+
features: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Quick Actions',
|
|
10
|
+
code: 'DASHBOARD.QUICKACTIONS',
|
|
11
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
12
|
+
actions: [
|
|
13
|
+
{ name: 'View', code: 'DASHBOARD.QUICKACTIONS.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
14
|
+
{ name: 'Add', code: 'DASHBOARD.QUICKACTIONS.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
15
|
+
{ name: 'Update', code: 'DASHBOARD.QUICKACTIONS.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
16
|
+
{ name: 'Delete', code: 'DASHBOARD.QUICKACTIONS.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Analytics',
|
|
21
|
+
code: 'DASHBOARD.ANALYTICS',
|
|
22
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
23
|
+
actions: [{ name: 'View', code: 'DASHBOARD.ANALYTICS.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] }],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Module List',
|
|
27
|
+
code: 'DASHBOARD.DASHBOARDLIST',
|
|
28
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
29
|
+
actions: [
|
|
30
|
+
{ name: 'View', code: 'DASHBOARD.DASHBOARDLIST.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
31
|
+
{ name: 'Add', code: 'DASHBOARD.DASHBOARDLIST.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
32
|
+
{ name: 'Update', code: 'DASHBOARD.DASHBOARDLIST.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
33
|
+
{ name: 'Delete', code: 'DASHBOARD.DASHBOARDLIST.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
module.exports = DashboardManagementModule;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const appTypeEnum = require('./appType');
|
|
3
|
+
const TransportModule = {
|
|
4
|
+
name: 'Transport',
|
|
5
|
+
code: 'TRANSPORT',
|
|
6
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
7
|
+
features: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Vehical management',
|
|
10
|
+
code: 'TRANSPORT.VEHICALMANAGEMENT',
|
|
11
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
12
|
+
actions: [
|
|
13
|
+
{ name: 'Add', code: 'TRANSPORT.VEHICALMANAGEMENT.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
14
|
+
{ name: 'Update', code: 'TRANSPORT.VEHICALMANAGEMENT.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
15
|
+
{ name: 'View', code: 'TRANSPORT.VEHICALMANAGEMENT.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
16
|
+
{ name: 'Delete', code: 'TRANSPORT.VEHICALMANAGEMENT.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Driver management',
|
|
21
|
+
code: 'TRANSPORT.DRIVERMANAGEMENT',
|
|
22
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
23
|
+
actions: [
|
|
24
|
+
{ name: 'Add', code: 'TRANSPORT.DRIVERMANAGEMENT.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
25
|
+
{ name: 'Update', code: 'TRANSPORT.DRIVERMANAGEMENT.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
26
|
+
{ name: 'View', code: 'TRANSPORT.DRIVERMANAGEMENT.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
27
|
+
{ name: 'Delete', code: 'TRANSPORT.DRIVERMANAGEMENT.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Trip management',
|
|
32
|
+
code: 'TRANSPORT.TRIPMANAGEMENT',
|
|
33
|
+
appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
|
|
34
|
+
actions: [
|
|
35
|
+
{ name: 'Add', code: 'TRANSPORT.TRIPMANAGEMENT.ADD', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
36
|
+
{ name: 'Update', code: 'TRANSPORT.TRIPMANAGEMENT.UPDATE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
37
|
+
{ name: 'View', code: 'TRANSPORT.TRIPMANAGEMENT.VIEW', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
38
|
+
{ name: 'Delete', code: 'TRANSPORT.TRIPMANAGEMENT.DELETE', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
|
|
39
|
+
],
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
module.exports = TransportModule;
|
|
@@ -9,7 +9,9 @@ export interface IStudentFeeHistoryModelAttributes extends IDefaultAttributes {
|
|
|
9
9
|
paymentType: PAYMENT_TYPE;
|
|
10
10
|
paidFee: number;
|
|
11
11
|
status: FEE_HISTORY_STATUS;
|
|
12
|
-
feeTypeId?: string
|
|
12
|
+
feeTypeId?: string;
|
|
13
|
+
subjectId?: string;
|
|
14
|
+
batchId?: string;
|
|
13
15
|
bankAccountId?: string;
|
|
14
16
|
invoicePdf?: string;
|
|
15
17
|
invoiceNumber?: string;
|
|
@@ -6,7 +6,9 @@ export interface IStudentFeeTypeCollectionModelAttributes extends IDefaultAttrib
|
|
|
6
6
|
userId: string;
|
|
7
7
|
academicCalendarId: string;
|
|
8
8
|
studentFeeCollectionId: string;
|
|
9
|
-
feeTypeId
|
|
9
|
+
feeTypeId?: string;
|
|
10
|
+
subjectId?: string;
|
|
11
|
+
batchId?: string;
|
|
10
12
|
amount: number;
|
|
11
13
|
status: STUDENT_FEE_COLLECTION_STATUS;
|
|
12
14
|
paidAmount: number;
|
|
@@ -11,7 +11,7 @@ export declare class StudentFeeHistoryModel extends Model<IStudentFeeHistoryMode
|
|
|
11
11
|
paymentType: PAYMENT_TYPE;
|
|
12
12
|
paidFee: number;
|
|
13
13
|
status: FEE_HISTORY_STATUS;
|
|
14
|
-
feeTypeId?: string
|
|
14
|
+
feeTypeId?: string;
|
|
15
15
|
bankAccountId?: string;
|
|
16
16
|
invoicePdf?: string;
|
|
17
17
|
invoiceNumber?: string;
|
|
@@ -22,6 +22,8 @@ export declare class StudentFeeHistoryModel extends Model<IStudentFeeHistoryMode
|
|
|
22
22
|
upiId?: string;
|
|
23
23
|
bankName?: string;
|
|
24
24
|
chequeNo?: string;
|
|
25
|
+
batchId: string;
|
|
26
|
+
subjectId: string;
|
|
25
27
|
createdBy: string;
|
|
26
28
|
updatedBy: string;
|
|
27
29
|
deletedBy: string;
|
|
@@ -6,7 +6,7 @@ const index_1 = require("./index");
|
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
class StudentFeeHistoryModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, InstituteModel, StudentFeeCollectionModel, FileStorageModel, BankAccountDetailsModel, AcademicCalendarModel } = models;
|
|
9
|
+
const { UserModel, InstituteModel, StudentFeeCollectionModel, FileStorageModel, BankAccountDetailsModel, AcademicCalendarModel, FeeTypeModel, BatchModel, InstituteEntityModel, } = models;
|
|
10
10
|
StudentFeeHistoryModel.belongsTo(StudentFeeCollectionModel, {
|
|
11
11
|
foreignKey: { name: 'studentFeeCollectionId', field: 'student_fee_collection_id', allowNull: true },
|
|
12
12
|
as: 'feeHistoryCollection',
|
|
@@ -63,6 +63,14 @@ class StudentFeeHistoryModel extends sequelize_1.Model {
|
|
|
63
63
|
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
64
64
|
as: 'acaCalStudentFeeHistory',
|
|
65
65
|
});
|
|
66
|
+
StudentFeeHistoryModel.belongsTo(FeeTypeModel, {
|
|
67
|
+
foreignKey: { name: 'feeTypeId', field: 'feeType_id' },
|
|
68
|
+
as: 'studentFeeHistoryFeeType',
|
|
69
|
+
});
|
|
70
|
+
FeeTypeModel.hasMany(StudentFeeHistoryModel, {
|
|
71
|
+
foreignKey: { name: 'feeTypeId', field: 'feeType_id' },
|
|
72
|
+
as: 'feeTypeStudentFeeHistory',
|
|
73
|
+
});
|
|
66
74
|
StudentFeeHistoryModel.belongsTo(UserModel, {
|
|
67
75
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
68
76
|
as: 'createdByUser',
|
|
@@ -75,6 +83,22 @@ class StudentFeeHistoryModel extends sequelize_1.Model {
|
|
|
75
83
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
76
84
|
as: 'deletedByUser',
|
|
77
85
|
});
|
|
86
|
+
StudentFeeHistoryModel.belongsTo(InstituteEntityModel, {
|
|
87
|
+
foreignKey: { name: 'subjectId', field: 'subject_id' },
|
|
88
|
+
as: 'studentHistorySubject',
|
|
89
|
+
});
|
|
90
|
+
InstituteEntityModel.hasMany(StudentFeeHistoryModel, {
|
|
91
|
+
foreignKey: { name: 'subjectId', field: 'subject_id' },
|
|
92
|
+
as: 'subjectStudentHistory',
|
|
93
|
+
});
|
|
94
|
+
StudentFeeHistoryModel.belongsTo(BatchModel, {
|
|
95
|
+
foreignKey: { name: 'batchId', field: 'batch_id' },
|
|
96
|
+
as: 'studentHistoryBatch',
|
|
97
|
+
});
|
|
98
|
+
BatchModel.hasMany(StudentFeeHistoryModel, {
|
|
99
|
+
foreignKey: { name: 'batchId', field: 'batch_id' },
|
|
100
|
+
as: 'batchStudentHistory',
|
|
101
|
+
});
|
|
78
102
|
}
|
|
79
103
|
static addHooks(models) {
|
|
80
104
|
StudentFeeHistoryModel.beforeCreate(async (feeCollection) => {
|
|
@@ -114,17 +138,19 @@ StudentFeeHistoryModel.init({
|
|
|
114
138
|
paymentType: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
115
139
|
paidFee: { type: sequelize_1.DataTypes.INTEGER, allowNull: true },
|
|
116
140
|
status: { type: sequelize_1.DataTypes.STRING, allowNull: true, defaultValue: constants_1.FEE_HISTORY_STATUS.COMPLETED },
|
|
117
|
-
feeTypeId: { type: sequelize_1.DataTypes.
|
|
141
|
+
feeTypeId: { type: sequelize_1.DataTypes.UUID, field: 'fee_type_id', allowNull: true, defaultValue: null },
|
|
118
142
|
bankAccountId: { type: sequelize_1.DataTypes.UUID, field: 'bank_account_id', allowNull: true },
|
|
119
143
|
invoicePdf: { type: sequelize_1.DataTypes.UUID, field: 'invoice_pdf', allowNull: true },
|
|
120
144
|
invoiceNumber: { type: sequelize_1.DataTypes.STRING, field: 'invoice_number', allowNull: true },
|
|
121
|
-
feeHistoryConfigId: { type: sequelize_1.DataTypes.STRING, field: 'fee_history_config_id', allowNull: true },
|
|
145
|
+
feeHistoryConfigId: { type: sequelize_1.DataTypes.STRING, field: 'fee_history_config_id', allowNull: true }, // group id for one time pay all fee
|
|
122
146
|
note: { type: sequelize_1.DataTypes.STRING, field: 'note', allowNull: true },
|
|
123
147
|
studentFeeCollectionId: { type: sequelize_1.DataTypes.UUID, field: 'student_fee_collection_id', allowNull: true },
|
|
124
148
|
paidDate: { type: sequelize_1.DataTypes.DATE, defaultValue: sequelize_1.DataTypes.NOW, allowNull: true },
|
|
125
149
|
upiId: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
126
150
|
bankName: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
127
151
|
chequeNo: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
152
|
+
subjectId: { type: sequelize_1.DataTypes.UUID, field: 'subject_id', allowNull: true },
|
|
153
|
+
batchId: { type: sequelize_1.DataTypes.UUID, field: 'batch_id', allowNull: true },
|
|
128
154
|
}, {
|
|
129
155
|
modelName: 'StudentFeeHistoryModel',
|
|
130
156
|
tableName: 'student_fee_history',
|
|
@@ -9,6 +9,8 @@ export declare class StudentFeeTypeCollectionModel extends Model<IStudentFeeType
|
|
|
9
9
|
academicCalendarId: string;
|
|
10
10
|
studentFeeCollectionId: string;
|
|
11
11
|
feeTypeId: string;
|
|
12
|
+
batchId: string;
|
|
13
|
+
subjectId: string;
|
|
12
14
|
amount: number;
|
|
13
15
|
status: STUDENT_FEE_COLLECTION_STATUS;
|
|
14
16
|
paidAmount: number;
|
|
@@ -6,7 +6,7 @@ const index_1 = require("./index");
|
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
class StudentFeeTypeCollectionModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, InstituteModel, StudentFeeCollectionModel, AcademicCalendarModel, FeeTypeModel } = models;
|
|
9
|
+
const { UserModel, InstituteModel, StudentFeeCollectionModel, AcademicCalendarModel, FeeTypeModel, InstituteEntityModel, BatchModel } = models;
|
|
10
10
|
StudentFeeTypeCollectionModel.belongsTo(StudentFeeCollectionModel, {
|
|
11
11
|
foreignKey: { name: 'studentFeeCollectionId', field: 'student_fee_collection_id', allowNull: true },
|
|
12
12
|
as: 'feeTypeCollection',
|
|
@@ -47,6 +47,22 @@ class StudentFeeTypeCollectionModel extends sequelize_1.Model {
|
|
|
47
47
|
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
48
48
|
as: 'acaCalFeeTypeCollection',
|
|
49
49
|
});
|
|
50
|
+
StudentFeeTypeCollectionModel.belongsTo(InstituteEntityModel, {
|
|
51
|
+
foreignKey: { name: 'subjectId', field: 'subject_id' },
|
|
52
|
+
as: 'feeTypeCollectionSubject',
|
|
53
|
+
});
|
|
54
|
+
InstituteEntityModel.hasMany(StudentFeeTypeCollectionModel, {
|
|
55
|
+
foreignKey: { name: 'subjectId', field: 'subject_id' },
|
|
56
|
+
as: 'subjectFeeTypeCollection',
|
|
57
|
+
});
|
|
58
|
+
StudentFeeTypeCollectionModel.belongsTo(BatchModel, {
|
|
59
|
+
foreignKey: { name: 'batchId', field: 'batch_id' },
|
|
60
|
+
as: 'feeTypeCollectionBatch',
|
|
61
|
+
});
|
|
62
|
+
BatchModel.hasMany(StudentFeeTypeCollectionModel, {
|
|
63
|
+
foreignKey: { name: 'batchId', field: 'batch_id' },
|
|
64
|
+
as: 'batchFeeTypeCollection',
|
|
65
|
+
});
|
|
50
66
|
StudentFeeTypeCollectionModel.belongsTo(FeeTypeModel, {
|
|
51
67
|
foreignKey: {
|
|
52
68
|
name: 'feeTypeId',
|
|
@@ -87,6 +103,8 @@ StudentFeeTypeCollectionModel.init({
|
|
|
87
103
|
paidAmount: { type: sequelize_1.DataTypes.INTEGER, allowNull: true },
|
|
88
104
|
status: { type: sequelize_1.DataTypes.STRING, allowNull: true, defaultValue: constants_1.STUDENT_FEE_COLLECTION_STATUS.PENDING },
|
|
89
105
|
feeTypeId: { type: sequelize_1.DataTypes.UUID, field: 'fee_type_id', allowNull: true },
|
|
106
|
+
subjectId: { type: sequelize_1.DataTypes.UUID, field: 'subject_id', allowNull: true },
|
|
107
|
+
batchId: { type: sequelize_1.DataTypes.UUID, field: 'batch_id', allowNull: true },
|
|
90
108
|
}, {
|
|
91
109
|
modelName: 'StudentFeeTypeCollectionModel',
|
|
92
110
|
tableName: 'student_fee_type_collection',
|
package/package.json
CHANGED