@kipicore/dbcore 1.1.365 → 1.1.367
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.
|
@@ -6,7 +6,7 @@ const errorMessages_1 = require("../../constants/errorMessages");
|
|
|
6
6
|
const app_1 = require("../../constants/app");
|
|
7
7
|
class FeeReminderModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, InstituteModel,
|
|
9
|
+
const { UserModel, InstituteModel, StudentFeeCollectionModel, FeeReminderSettingModel, AcademicCalendarModel } = models;
|
|
10
10
|
FeeReminderModel.belongsTo(UserModel, {
|
|
11
11
|
foreignKey: { name: 'userId', field: 'user_id' },
|
|
12
12
|
as: 'reminderUser',
|
|
@@ -43,11 +43,11 @@ class FeeReminderModel extends sequelize_1.Model {
|
|
|
43
43
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
44
44
|
as: 'deletedByUser',
|
|
45
45
|
});
|
|
46
|
-
FeeReminderModel.belongsTo(
|
|
46
|
+
FeeReminderModel.belongsTo(StudentFeeCollectionModel, {
|
|
47
47
|
foreignKey: { name: 'feeCollectionId', field: 'fee_collection_id' },
|
|
48
48
|
as: 'feeCollection',
|
|
49
49
|
});
|
|
50
|
-
|
|
50
|
+
StudentFeeCollectionModel.hasMany(FeeReminderModel, {
|
|
51
51
|
foreignKey: 'feeCollectionId',
|
|
52
52
|
as: 'feeReminders',
|
|
53
53
|
});
|
|
@@ -209,7 +209,7 @@ FeeReminderModel.init({
|
|
|
209
209
|
academicCalendarId: {
|
|
210
210
|
type: sequelize_1.DataTypes.UUID,
|
|
211
211
|
allowNull: true,
|
|
212
|
-
field: 'academic_calendar_id'
|
|
212
|
+
field: 'academic_calendar_id',
|
|
213
213
|
},
|
|
214
214
|
}, {
|
|
215
215
|
modelName: 'FeeReminderModel',
|
|
@@ -43,7 +43,7 @@ class SubjectInternalMarkModel extends sequelize_1.Model {
|
|
|
43
43
|
});
|
|
44
44
|
InstituteEntityModel.hasMany(SubjectInternalMarkModel, {
|
|
45
45
|
foreignKey: 'subjectId',
|
|
46
|
-
as: '
|
|
46
|
+
as: 'subjectHasSubjectInternalMark',
|
|
47
47
|
});
|
|
48
48
|
SubjectInternalMarkModel.belongsTo(InstituteEntityModel, {
|
|
49
49
|
foreignKey: 'standardId',
|
package/package.json
CHANGED