@kipicore/dbcore 1.1.191 → 1.1.193
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDefaultAttributes } from './commonInterface';
|
|
2
1
|
import { FEE_TYPE, COMMAN_STATUS, FEE_TYPE_FREQUENCY, BOOLEAN_STATUS } from '../constants/app';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
export interface IFeeTypeModelAttributes extends IDefaultAttributes {
|
|
4
4
|
id: string;
|
|
5
5
|
typeManagementId: string;
|
|
@@ -7,13 +7,8 @@ export interface IFeeTypeModelAttributes extends IDefaultAttributes {
|
|
|
7
7
|
feeType: FEE_TYPE;
|
|
8
8
|
module: COMMAN_STATUS;
|
|
9
9
|
status: COMMAN_STATUS;
|
|
10
|
-
account: string
|
|
11
|
-
|
|
12
|
-
isCashAllowed: boolean;
|
|
13
|
-
isRefundable: boolean;
|
|
14
|
-
isTaxable: boolean;
|
|
15
|
-
isRequired: boolean;
|
|
10
|
+
account: string;
|
|
11
|
+
academicCalendarId?: string;
|
|
16
12
|
instituteId: string;
|
|
17
13
|
isDefault: BOOLEAN_STATUS;
|
|
18
|
-
academicCalendarId: string;
|
|
19
14
|
}
|
|
@@ -10,12 +10,7 @@ declare class FeeTypeModel extends Model<IFeeTypeModelAttributes, TFeeTypeModelC
|
|
|
10
10
|
feeType: FEE_TYPE;
|
|
11
11
|
module: COMMAN_STATUS;
|
|
12
12
|
status: COMMAN_STATUS;
|
|
13
|
-
account: string
|
|
14
|
-
isCreditAllowed: boolean;
|
|
15
|
-
isCashAllowed: boolean;
|
|
16
|
-
isRefundable: boolean;
|
|
17
|
-
isTaxable: boolean;
|
|
18
|
-
isRequired: boolean;
|
|
13
|
+
account: string;
|
|
19
14
|
isDefault: BOOLEAN_STATUS;
|
|
20
15
|
academicCalendarId: string;
|
|
21
16
|
createdBy: string;
|
|
@@ -5,15 +5,15 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class FeeTypeModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { TypeManagementModel, InstituteModel, UserModel, AcademicCalendarModel } = models;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const { BankAccountDetailsModel, TypeManagementModel, InstituteModel, UserModel, AcademicCalendarModel } = models;
|
|
9
|
+
FeeTypeModel.belongsTo(BankAccountDetailsModel, {
|
|
10
|
+
foreignKey: { name: 'account' },
|
|
11
|
+
as: 'accountFeeType',
|
|
12
|
+
});
|
|
13
|
+
BankAccountDetailsModel.hasMany(FeeTypeModel, {
|
|
14
|
+
foreignKey: 'account',
|
|
15
|
+
as: 'feeTypeHasAccount',
|
|
16
|
+
});
|
|
17
17
|
TypeManagementModel.hasMany(FeeTypeModel, {
|
|
18
18
|
foreignKey: 'typeManagementId',
|
|
19
19
|
as: 'feeTypeTypeManagement',
|
|
@@ -70,8 +70,8 @@ FeeTypeModel.init({
|
|
|
70
70
|
allowNull: false,
|
|
71
71
|
},
|
|
72
72
|
account: {
|
|
73
|
-
type: sequelize_1.DataTypes.
|
|
74
|
-
allowNull:
|
|
73
|
+
type: sequelize_1.DataTypes.UUID,
|
|
74
|
+
allowNull: false,
|
|
75
75
|
},
|
|
76
76
|
status: {
|
|
77
77
|
type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.COMMAN_STATUS)),
|
|
@@ -101,21 +101,6 @@ FeeTypeModel.init({
|
|
|
101
101
|
field: 'academic_calendar_id',
|
|
102
102
|
allowNull: true,
|
|
103
103
|
},
|
|
104
|
-
isCreditAllowed: {
|
|
105
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
106
|
-
},
|
|
107
|
-
isCashAllowed: {
|
|
108
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
109
|
-
},
|
|
110
|
-
isRefundable: {
|
|
111
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
112
|
-
},
|
|
113
|
-
isTaxable: {
|
|
114
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
115
|
-
},
|
|
116
|
-
isRequired: {
|
|
117
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
118
|
-
},
|
|
119
104
|
}, {
|
|
120
105
|
modelName: 'FeeTypeModel',
|
|
121
106
|
tableName: 'fee_type',
|
package/package.json
CHANGED