@kipicore/dbcore 1.1.223 → 1.1.225

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.
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -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.credit_amount) {
6
+ await queryInterface.addColumn('student_fee_history', 'credit_amount', {
7
+ type: Sequelize.INTEGER,
8
+ defaultValue: 0,
9
+ allowNull: true,
10
+ field: 'credit_amount',
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.credit_amount) {
18
+ await queryInterface.removeColumn('student_fee_history', 'credit_amount');
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
  }
@@ -17,4 +17,5 @@ export interface IStudentFeeCollectionModelAttributes extends IDefaultAttributes
17
17
  carryForwardTo?: string;
18
18
  carryForwardFee?: number;
19
19
  processStatus: STUDENT_FEE_PROCESS_STATUS;
20
+ creditAmount: number;
20
21
  }
@@ -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
- isRefundable: {
62
- type: Boolean,
63
- required: false,
64
- },
65
- isTaxable: {
66
- type: Boolean,
67
- required: false,
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,
@@ -19,6 +19,7 @@ declare class StudentFeeCollectionModel extends Model<IStudentFeeCollectionModel
19
19
  carryForwardTo: string;
20
20
  carryForwardFee: number;
21
21
  processStatus: STUDENT_FEE_PROCESS_STATUS;
22
+ creditAmount: number;
22
23
  createdBy: string;
23
24
  updatedBy: string;
24
25
  deletedBy: string;
@@ -155,6 +155,12 @@ StudentFeeCollectionModel.init({
155
155
  defaultValue: app_1.STUDENT_FEE_PROCESS_STATUS.COMPLETED,
156
156
  field: 'process_status',
157
157
  },
158
+ creditAmount: {
159
+ type: sequelize_1.DataTypes.INTEGER,
160
+ allowNull: true,
161
+ defaultValue: 0,
162
+ field: 'credit_amount',
163
+ },
158
164
  }, {
159
165
  modelName: 'StudentFeeCollectionModel',
160
166
  tableName: 'student_fee_collection',
@@ -24,6 +24,7 @@ export declare class StudentFeeHistoryModel extends Model<IStudentFeeHistoryMode
24
24
  chequeNo?: string;
25
25
  batchId: string;
26
26
  subjectId: string;
27
+ history?: string;
27
28
  createdBy: string;
28
29
  updatedBy: string;
29
30
  deletedBy: 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.223",
3
+ "version": "1.1.225",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",