@kipicore/dbcore 1.1.512 → 1.1.513
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/20260518140133-fee_submission_track.js +2 -2
- package/dist/db/psql/migrations/20260519071913-change-parent-id-to-array-in-fee-submission-track.d.ts +2 -0
- package/dist/db/psql/migrations/20260519071913-change-parent-id-to-array-in-fee-submission-track.js +32 -0
- package/dist/interfaces/feeSubmissionTrackInterface.d.ts +1 -1
- package/dist/models/psql/feeSubmissionTrackModel.d.ts +1 -1
- package/dist/models/psql/feeSubmissionTrackModel.js +1 -9
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
package/dist/constants/app.js
CHANGED
|
@@ -1670,4 +1670,5 @@ var FEE_SUBMISSION_STATUS;
|
|
|
1670
1670
|
FEE_SUBMISSION_STATUS["ACCEPTED"] = "ACCEPTED";
|
|
1671
1671
|
FEE_SUBMISSION_STATUS["NOT_ACCEPTED"] = "NOT_ACCEPTED";
|
|
1672
1672
|
FEE_SUBMISSION_STATUS["RECEIVED"] = "RECEIVED";
|
|
1673
|
+
FEE_SUBMISSION_STATUS["SENT"] = "SENT";
|
|
1673
1674
|
})(FEE_SUBMISSION_STATUS || (exports.FEE_SUBMISSION_STATUS = FEE_SUBMISSION_STATUS = {}));
|
|
@@ -14,7 +14,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
14
14
|
primaryKey: true,
|
|
15
15
|
},
|
|
16
16
|
parentId: {
|
|
17
|
-
type: Sequelize.UUID,
|
|
17
|
+
type: Sequelize.ARRAY(Sequelize.UUID),
|
|
18
18
|
allowNull: true,
|
|
19
19
|
field: 'parent_id',
|
|
20
20
|
},
|
|
@@ -98,7 +98,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
98
98
|
primaryKey: true,
|
|
99
99
|
},
|
|
100
100
|
parentId: {
|
|
101
|
-
type: Sequelize.UUID,
|
|
101
|
+
type: Sequelize.ARRAY(Sequelize.UUID),
|
|
102
102
|
allowNull: true,
|
|
103
103
|
field: 'parent_id',
|
|
104
104
|
},
|
package/dist/db/psql/migrations/20260519071913-change-parent-id-to-array-in-fee-submission-track.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const tableName = 'fee_submission_track';
|
|
4
|
+
const tableDescription = await queryInterface.describeTable(tableName);
|
|
5
|
+
// If column exists -> change datatype
|
|
6
|
+
if (tableDescription.parent_id) {
|
|
7
|
+
await queryInterface.changeColumn(tableName, 'parent_id', {
|
|
8
|
+
type: Sequelize.ARRAY(Sequelize.UUID),
|
|
9
|
+
allowNull: true,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
await queryInterface.addColumn(tableName, 'parent_id', {
|
|
14
|
+
type: Sequelize.ARRAY(Sequelize.UUID),
|
|
15
|
+
allowNull: true,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const down = async (queryInterface, Sequelize) => {
|
|
20
|
+
const tableName = 'fee_submission_track';
|
|
21
|
+
const tableDescription = await queryInterface.describeTable(tableName);
|
|
22
|
+
if (tableDescription.parent_id) {
|
|
23
|
+
await queryInterface.changeColumn(tableName, 'parent_id', {
|
|
24
|
+
type: Sequelize.ARRAY(Sequelize.UUID),
|
|
25
|
+
allowNull: true,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
module.exports = {
|
|
30
|
+
up,
|
|
31
|
+
down,
|
|
32
|
+
};
|
|
@@ -8,7 +8,7 @@ export interface IFeeSubmissionTrackModelAttributes extends IDefaultAttributes {
|
|
|
8
8
|
instituteId?: string;
|
|
9
9
|
academicCalendarId?: string;
|
|
10
10
|
submittedUserId?: string;
|
|
11
|
-
parentId?: string;
|
|
11
|
+
parentId?: string[];
|
|
12
12
|
submittedDate?: Date;
|
|
13
13
|
collectedDate?: Date;
|
|
14
14
|
}
|
|
@@ -10,7 +10,7 @@ declare class FeeSubmissionTrackModel extends Model<IFeeSubmissionTrackModelAttr
|
|
|
10
10
|
academicCalendarId?: string;
|
|
11
11
|
status: FEE_SUBMISSION_STATUS;
|
|
12
12
|
submittedUserId?: string;
|
|
13
|
-
parentId?: string;
|
|
13
|
+
parentId?: string[];
|
|
14
14
|
submittedDate?: Date;
|
|
15
15
|
collectedDate?: Date;
|
|
16
16
|
createdBy?: string;
|
|
@@ -5,14 +5,6 @@ const index_1 = require("./index");
|
|
|
5
5
|
class FeeSubmissionTrackModel extends sequelize_1.Model {
|
|
6
6
|
static associate(models) {
|
|
7
7
|
const { UserModel, InstituteModel, AcademicCalendarModel } = models;
|
|
8
|
-
FeeSubmissionTrackModel.hasMany(FeeSubmissionTrackModel, {
|
|
9
|
-
foreignKey: {
|
|
10
|
-
name: 'parentId',
|
|
11
|
-
allowNull: true,
|
|
12
|
-
field: 'parent_id',
|
|
13
|
-
},
|
|
14
|
-
as: 'feeSubmissionTrackChildren',
|
|
15
|
-
});
|
|
16
8
|
FeeSubmissionTrackModel.belongsTo(UserModel, {
|
|
17
9
|
foreignKey: { name: 'collectorId', allowNull: true, field: 'collector_id' },
|
|
18
10
|
as: 'feeSubmissionTrackCollector',
|
|
@@ -81,7 +73,7 @@ FeeSubmissionTrackModel.init({
|
|
|
81
73
|
allowNull: true,
|
|
82
74
|
},
|
|
83
75
|
parentId: {
|
|
84
|
-
type: sequelize_1.DataTypes.UUID,
|
|
76
|
+
type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.UUID),
|
|
85
77
|
allowNull: true,
|
|
86
78
|
field: 'parent_id',
|
|
87
79
|
},
|
package/package.json
CHANGED