@kipicore/dbcore 1.1.223 → 1.1.224
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/20260122100413-student_fee_history_update.d.ts +2 -0
- package/dist/db/psql/migrations/20260122100413-student_fee_history_update.js +24 -0
- package/dist/interfaces/feeConfigInterface.d.ts +5 -2
- package/dist/interfaces/studentFeeHistoryInterface.d.ts +2 -1
- package/dist/models/mongodb/feeConfigModel.js +16 -7
- package/dist/models/psql/studentFeeHistoryModel.d.ts +1 -0
- package/dist/models/psql/studentFeeHistoryModel.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
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.history) {
|
|
6
|
+
await queryInterface.addColumn('student_fee_history', 'history', {
|
|
7
|
+
type: Sequelize.TEXT,
|
|
8
|
+
defaultValue: null,
|
|
9
|
+
allowNull: true,
|
|
10
|
+
field: 'history',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const down = async (queryInterface, Sequelize) => {
|
|
15
|
+
const table = await queryInterface.describeTable('student_fee_history');
|
|
16
|
+
// Remove only if column exists
|
|
17
|
+
if (table.history) {
|
|
18
|
+
await queryInterface.removeColumn('student_fee_history', 'history');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
module.exports = {
|
|
22
|
+
up,
|
|
23
|
+
down,
|
|
24
|
+
};
|
|
@@ -7,7 +7,10 @@ export interface IFeeConfigModelAttributes extends IDefaultAttributes, Document
|
|
|
7
7
|
academicCalendarId: string;
|
|
8
8
|
feeCollectionTypes: FEE_COLLECTION_TYPE[];
|
|
9
9
|
paymentMethods: PAYMENT_TYPE[];
|
|
10
|
-
isRefundable: boolean;
|
|
11
|
-
isTaxable: boolean;
|
|
12
10
|
oldId?: string;
|
|
11
|
+
oldPendingFees: {
|
|
12
|
+
oldPendingAmount: string;
|
|
13
|
+
oldPaymentMethods: PAYMENT_TYPE[];
|
|
14
|
+
bankAccounts: string[];
|
|
15
|
+
};
|
|
13
16
|
}
|
|
@@ -12,12 +12,13 @@ export interface IStudentFeeHistoryModelAttributes extends IDefaultAttributes {
|
|
|
12
12
|
feeTypeId?: string;
|
|
13
13
|
subjectId?: string;
|
|
14
14
|
batchId?: string;
|
|
15
|
-
bankAccountId?: string;
|
|
15
|
+
bankAccountId?: string | null;
|
|
16
16
|
invoicePdf?: string;
|
|
17
17
|
invoiceNumber?: string;
|
|
18
18
|
studentFeeCollectionId: string;
|
|
19
19
|
feeHistoryConfigId?: string;
|
|
20
20
|
note?: string;
|
|
21
|
+
history?: string;
|
|
21
22
|
paidDate: Date;
|
|
22
23
|
upiId?: string;
|
|
23
24
|
bankName?: string;
|
|
@@ -58,13 +58,22 @@ const FeeConfigSchema = new mongoose_1.Schema({
|
|
|
58
58
|
required: true,
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
oldPendingFees: {
|
|
62
|
+
oldPendingAmount: {
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
oldPaymentMethods: [
|
|
66
|
+
{
|
|
67
|
+
type: String,
|
|
68
|
+
enum: Object.values(app_1.PAYMENT_TYPE),
|
|
69
|
+
default: [],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
bankAccounts: [
|
|
73
|
+
{
|
|
74
|
+
type: String,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
68
77
|
},
|
|
69
78
|
oldId: {
|
|
70
79
|
type: String,
|
|
@@ -151,6 +151,7 @@ StudentFeeHistoryModel.init({
|
|
|
151
151
|
chequeNo: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
152
152
|
subjectId: { type: sequelize_1.DataTypes.UUID, field: 'subject_id', allowNull: true },
|
|
153
153
|
batchId: { type: sequelize_1.DataTypes.UUID, field: 'batch_id', allowNull: true },
|
|
154
|
+
history: { type: sequelize_1.DataTypes.TEXT, field: 'history', allowNull: true },
|
|
154
155
|
}, {
|
|
155
156
|
modelName: 'StudentFeeHistoryModel',
|
|
156
157
|
tableName: 'student_fee_history',
|
package/package.json
CHANGED