@kipicore/dbcore 1.1.490 → 1.1.491
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/constants/errorMessages.d.ts +1 -1
- package/dist/constants/errorMessages.js +1 -1
- package/dist/constants/successMessages.d.ts +2 -1
- package/dist/constants/successMessages.js +1 -0
- package/dist/db/psql/migrations/{20260105092543-userHasPenalties.js → 20260105092543-user_has_penalties.js} +70 -0
- package/dist/db/psql/migrations/20260429101846-create_user_has_penalty_history.js +24 -4
- package/dist/db/psql/migrations/20260430083600-add_field_to_user_has_penalties.d.ts +2 -0
- package/dist/db/psql/migrations/20260430083600-add_field_to_user_has_penalties.js +31 -0
- package/dist/db/psql/migrations/20260501054431-add_field_to_for_cheque_user_has_penalties.d.ts +2 -0
- package/dist/db/psql/migrations/20260501054431-add_field_to_for_cheque_user_has_penalties.js +61 -0
- package/dist/interfaces/userHasPenaltyHistoryInterface.d.ts +3 -3
- package/dist/interfaces/userHasPenaltyInterface.d.ts +9 -2
- package/dist/models/psql/userHasPenaltyHistoryModel.d.ts +2 -2
- package/dist/models/psql/userHasPenaltyHistoryModel.js +3 -3
- package/dist/models/psql/userHasPenaltyModel.d.ts +10 -3
- package/dist/models/psql/userHasPenaltyModel.js +35 -14
- package/package.json +1 -1
- /package/dist/db/psql/migrations/{20260105092543-userHasPenalties.d.ts → 20260105092543-user_has_penalties.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20260429092000-add_field_to_user_has_penalty.d.ts → 20260429092000-add_field_to_user_has_penalties.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20260429092000-add_field_to_user_has_penalty.js → 20260429092000-add_field_to_user_has_penalties.js} +0 -0
package/dist/constants/app.d.ts
CHANGED
|
@@ -1357,7 +1357,8 @@ export declare enum VIDEO_EVENT_TYPE {
|
|
|
1357
1357
|
PLAY = "PLAY",
|
|
1358
1358
|
PAUSE = "PAUSE",
|
|
1359
1359
|
SPEED_CHANGE = "SPEED_CHANGE",
|
|
1360
|
-
SEEK = "SEEK"
|
|
1360
|
+
SEEK = "SEEK",
|
|
1361
|
+
ENDED = "ENDED"
|
|
1361
1362
|
}
|
|
1362
1363
|
export declare enum VIDEO_DIRECTION_TYPE {
|
|
1363
1364
|
SLIDER_SCRUB_FORWARD = "SLIDER_SCRUB_FORWARD",
|
package/dist/constants/app.js
CHANGED
|
@@ -1652,6 +1652,7 @@ var VIDEO_EVENT_TYPE;
|
|
|
1652
1652
|
VIDEO_EVENT_TYPE["PAUSE"] = "PAUSE";
|
|
1653
1653
|
VIDEO_EVENT_TYPE["SPEED_CHANGE"] = "SPEED_CHANGE";
|
|
1654
1654
|
VIDEO_EVENT_TYPE["SEEK"] = "SEEK";
|
|
1655
|
+
VIDEO_EVENT_TYPE["ENDED"] = "ENDED";
|
|
1655
1656
|
})(VIDEO_EVENT_TYPE || (exports.VIDEO_EVENT_TYPE = VIDEO_EVENT_TYPE = {}));
|
|
1656
1657
|
var VIDEO_DIRECTION_TYPE;
|
|
1657
1658
|
(function (VIDEO_DIRECTION_TYPE) {
|
|
@@ -85,7 +85,7 @@ export declare enum INQUIRY_ERROR_MESSAGES {
|
|
|
85
85
|
USER_ALREADY_EXIT = "user already in requested instituted",
|
|
86
86
|
USER_META_DATA_CREATE_FAIL = "Failed to add user to the institute.",
|
|
87
87
|
DATA_REQUIRED = "user batch data is required",
|
|
88
|
-
EMAIL_NOT_HAVE_SAME = "
|
|
88
|
+
EMAIL_NOT_HAVE_SAME = "User and parent email cannot be the same"
|
|
89
89
|
}
|
|
90
90
|
export declare enum INFORMATION_SUPPORT_ERROR_MESSAGES {
|
|
91
91
|
CREATE_FAIL = "Unable to create information support!",
|
|
@@ -96,7 +96,7 @@ var INQUIRY_ERROR_MESSAGES;
|
|
|
96
96
|
INQUIRY_ERROR_MESSAGES["USER_ALREADY_EXIT"] = "user already in requested instituted";
|
|
97
97
|
INQUIRY_ERROR_MESSAGES["USER_META_DATA_CREATE_FAIL"] = "Failed to add user to the institute.";
|
|
98
98
|
INQUIRY_ERROR_MESSAGES["DATA_REQUIRED"] = "user batch data is required";
|
|
99
|
-
INQUIRY_ERROR_MESSAGES["EMAIL_NOT_HAVE_SAME"] = "
|
|
99
|
+
INQUIRY_ERROR_MESSAGES["EMAIL_NOT_HAVE_SAME"] = "User and parent email cannot be the same";
|
|
100
100
|
})(INQUIRY_ERROR_MESSAGES || (exports.INQUIRY_ERROR_MESSAGES = INQUIRY_ERROR_MESSAGES = {}));
|
|
101
101
|
var INFORMATION_SUPPORT_ERROR_MESSAGES;
|
|
102
102
|
(function (INFORMATION_SUPPORT_ERROR_MESSAGES) {
|
|
@@ -895,7 +895,8 @@ export declare enum USER_HAS_PENALTY_SUCCESS_MESSAGES {
|
|
|
895
895
|
CREATE_SUCCESS = "User has penalty created successfully",
|
|
896
896
|
GET_SUCCESS = "User has penalty retrieved successfully",
|
|
897
897
|
UPDATE_SUCCESS = "User has penalty updated successfully",
|
|
898
|
-
DELETE_SUCCESS = "User has penalty deleted successfully"
|
|
898
|
+
DELETE_SUCCESS = "User has penalty deleted successfully",
|
|
899
|
+
AMOUNT_PAID = "Penalty amount has paid"
|
|
899
900
|
}
|
|
900
901
|
export declare enum EDUCATION_OFFICER_SUCCESS_MESSAGES {
|
|
901
902
|
CREATE_SUCCESS = "Education Officer created successfully",
|
|
@@ -1043,6 +1043,7 @@ var USER_HAS_PENALTY_SUCCESS_MESSAGES;
|
|
|
1043
1043
|
USER_HAS_PENALTY_SUCCESS_MESSAGES["GET_SUCCESS"] = "User has penalty retrieved successfully";
|
|
1044
1044
|
USER_HAS_PENALTY_SUCCESS_MESSAGES["UPDATE_SUCCESS"] = "User has penalty updated successfully";
|
|
1045
1045
|
USER_HAS_PENALTY_SUCCESS_MESSAGES["DELETE_SUCCESS"] = "User has penalty deleted successfully";
|
|
1046
|
+
USER_HAS_PENALTY_SUCCESS_MESSAGES["AMOUNT_PAID"] = "Penalty amount has paid";
|
|
1046
1047
|
})(USER_HAS_PENALTY_SUCCESS_MESSAGES || (exports.USER_HAS_PENALTY_SUCCESS_MESSAGES = USER_HAS_PENALTY_SUCCESS_MESSAGES = {}));
|
|
1047
1048
|
var EDUCATION_OFFICER_SUCCESS_MESSAGES;
|
|
1048
1049
|
(function (EDUCATION_OFFICER_SUCCESS_MESSAGES) {
|
|
@@ -73,6 +73,41 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
73
73
|
field: 'academic_calendar_id',
|
|
74
74
|
allowNull: true,
|
|
75
75
|
},
|
|
76
|
+
adjustmentAt: {
|
|
77
|
+
type: Sequelize.DATE,
|
|
78
|
+
allowNull: true,
|
|
79
|
+
field: 'adjustment_at',
|
|
80
|
+
},
|
|
81
|
+
adjustmentBy: {
|
|
82
|
+
type: Sequelize.UUID,
|
|
83
|
+
allowNull: true,
|
|
84
|
+
field: 'adjustment_by',
|
|
85
|
+
},
|
|
86
|
+
paymentType: {
|
|
87
|
+
type: Sequelize.STRING,
|
|
88
|
+
allowNull: true,
|
|
89
|
+
field: 'payment_type',
|
|
90
|
+
},
|
|
91
|
+
upiId: {
|
|
92
|
+
type: Sequelize.STRING,
|
|
93
|
+
allowNull: true,
|
|
94
|
+
field: 'upi_id',
|
|
95
|
+
},
|
|
96
|
+
bankAccId: {
|
|
97
|
+
type: Sequelize.UUID,
|
|
98
|
+
allowNull: true,
|
|
99
|
+
field: 'bank_acc_id',
|
|
100
|
+
},
|
|
101
|
+
bankName: {
|
|
102
|
+
type: Sequelize.STRING,
|
|
103
|
+
allowNull: true,
|
|
104
|
+
field: 'bank_name',
|
|
105
|
+
},
|
|
106
|
+
chequeNo: {
|
|
107
|
+
type: Sequelize.STRING,
|
|
108
|
+
allowNull: true,
|
|
109
|
+
field: 'cheque_no',
|
|
110
|
+
},
|
|
76
111
|
createdBy: {
|
|
77
112
|
type: Sequelize.UUID,
|
|
78
113
|
allowNull: true,
|
|
@@ -175,6 +210,41 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
175
210
|
field: 'academic_calendar_id',
|
|
176
211
|
allowNull: true,
|
|
177
212
|
},
|
|
213
|
+
adjustmentAt: {
|
|
214
|
+
type: Sequelize.DATE,
|
|
215
|
+
allowNull: true,
|
|
216
|
+
field: 'adjustment_at',
|
|
217
|
+
},
|
|
218
|
+
adjustmentBy: {
|
|
219
|
+
type: Sequelize.UUID,
|
|
220
|
+
allowNull: true,
|
|
221
|
+
field: 'adjustment_by',
|
|
222
|
+
},
|
|
223
|
+
paymentType: {
|
|
224
|
+
type: Sequelize.STRING,
|
|
225
|
+
allowNull: true,
|
|
226
|
+
field: 'payment_type',
|
|
227
|
+
},
|
|
228
|
+
upiId: {
|
|
229
|
+
type: Sequelize.STRING,
|
|
230
|
+
allowNull: true,
|
|
231
|
+
field: 'upi_id',
|
|
232
|
+
},
|
|
233
|
+
bankAccId: {
|
|
234
|
+
type: Sequelize.UUID,
|
|
235
|
+
allowNull: true,
|
|
236
|
+
field: 'bank_acc_id',
|
|
237
|
+
},
|
|
238
|
+
bankName: {
|
|
239
|
+
type: Sequelize.STRING,
|
|
240
|
+
allowNull: true,
|
|
241
|
+
field: 'bank_name',
|
|
242
|
+
},
|
|
243
|
+
chequeNo: {
|
|
244
|
+
type: Sequelize.STRING,
|
|
245
|
+
allowNull: true,
|
|
246
|
+
field: 'cheque_no',
|
|
247
|
+
},
|
|
178
248
|
createdBy: {
|
|
179
249
|
type: Sequelize.UUID,
|
|
180
250
|
allowNull: true,
|
|
@@ -64,7 +64,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
64
64
|
field: 'group_id',
|
|
65
65
|
},
|
|
66
66
|
bankAccId: {
|
|
67
|
-
type: Sequelize.
|
|
67
|
+
type: Sequelize.UUID,
|
|
68
68
|
allowNull: true,
|
|
69
69
|
field: 'bank_acc_id',
|
|
70
70
|
},
|
|
@@ -73,10 +73,20 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
73
73
|
allowNull: true,
|
|
74
74
|
},
|
|
75
75
|
userHasPenaltyId: {
|
|
76
|
-
type: Sequelize.
|
|
76
|
+
type: Sequelize.UUID,
|
|
77
77
|
allowNull: true,
|
|
78
78
|
field: 'user_has_penalty_id',
|
|
79
79
|
},
|
|
80
|
+
adjustmentAt: {
|
|
81
|
+
type: Sequelize.DATE,
|
|
82
|
+
allowNull: true,
|
|
83
|
+
field: 'adjustment_at'
|
|
84
|
+
},
|
|
85
|
+
adjustmentBy: {
|
|
86
|
+
type: Sequelize.UUID,
|
|
87
|
+
allowNull: true,
|
|
88
|
+
field: 'adjustment_by'
|
|
89
|
+
},
|
|
80
90
|
createdBy: {
|
|
81
91
|
type: Sequelize.UUID,
|
|
82
92
|
allowNull: true,
|
|
@@ -169,7 +179,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
169
179
|
field: 'group_id',
|
|
170
180
|
},
|
|
171
181
|
bankAccId: {
|
|
172
|
-
type: Sequelize.
|
|
182
|
+
type: Sequelize.UUID,
|
|
173
183
|
allowNull: true,
|
|
174
184
|
field: 'bank_acc_id',
|
|
175
185
|
},
|
|
@@ -178,10 +188,20 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
178
188
|
allowNull: true,
|
|
179
189
|
},
|
|
180
190
|
userHasPenaltyId: {
|
|
181
|
-
type: Sequelize.
|
|
191
|
+
type: Sequelize.UUID,
|
|
182
192
|
allowNull: true,
|
|
183
193
|
field: 'user_has_penalty_id',
|
|
184
194
|
},
|
|
195
|
+
adjustmentAt: {
|
|
196
|
+
type: Sequelize.DATE,
|
|
197
|
+
allowNull: true,
|
|
198
|
+
field: 'adjustment_at'
|
|
199
|
+
},
|
|
200
|
+
adjustmentBy: {
|
|
201
|
+
type: Sequelize.UUID,
|
|
202
|
+
allowNull: true,
|
|
203
|
+
field: 'adjustment_by'
|
|
204
|
+
},
|
|
185
205
|
createdBy: {
|
|
186
206
|
type: Sequelize.UUID,
|
|
187
207
|
allowNull: true,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('user_has_penalties');
|
|
4
|
+
if (!table.adjustment_at) {
|
|
5
|
+
await queryInterface.addColumn('user_has_penalties', 'adjustment_at', {
|
|
6
|
+
type: Sequelize.DATE,
|
|
7
|
+
field: 'adjustment_at',
|
|
8
|
+
allowNull: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!table.adjustment_by) {
|
|
12
|
+
await queryInterface.addColumn('user_has_penalties', 'adjustment_by', {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
field: 'adjustment_by',
|
|
15
|
+
allowNull: true,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const down = async (queryInterface) => {
|
|
20
|
+
const table = await queryInterface.describeTable('user_has_penalties');
|
|
21
|
+
if (table.adjustment_at) {
|
|
22
|
+
await queryInterface.removeColumn('user_has_penalties', 'adjustment_at');
|
|
23
|
+
}
|
|
24
|
+
if (table.adjustment_by) {
|
|
25
|
+
await queryInterface.removeColumn('user_has_penalties', 'adjustment_by');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
module.exports = {
|
|
29
|
+
up,
|
|
30
|
+
down,
|
|
31
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('user_has_penalties');
|
|
4
|
+
if (!table.payment_type) {
|
|
5
|
+
await queryInterface.addColumn('user_has_penalties', 'payment_type', {
|
|
6
|
+
type: Sequelize.STRING,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
field: 'payment_type',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!table.upi_id) {
|
|
12
|
+
await queryInterface.addColumn('user_has_penalties', 'upi_id', {
|
|
13
|
+
type: Sequelize.STRING,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
field: 'upi_id',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (!table.bank_acc_id) {
|
|
19
|
+
await queryInterface.addColumn('user_has_penalties', 'bank_acc_id', {
|
|
20
|
+
type: Sequelize.UUID,
|
|
21
|
+
allowNull: true,
|
|
22
|
+
field: 'bank_acc_id',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (!table.bank_name) {
|
|
26
|
+
await queryInterface.addColumn('user_has_penalties', 'bank_name', {
|
|
27
|
+
type: Sequelize.STRING,
|
|
28
|
+
allowNull: true,
|
|
29
|
+
field: 'bank_name',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (!table.cheque_no) {
|
|
33
|
+
await queryInterface.addColumn('user_has_penalties', 'cheque_no', {
|
|
34
|
+
type: Sequelize.STRING,
|
|
35
|
+
allowNull: true,
|
|
36
|
+
field: 'cheque_no',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const down = async (queryInterface) => {
|
|
41
|
+
const table = await queryInterface.describeTable('user_has_penalties');
|
|
42
|
+
if (table.payment_field) {
|
|
43
|
+
await queryInterface.removeColumn('user_has_penalties', 'payment_field');
|
|
44
|
+
}
|
|
45
|
+
if (table.upi_id) {
|
|
46
|
+
await queryInterface.removeColumn('user_has_penalties', 'upi_id');
|
|
47
|
+
}
|
|
48
|
+
if (table.bank_acc_id) {
|
|
49
|
+
await queryInterface.removeColumn('user_has_penalties', 'bank_acc_id');
|
|
50
|
+
}
|
|
51
|
+
if (table.bank_name) {
|
|
52
|
+
await queryInterface.removeColumn('user_has_penalties', 'bank_name');
|
|
53
|
+
}
|
|
54
|
+
if (table.cheque_no) {
|
|
55
|
+
await queryInterface.removeColumn('user_has_penalties', 'cheque_no');
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
module.exports = {
|
|
59
|
+
up,
|
|
60
|
+
down,
|
|
61
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FEE_HISTORY_STATUS } from '../constants';
|
|
1
|
+
import { FEE_HISTORY_STATUS, PAYMENT_TYPE } from '../constants';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
export interface IUserHasPenaltyHistoryModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id
|
|
4
|
+
id?: string;
|
|
5
5
|
paidDate: Date;
|
|
6
|
-
paymentType:
|
|
6
|
+
paymentType: PAYMENT_TYPE;
|
|
7
7
|
userId: string;
|
|
8
8
|
instituteId?: string;
|
|
9
9
|
academicCalendarId?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PAYMENT_STATUS, USER_HAS_PENALTY_TITLE, USER_HAS_PENALTY_TYPE } from '../constants';
|
|
1
|
+
import { PAYMENT_STATUS, PAYMENT_TYPE, USER_HAS_PENALTY_TITLE, USER_HAS_PENALTY_TYPE } from '../constants';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
export interface IUserHasPenaltyModelAttributes extends IDefaultAttributes {
|
|
4
|
-
id
|
|
4
|
+
id?: string;
|
|
5
5
|
userId: string;
|
|
6
6
|
amount: number;
|
|
7
7
|
penaltyId: string;
|
|
@@ -13,4 +13,11 @@ export interface IUserHasPenaltyModelAttributes extends IDefaultAttributes {
|
|
|
13
13
|
title?: USER_HAS_PENALTY_TITLE;
|
|
14
14
|
type?: USER_HAS_PENALTY_TYPE;
|
|
15
15
|
description?: string;
|
|
16
|
+
adjustmentAt?: Date;
|
|
17
|
+
adjustmentBy?: string;
|
|
18
|
+
paymentType: PAYMENT_TYPE;
|
|
19
|
+
upiId: string;
|
|
20
|
+
bankName: string;
|
|
21
|
+
chequeNo: string;
|
|
22
|
+
bankAccId: string;
|
|
16
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { FEE_HISTORY_STATUS } from '../../constants';
|
|
3
2
|
import { IUserHasPenaltyHistoryModelAttributes } from '../../interfaces/userHasPenaltyHistoryInterface';
|
|
4
3
|
import { TUserHasPenaltyHistoryModelCreationAttributes } from '../../types/userHasPenaltyHistoryType';
|
|
4
|
+
import { FEE_HISTORY_STATUS, PAYMENT_TYPE } from '../../constants';
|
|
5
5
|
declare class UserHasPenaltyHistoryModel extends Model<IUserHasPenaltyHistoryModelAttributes, TUserHasPenaltyHistoryModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
upiId: string;
|
|
@@ -12,7 +12,7 @@ declare class UserHasPenaltyHistoryModel extends Model<IUserHasPenaltyHistoryMod
|
|
|
12
12
|
bankName: string;
|
|
13
13
|
bankAccId: string;
|
|
14
14
|
paidAmount: number;
|
|
15
|
-
paymentType:
|
|
15
|
+
paymentType: PAYMENT_TYPE;
|
|
16
16
|
instituteId?: string;
|
|
17
17
|
userHasPenaltyId: string;
|
|
18
18
|
status: FEE_HISTORY_STATUS;
|
|
@@ -140,12 +140,12 @@ UserHasPenaltyHistoryModel.init({
|
|
|
140
140
|
field: 'cheque_no'
|
|
141
141
|
},
|
|
142
142
|
groupId: {
|
|
143
|
-
type: sequelize_1.DataTypes.
|
|
143
|
+
type: sequelize_1.DataTypes.UUID,
|
|
144
144
|
allowNull: true,
|
|
145
145
|
field: 'group_id'
|
|
146
146
|
},
|
|
147
147
|
bankAccId: {
|
|
148
|
-
type: sequelize_1.DataTypes.
|
|
148
|
+
type: sequelize_1.DataTypes.UUID,
|
|
149
149
|
allowNull: true,
|
|
150
150
|
field: 'bank_acc_id'
|
|
151
151
|
},
|
|
@@ -154,7 +154,7 @@ UserHasPenaltyHistoryModel.init({
|
|
|
154
154
|
allowNull: true,
|
|
155
155
|
},
|
|
156
156
|
userHasPenaltyId: {
|
|
157
|
-
type: sequelize_1.DataTypes.
|
|
157
|
+
type: sequelize_1.DataTypes.UUID,
|
|
158
158
|
allowNull: true,
|
|
159
159
|
field: 'user_has_penalty_id'
|
|
160
160
|
},
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { IUserHasPenaltyModelAttributes } from '../../interfaces/userHasPenaltyInterface';
|
|
3
3
|
import { TUserHasPenaltyModelCreationAttributes } from '../../types/userHasPenaltyType';
|
|
4
|
-
import { PAYMENT_STATUS, USER_HAS_PENALTY_TYPE } from '../../constants';
|
|
4
|
+
import { PAYMENT_STATUS, PAYMENT_TYPE, USER_HAS_PENALTY_TITLE, USER_HAS_PENALTY_TYPE } from '../../constants';
|
|
5
5
|
declare class UserHasPenaltyModel extends Model<IUserHasPenaltyModelAttributes, TUserHasPenaltyModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
userId: string;
|
|
8
8
|
amount: number;
|
|
9
9
|
penaltyId: string;
|
|
10
10
|
paidAmount: number;
|
|
11
|
+
adjustmentAt?: Date;
|
|
12
|
+
description?: string;
|
|
11
13
|
instituteId?: string;
|
|
14
|
+
adjustmentBy?: string;
|
|
12
15
|
status: PAYMENT_STATUS;
|
|
13
16
|
adjustmentAmount: number;
|
|
14
17
|
academicCalendarId?: string;
|
|
15
|
-
title?: USER_HAS_PENALTY_TYPE;
|
|
16
18
|
type?: USER_HAS_PENALTY_TYPE;
|
|
17
|
-
|
|
19
|
+
title?: USER_HAS_PENALTY_TITLE;
|
|
20
|
+
paymentType?: PAYMENT_TYPE;
|
|
21
|
+
upiId: string;
|
|
22
|
+
bankName: string;
|
|
23
|
+
chequeNo: string;
|
|
24
|
+
bankAccId: string;
|
|
18
25
|
createdBy: string;
|
|
19
26
|
updatedBy: string;
|
|
20
27
|
deletedBy: string;
|
|
@@ -71,20 +71,6 @@ class UserHasPenaltyModel extends sequelize_1.Model {
|
|
|
71
71
|
},
|
|
72
72
|
as: 'userHasPenaltyUser',
|
|
73
73
|
});
|
|
74
|
-
// UserHasPenaltyModel.belongsTo(StudentFeeCollectionModel, {
|
|
75
|
-
// foreignKey: {
|
|
76
|
-
// name: 'studentFeeCollectionId',
|
|
77
|
-
// field: 'student_fee_collection_id',
|
|
78
|
-
// },
|
|
79
|
-
// as: 'userHPenaltyStudentFee',
|
|
80
|
-
// });
|
|
81
|
-
// StudentFeeCollectionModel.hasMany(UserHasPenaltyModel, {
|
|
82
|
-
// foreignKey: {
|
|
83
|
-
// name: 'studentFeeCollectionId',
|
|
84
|
-
// field: 'student_fee_collection_id',
|
|
85
|
-
// },
|
|
86
|
-
// as: 'studentFeeHasPenalty',
|
|
87
|
-
// });
|
|
88
74
|
UserHasPenaltyModel.belongsTo(PenaltiesModel, {
|
|
89
75
|
foreignKey: {
|
|
90
76
|
name: 'penaltyId',
|
|
@@ -157,6 +143,41 @@ UserHasPenaltyModel.init({
|
|
|
157
143
|
type: {
|
|
158
144
|
type: sequelize_1.DataTypes.STRING,
|
|
159
145
|
allowNull: true,
|
|
146
|
+
},
|
|
147
|
+
adjustmentAt: {
|
|
148
|
+
type: sequelize_1.DataTypes.DATE,
|
|
149
|
+
allowNull: true,
|
|
150
|
+
field: 'adjustment_at'
|
|
151
|
+
},
|
|
152
|
+
adjustmentBy: {
|
|
153
|
+
type: sequelize_1.DataTypes.UUID,
|
|
154
|
+
allowNull: true,
|
|
155
|
+
field: 'adjustment_by'
|
|
156
|
+
},
|
|
157
|
+
paymentType: {
|
|
158
|
+
type: sequelize_1.DataTypes.STRING,
|
|
159
|
+
allowNull: true,
|
|
160
|
+
field: 'payment_type',
|
|
161
|
+
},
|
|
162
|
+
upiId: {
|
|
163
|
+
type: sequelize_1.DataTypes.STRING,
|
|
164
|
+
allowNull: true,
|
|
165
|
+
field: 'upi_id'
|
|
166
|
+
},
|
|
167
|
+
bankAccId: {
|
|
168
|
+
type: sequelize_1.DataTypes.UUID,
|
|
169
|
+
allowNull: true,
|
|
170
|
+
field: 'bank_acc_id',
|
|
171
|
+
},
|
|
172
|
+
bankName: {
|
|
173
|
+
type: sequelize_1.DataTypes.STRING,
|
|
174
|
+
allowNull: true,
|
|
175
|
+
field: 'bank_name'
|
|
176
|
+
},
|
|
177
|
+
chequeNo: {
|
|
178
|
+
type: sequelize_1.DataTypes.STRING,
|
|
179
|
+
allowNull: true,
|
|
180
|
+
field: 'cheque_no'
|
|
160
181
|
}
|
|
161
182
|
}, {
|
|
162
183
|
modelName: 'UserHasPenaltyModel',
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|