@kipicore/dbcore 1.1.122 → 1.1.124
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/db/psql/migrations/20251201085926-add_academicCalenderId_to_announcement.d.ts +2 -0
- package/dist/db/psql/migrations/20251201085926-add_academicCalenderId_to_announcement.js +23 -0
- package/dist/db/psql/migrations/20251201090537-add_academicCalenderId_to_userHasAnnouncement.d.ts +2 -0
- package/dist/db/psql/migrations/20251201090537-add_academicCalenderId_to_userHasAnnouncement.js +23 -0
- package/dist/db/psql/migrations/20251201092621-add_academicCalenderId_to_UHBatch.d.ts +2 -0
- package/dist/db/psql/migrations/20251201092621-add_academicCalenderId_to_UHBatch.js +23 -0
- package/dist/db/psql/migrations/20251201093210-add_academicCalenderId_to_classroom.d.ts +2 -0
- package/dist/db/psql/migrations/20251201093210-add_academicCalenderId_to_classroom.js +23 -0
- package/dist/db/psql/migrations/20251201093644-add_academicCalenderId_to_BankAccD.d.ts +2 -0
- package/dist/db/psql/migrations/20251201093644-add_academicCalenderId_to_BankAccD.js +23 -0
- package/dist/db/psql/migrations/20251201094148-add_academicCalenderId_to_workingD.d.ts +2 -0
- package/dist/db/psql/migrations/20251201094148-add_academicCalenderId_to_workingD.js +23 -0
- package/dist/db/psql/migrations/20251201094533-add_academicCalenderId_to_workingS.d.ts +2 -0
- package/dist/db/psql/migrations/20251201094533-add_academicCalenderId_to_workingS.js +23 -0
- package/dist/db/psql/migrations/20251201094828-add-academic-calendar-id-to-userhashomework.d.ts +2 -0
- package/dist/db/psql/migrations/20251201094828-add-academic-calendar-id-to-userhashomework.js +23 -0
- package/dist/db/psql/migrations/20251201095025-add_academicCalenderId_to_batchSubBookA.d.ts +2 -0
- package/dist/db/psql/migrations/20251201095025-add_academicCalenderId_to_batchSubBookA.js +23 -0
- package/dist/db/psql/migrations/20251201095408-add_academicCalenderId_to_batchSubProA.d.ts +2 -0
- package/dist/db/psql/migrations/20251201095408-add_academicCalenderId_to_batchSubProA.js +23 -0
- package/dist/db/psql/migrations/20251201100111-add_academicCalenderId_to_projectAOp.d.ts +2 -0
- package/dist/db/psql/migrations/20251201100111-add_academicCalenderId_to_projectAOp.js +23 -0
- package/dist/db/psql/migrations/20251201100553-add-academic-calendar-id-to-homework.d.ts +2 -0
- package/dist/db/psql/migrations/20251201100553-add-academic-calendar-id-to-homework.js +23 -0
- package/dist/db/psql/migrations/20251201100901-add_academicCalenderId_to_userHRollN.d.ts +2 -0
- package/dist/db/psql/migrations/20251201100901-add_academicCalenderId_to_userHRollN.js +23 -0
- package/dist/db/psql/migrations/20251201101407-add_academicCalenderId_to_feeHistory.d.ts +2 -0
- package/dist/db/psql/migrations/20251201101407-add_academicCalenderId_to_feeHistory.js +23 -0
- package/dist/db/psql/migrations/20251201102129-add_academicCalenderId_to_feeReminder.d.ts +2 -0
- package/dist/db/psql/migrations/20251201102129-add_academicCalenderId_to_feeReminder.js +23 -0
- package/dist/db/psql/migrations/20251201102622-add_academicCalenderId_to_paymentTerms.d.ts +2 -0
- package/dist/db/psql/migrations/20251201102622-add_academicCalenderId_to_paymentTerms.js +23 -0
- package/dist/db/psql/migrations/20251201103134-add_academicCalenderId_to_subjectHFee.d.ts +2 -0
- package/dist/db/psql/migrations/20251201103134-add_academicCalenderId_to_subjectHFee.js +23 -0
- package/dist/db/psql/migrations/20251201103447-add_academicCalenderId_to_lectureHistory.d.ts +2 -0
- package/dist/db/psql/migrations/20251201103447-add_academicCalenderId_to_lectureHistory.js +23 -0
- package/dist/db/psql/migrations/20251201103551-add-academic-calendar-id-to-greetings.d.ts +2 -0
- package/dist/db/psql/migrations/20251201103551-add-academic-calendar-id-to-greetings.js +23 -0
- package/dist/db/psql/migrations/20251201104336-add_academicCalenderId_to_lecture.d.ts +2 -0
- package/dist/db/psql/migrations/20251201104336-add_academicCalenderId_to_lecture.js +23 -0
- package/dist/db/psql/migrations/20251202041045-add_academic_Cal_masterL.d.ts +2 -0
- package/dist/db/psql/migrations/20251202041045-add_academic_Cal_masterL.js +21 -0
- package/dist/db/psql/migrations/20251202042541-add_academic_Cal_offer.d.ts +2 -0
- package/dist/db/psql/migrations/20251202042541-add_academic_Cal_offer.js +21 -0
- package/dist/db/psql/migrations/20251202042809-add-academic-calendar-id-to-schoolOffer.d.ts +2 -0
- package/dist/db/psql/migrations/20251202042809-add-academic-calendar-id-to-schoolOffer.js +23 -0
- package/dist/db/psql/migrations/20251202043001-add_academic_Cal_userHOffer.d.ts +2 -0
- package/dist/db/psql/migrations/20251202043001-add_academic_Cal_userHOffer.js +21 -0
- package/dist/db/psql/migrations/20251202043722-add_academic_Cal_pdcCheque.d.ts +2 -0
- package/dist/db/psql/migrations/20251202043722-add_academic_Cal_pdcCheque.js +21 -0
- package/dist/db/psql/migrations/20251202044220-add_academic_Cal_pdcChequeHistory.d.ts +2 -0
- package/dist/db/psql/migrations/20251202044220-add_academic_Cal_pdcChequeHistory.js +21 -0
- package/dist/db/psql/migrations/20251204101602-add_academic_cal_slot.d.ts +2 -0
- package/dist/db/psql/migrations/20251204101602-add_academic_cal_slot.js +21 -0
- package/dist/db/psql/migrations/20251204102512-add_academic_cal_syllabus.d.ts +2 -0
- package/dist/db/psql/migrations/20251204102512-add_academic_cal_syllabus.js +21 -0
- package/dist/db/psql/migrations/20251204103002-add_academic_cal_testimonial.d.ts +2 -0
- package/dist/db/psql/migrations/20251204103002-add_academic_cal_testimonial.js +21 -0
- package/dist/db/psql/migrations/20251204103254-add_academic_cal_trip.d.ts +2 -0
- package/dist/db/psql/migrations/20251204103254-add_academic_cal_trip.js +21 -0
- package/dist/db/psql/migrations/20251204103624-add_academic_cal_userBA.d.ts +2 -0
- package/dist/db/psql/migrations/20251204103624-add_academic_cal_userBA.js +21 -0
- package/dist/db/psql/migrations/20251204104027-add_academic_cal_userFeeType.d.ts +2 -0
- package/dist/db/psql/migrations/20251204104027-add_academic_cal_userFeeType.js +21 -0
- package/dist/db/psql/migrations/20251204104738-add_academic_cal_userHInventory.d.ts +2 -0
- package/dist/db/psql/migrations/20251204104738-add_academic_cal_userHInventory.js +21 -0
- package/dist/db/psql/migrations/20251204105047-add_academic_cal_userHInvenH.d.ts +2 -0
- package/dist/db/psql/migrations/20251204105047-add_academic_cal_userHInvenH.js +21 -0
- package/dist/db/psql/migrations/20251204105717-add_academic_cal_userHLeave.d.ts +2 -0
- package/dist/db/psql/migrations/20251204105717-add_academic_cal_userHLeave.js +21 -0
- package/dist/db/psql/migrations/20251204110256-add_academic_cal_userHLH.d.ts +2 -0
- package/dist/db/psql/migrations/20251204110256-add_academic_cal_userHLH.js +21 -0
- package/dist/db/psql/migrations/20251204110629-add_academic_cal_userLeaveReq.d.ts +2 -0
- package/dist/db/psql/migrations/20251204110629-add_academic_cal_userLeaveReq.js +21 -0
- package/dist/db/psql/migrations/20251204110928-add_academic_cal_userproAssessOp.d.ts +2 -0
- package/dist/db/psql/migrations/20251204110928-add_academic_cal_userproAssessOp.js +21 -0
- package/dist/db/psql/migrations/20251204112518-add_batchId_type_subHFee.d.ts +2 -0
- package/dist/db/psql/migrations/20251204112518-add_batchId_type_subHFee.js +31 -0
- package/dist/db/psql/migrations/20251208110114-add-thumbnail-introvideo-to-courses.d.ts +2 -0
- package/dist/db/psql/migrations/20251208110114-add-thumbnail-introvideo-to-courses.js +31 -0
- package/dist/db/psql/migrations/20251208112241-add-new-field.d.ts +2 -0
- package/dist/db/psql/migrations/20251208112241-add-new-field.js +21 -0
- package/dist/interfaces/announcementInterface.d.ts +1 -0
- package/dist/interfaces/approvalRequestInterface.d.ts +1 -0
- package/dist/interfaces/attendanceInterface.d.ts +1 -0
- package/dist/interfaces/bDayWishInterface.d.ts +1 -0
- package/dist/interfaces/bankAccountDetailsInterface.d.ts +1 -0
- package/dist/interfaces/batchSubjectBookAssessmentInterface.d.ts +1 -0
- package/dist/interfaces/batchSubjectProjectAssessmentInterface.d.ts +1 -0
- package/dist/interfaces/certificatesHistoryInterface.d.ts +1 -0
- package/dist/interfaces/certificatesManagementInterface.d.ts +1 -0
- package/dist/interfaces/classRoomInterface.d.ts +1 -0
- package/dist/interfaces/courseInterface.d.ts +2 -0
- package/dist/interfaces/dailyBookInterface.d.ts +1 -0
- package/dist/interfaces/eventInterface.d.ts +1 -0
- package/dist/interfaces/examGroupInterface.d.ts +1 -0
- package/dist/interfaces/examHasAnswerSheetInterface.d.ts +1 -0
- package/dist/interfaces/examInterface.d.ts +1 -0
- package/dist/interfaces/feeHistoryInterface.d.ts +1 -0
- package/dist/interfaces/feeReminderInterface.d.ts +1 -0
- package/dist/interfaces/feeReminderSettingInterface.d.ts +1 -0
- package/dist/interfaces/feeReminderTypeInterface.d.ts +1 -0
- package/dist/interfaces/feeTypeInterface.d.ts +1 -0
- package/dist/interfaces/generateIdCardInterface.d.ts +1 -0
- package/dist/interfaces/greetingsInterface.d.ts +1 -0
- package/dist/interfaces/holidayInterface.d.ts +1 -0
- package/dist/interfaces/homeworkInterface.d.ts +1 -0
- package/dist/interfaces/lectureHistoryInterface.d.ts +1 -0
- package/dist/interfaces/lectureInterface.d.ts +1 -0
- package/dist/interfaces/masterLeaveInterface.d.ts +1 -0
- package/dist/interfaces/offersInterface.d.ts +1 -0
- package/dist/interfaces/paymentTermsInterface.d.ts +1 -0
- package/dist/interfaces/pdcChequeInterface.d.ts +1 -0
- package/dist/interfaces/pdcHistoryInterface.d.ts +1 -0
- package/dist/interfaces/projectAssessmentOptionInterface.d.ts +1 -0
- package/dist/interfaces/replaceTeacherInterface.d.ts +1 -0
- package/dist/interfaces/schoolFeeInterface.d.ts +1 -0
- package/dist/interfaces/schoolOfferInterface.d.ts +1 -0
- package/dist/interfaces/slotInterface.d.ts +1 -0
- package/dist/interfaces/subjectHasFeeInterface.d.ts +1 -1
- package/dist/interfaces/syllabusInterface.d.ts +1 -0
- package/dist/interfaces/taskManagementInterface.d.ts +1 -0
- package/dist/interfaces/testimonialInterface.d.ts +1 -0
- package/dist/interfaces/tripInterface.d.ts +1 -0
- package/dist/interfaces/userBookAssessmentInterface.d.ts +1 -0
- package/dist/interfaces/userFeeTypeInterface.d.ts +1 -0
- package/dist/interfaces/userHasAnnouncementInterface.d.ts +1 -0
- package/dist/interfaces/userHasBatchInterface.d.ts +1 -0
- package/dist/interfaces/userHasHomeWorkInterface.d.ts +1 -0
- package/dist/interfaces/userHasInventoryHistoryInterface.d.ts +1 -0
- package/dist/interfaces/userHasInventoryInterface.d.ts +1 -0
- package/dist/interfaces/userHasLeaveHistoryInterface.d.ts +1 -0
- package/dist/interfaces/userHasLeaveInterface.d.ts +1 -0
- package/dist/interfaces/userHasOfferInterface.d.ts +1 -0
- package/dist/interfaces/userHasRollNumberInterface.d.ts +1 -0
- package/dist/interfaces/userInstituteMetaInterface.d.ts +1 -0
- package/dist/interfaces/userLeaveRequestInterface.d.ts +1 -0
- package/dist/interfaces/userProjectAssessmentOptionInterface.d.ts +1 -0
- package/dist/interfaces/workingDayInterface.d.ts +1 -0
- package/dist/interfaces/workingShiftInterface.d.ts +1 -0
- package/dist/models/mongodb/approvalRequestModel.js +4 -0
- package/dist/models/mongodb/attendanceModel.js +4 -0
- package/dist/models/mongodb/bDayWishModel.js +1 -0
- package/dist/models/mongodb/certificatesHistoryModel.js +4 -0
- package/dist/models/mongodb/certificatesManagementModel.js +4 -0
- package/dist/models/mongodb/dailyBookModel.js +4 -0
- package/dist/models/mongodb/eventModel.js +4 -0
- package/dist/models/mongodb/examGroupModel.js +4 -0
- package/dist/models/mongodb/examHasAnswerSheetModel.js +4 -0
- package/dist/models/mongodb/examModel.js +4 -0
- package/dist/models/mongodb/feeReminderTypeModel.js +4 -0
- package/dist/models/mongodb/generateIdCardModel.js +4 -0
- package/dist/models/mongodb/holidayModel.js +4 -0
- package/dist/models/mongodb/replaceTeacherModel.js +4 -0
- package/dist/models/mongodb/schoolFeeModel.js +4 -0
- package/dist/models/mongodb/taskManagementModel.js +4 -0
- package/dist/models/mongodb/userInstituteMetaModel.js +4 -0
- package/dist/models/psql/announcementModel.d.ts +1 -0
- package/dist/models/psql/announcementModel.js +14 -1
- package/dist/models/psql/bankAccountDetailsModel.d.ts +1 -0
- package/dist/models/psql/bankAccountDetailsModel.js +10 -1
- package/dist/models/psql/batchSubjectBookAssessmentModel.d.ts +1 -0
- package/dist/models/psql/batchSubjectBookAssessmentModel.js +10 -1
- package/dist/models/psql/batchSubjectProjectAssessmentModel.d.ts +1 -0
- package/dist/models/psql/batchSubjectProjectAssessmentModel.js +10 -1
- package/dist/models/psql/classRoomModel.d.ts +1 -0
- package/dist/models/psql/classRoomModel.js +20 -1
- package/dist/models/psql/courseModel.d.ts +2 -0
- package/dist/models/psql/courseModel.js +27 -1
- package/dist/models/psql/feeHistoryModel.d.ts +1 -0
- package/dist/models/psql/feeHistoryModel.js +9 -1
- package/dist/models/psql/feeReminderModel.d.ts +1 -0
- package/dist/models/psql/feeReminderModel.js +14 -1
- package/dist/models/psql/feeReminderSettingModel.d.ts +1 -0
- package/dist/models/psql/feeReminderSettingModel.js +9 -1
- package/dist/models/psql/feeTypeModel.d.ts +1 -0
- package/dist/models/psql/feeTypeModel.js +14 -1
- package/dist/models/psql/greetingsModel.d.ts +1 -0
- package/dist/models/psql/greetingsModel.js +14 -1
- package/dist/models/psql/homeWorkModel.d.ts +1 -0
- package/dist/models/psql/homeWorkModel.js +14 -1
- package/dist/models/psql/lectureHistoryModel.d.ts +1 -0
- package/dist/models/psql/lectureHistoryModel.js +14 -1
- package/dist/models/psql/lectureModel.d.ts +1 -0
- package/dist/models/psql/lectureModel.js +14 -1
- package/dist/models/psql/masterLeaveModel.d.ts +1 -0
- package/dist/models/psql/masterLeaveModel.js +14 -1
- package/dist/models/psql/offerModel.d.ts +1 -0
- package/dist/models/psql/offerModel.js +13 -1
- package/dist/models/psql/paymentTermsModel.d.ts +1 -0
- package/dist/models/psql/paymentTermsModel.js +14 -1
- package/dist/models/psql/pdcChequeModel.d.ts +1 -0
- package/dist/models/psql/pdcChequeModel.js +14 -1
- package/dist/models/psql/pdcHistoryModel.d.ts +1 -0
- package/dist/models/psql/pdcHistoryModel.js +14 -1
- package/dist/models/psql/projectAssessmentOptionModel.d.ts +1 -0
- package/dist/models/psql/projectAssessmentOptionModel.js +10 -1
- package/dist/models/psql/schoolOfferModel.d.ts +1 -0
- package/dist/models/psql/schoolOfferModel.js +14 -1
- package/dist/models/psql/slotModel.d.ts +1 -0
- package/dist/models/psql/slotModel.js +14 -1
- package/dist/models/psql/subjectHasFeeModel.js +3 -3
- package/dist/models/psql/syllabusModel.d.ts +1 -0
- package/dist/models/psql/syllabusModel.js +14 -1
- package/dist/models/psql/testimonialModel.d.ts +1 -0
- package/dist/models/psql/testimonialModel.js +14 -1
- package/dist/models/psql/tripModel.d.ts +1 -0
- package/dist/models/psql/tripModel.js +14 -1
- package/dist/models/psql/userBookAssessmentModel.d.ts +1 -0
- package/dist/models/psql/userBookAssessmentModel.js +14 -1
- package/dist/models/psql/userFeeTypeModel.js +14 -1
- package/dist/models/psql/userHasAnnouncementModel.d.ts +1 -0
- package/dist/models/psql/userHasAnnouncementModel.js +14 -1
- package/dist/models/psql/userHasBatchModel.d.ts +1 -0
- package/dist/models/psql/userHasBatchModel.js +20 -1
- package/dist/models/psql/userHasHomeWorkModel.d.ts +1 -0
- package/dist/models/psql/userHasHomeWorkModel.js +14 -1
- package/dist/models/psql/userHasInventoryHistoryModel.d.ts +1 -0
- package/dist/models/psql/userHasInventoryHistoryModel.js +14 -1
- package/dist/models/psql/userHasInventoryModel.d.ts +1 -0
- package/dist/models/psql/userHasInventoryModel.js +14 -1
- package/dist/models/psql/userHasLeaveHistoryModel.d.ts +1 -0
- package/dist/models/psql/userHasLeaveHistoryModel.js +14 -1
- package/dist/models/psql/userHasLeaveModel.d.ts +1 -0
- package/dist/models/psql/userHasLeaveModel.js +14 -1
- package/dist/models/psql/userHasOfferModel.d.ts +1 -0
- package/dist/models/psql/userHasOfferModel.js +13 -1
- package/dist/models/psql/userHasRollNumberModel.d.ts +1 -0
- package/dist/models/psql/userHasRollNumberModel.js +14 -1
- package/dist/models/psql/userLeaveRequestModel.d.ts +1 -0
- package/dist/models/psql/userLeaveRequestModel.js +14 -1
- package/dist/models/psql/userProjectAssessmentOptionModel.d.ts +1 -0
- package/dist/models/psql/userProjectAssessmentOptionModel.js +14 -1
- package/dist/models/psql/workingDayModel.d.ts +1 -0
- package/dist/models/psql/workingDayModel.js +10 -1
- package/dist/models/psql/workingShiftModel.d.ts +1 -0
- package/dist/models/psql/workingShiftModel.js +10 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const sequelize_1 = require("sequelize");
|
|
|
5
5
|
const index_1 = require("./index");
|
|
6
6
|
class BatchSubjectProjectAssessmentModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { InstituteModel, UserModel, BatchModel, InstituteEntityModel, } = models;
|
|
8
|
+
const { InstituteModel, UserModel, BatchModel, InstituteEntityModel, AcademicCalendarModel, } = models;
|
|
9
9
|
BatchSubjectProjectAssessmentModel.belongsTo(InstituteModel, {
|
|
10
10
|
foreignKey: { name: 'instituteId', field: 'institute_id' },
|
|
11
11
|
as: 'subjectProjectAssessmentInstitute',
|
|
@@ -38,6 +38,10 @@ class BatchSubjectProjectAssessmentModel extends sequelize_1.Model {
|
|
|
38
38
|
foreignKey: { name: 'standardId', field: 'standard_id' },
|
|
39
39
|
as: 'projectAssessmentStandard',
|
|
40
40
|
});
|
|
41
|
+
BatchSubjectProjectAssessmentModel.belongsTo(AcademicCalendarModel, {
|
|
42
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
43
|
+
as: 'batchSubProAssesAcaCal',
|
|
44
|
+
});
|
|
41
45
|
BatchSubjectProjectAssessmentModel.belongsTo(UserModel, {
|
|
42
46
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
43
47
|
as: 'createdByUser',
|
|
@@ -98,6 +102,11 @@ BatchSubjectProjectAssessmentModel.init({
|
|
|
98
102
|
type: sequelize_1.DataTypes.TEXT,
|
|
99
103
|
allowNull: true,
|
|
100
104
|
},
|
|
105
|
+
academicCalendarId: {
|
|
106
|
+
type: sequelize_1.DataTypes.UUID,
|
|
107
|
+
field: 'academic_calendar_id',
|
|
108
|
+
allowNull: true,
|
|
109
|
+
},
|
|
101
110
|
createdBy: {
|
|
102
111
|
type: sequelize_1.DataTypes.UUID,
|
|
103
112
|
allowNull: true,
|
|
@@ -6,7 +6,7 @@ const index_1 = require("./index");
|
|
|
6
6
|
const app_1 = require("../../constants/app");
|
|
7
7
|
class ClassRoomModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, TypeManagementModel, InstituteModel, FloorManagementModel } = models;
|
|
9
|
+
const { UserModel, TypeManagementModel, InstituteModel, FloorManagementModel, AcademicCalendarModel } = models;
|
|
10
10
|
ClassRoomModel.belongsTo(UserModel, {
|
|
11
11
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
12
12
|
as: 'createdByUser',
|
|
@@ -43,6 +43,20 @@ class ClassRoomModel extends sequelize_1.Model {
|
|
|
43
43
|
foreignKey: { name: 'floorId' },
|
|
44
44
|
as: 'classrooms',
|
|
45
45
|
});
|
|
46
|
+
ClassRoomModel.belongsTo(AcademicCalendarModel, {
|
|
47
|
+
foreignKey: {
|
|
48
|
+
name: 'academicCalendarId',
|
|
49
|
+
field: 'academic_calendar_id',
|
|
50
|
+
},
|
|
51
|
+
as: 'classroomAcademicCal',
|
|
52
|
+
});
|
|
53
|
+
AcademicCalendarModel.hasMany(ClassRoomModel, {
|
|
54
|
+
foreignKey: {
|
|
55
|
+
name: 'academicCalendarId',
|
|
56
|
+
field: 'academic_calendar_id',
|
|
57
|
+
},
|
|
58
|
+
as: 'AcademicCalClassroom',
|
|
59
|
+
});
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
62
|
exports.ClassRoomModel = ClassRoomModel;
|
|
@@ -91,6 +105,11 @@ ClassRoomModel.init({
|
|
|
91
105
|
field: 'type_management_id',
|
|
92
106
|
allowNull: true,
|
|
93
107
|
},
|
|
108
|
+
academicCalendarId: {
|
|
109
|
+
type: sequelize_1.DataTypes.UUID,
|
|
110
|
+
field: 'academic_calendar_id',
|
|
111
|
+
allowNull: true,
|
|
112
|
+
},
|
|
94
113
|
}, {
|
|
95
114
|
modelName: 'ClassRoomModel',
|
|
96
115
|
tableName: 'class_rooms',
|
|
@@ -17,6 +17,8 @@ export declare class CourseModel extends Model<ICourseModelAttributes, TCourseMo
|
|
|
17
17
|
status: COMMAN_STATUS;
|
|
18
18
|
instructor: string;
|
|
19
19
|
expiryTime: number;
|
|
20
|
+
thumbNail: string;
|
|
21
|
+
introVideo: string;
|
|
20
22
|
createdBy: string;
|
|
21
23
|
updatedBy: string;
|
|
22
24
|
deletedBy: string;
|
|
@@ -6,7 +6,7 @@ const index_1 = require("./index");
|
|
|
6
6
|
const app_1 = require("../../constants/app");
|
|
7
7
|
class CourseModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, InstituteModel, InstituteEntityModel, TypeManagementModel } = models;
|
|
9
|
+
const { UserModel, InstituteModel, InstituteEntityModel, TypeManagementModel, FileStorageModel } = models;
|
|
10
10
|
CourseModel.belongsTo(UserModel, {
|
|
11
11
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
12
12
|
as: 'createdByUser',
|
|
@@ -43,6 +43,22 @@ class CourseModel extends sequelize_1.Model {
|
|
|
43
43
|
foreignKey: 'materialType',
|
|
44
44
|
as: 'materialTypeHasCourses',
|
|
45
45
|
});
|
|
46
|
+
CourseModel.belongsTo(FileStorageModel, {
|
|
47
|
+
foreignKey: { name: 'thumbNail', field: 'thumb_nail' },
|
|
48
|
+
as: 'courseThumbNail',
|
|
49
|
+
});
|
|
50
|
+
CourseModel.belongsTo(FileStorageModel, {
|
|
51
|
+
foreignKey: { name: 'introVideo', field: 'intro_video' },
|
|
52
|
+
as: 'courseIntroVideo',
|
|
53
|
+
});
|
|
54
|
+
FileStorageModel.hasMany(CourseModel, {
|
|
55
|
+
foreignKey: { name: 'thumbNail', field: 'thumb_nail' },
|
|
56
|
+
as: 'coursesThumbnail',
|
|
57
|
+
});
|
|
58
|
+
FileStorageModel.hasMany(CourseModel, {
|
|
59
|
+
foreignKey: { name: 'introVideo', field: 'intro_video' },
|
|
60
|
+
as: 'coursesIntroVideo',
|
|
61
|
+
});
|
|
46
62
|
}
|
|
47
63
|
}
|
|
48
64
|
exports.CourseModel = CourseModel;
|
|
@@ -112,6 +128,16 @@ CourseModel.init({
|
|
|
112
128
|
type: sequelize_1.DataTypes.INTEGER,
|
|
113
129
|
allowNull: true,
|
|
114
130
|
},
|
|
131
|
+
thumbNail: {
|
|
132
|
+
type: sequelize_1.DataTypes.UUID,
|
|
133
|
+
field: 'thumb_nail',
|
|
134
|
+
allowNull: true,
|
|
135
|
+
},
|
|
136
|
+
introVideo: {
|
|
137
|
+
type: sequelize_1.DataTypes.UUID,
|
|
138
|
+
field: 'intro_video',
|
|
139
|
+
allowNull: true,
|
|
140
|
+
},
|
|
115
141
|
}, {
|
|
116
142
|
modelName: 'CourseModel',
|
|
117
143
|
tableName: 'courses',
|
|
@@ -20,6 +20,7 @@ export declare class FeeHistoryModel extends Model<IFeeHistoryModelAttributes, T
|
|
|
20
20
|
bankAccountId?: string | null;
|
|
21
21
|
parentHistoryId?: string | null;
|
|
22
22
|
schoolFeeCollectionId?: string | null;
|
|
23
|
+
academicCalendarId: string;
|
|
23
24
|
createdBy: string;
|
|
24
25
|
updatedBy: string;
|
|
25
26
|
deletedBy: string;
|
|
@@ -11,7 +11,7 @@ const errorMessages_1 = require("../../constants/errorMessages");
|
|
|
11
11
|
const userInstituteMetaModel_1 = __importDefault(require("../mongodb/userInstituteMetaModel"));
|
|
12
12
|
class FeeHistoryModel extends sequelize_1.Model {
|
|
13
13
|
static associate(models) {
|
|
14
|
-
const { UserModel, InstituteModel, SchoolFeeCollectionModel, FeesCollectionModel, FileStorageModel, BankAccountDetailsModel, SubjectHasPayFeeHistory, UserHasSubjectFeeModel, InstituteEntityModel, } = models;
|
|
14
|
+
const { UserModel, InstituteModel, SchoolFeeCollectionModel, FeesCollectionModel, FileStorageModel, BankAccountDetailsModel, SubjectHasPayFeeHistory, UserHasSubjectFeeModel, InstituteEntityModel, AcademicCalendarModel, } = models;
|
|
15
15
|
FeeHistoryModel.belongsTo(FeesCollectionModel, {
|
|
16
16
|
foreignKey: { name: 'feeCollectionId', field: 'fee_collection_id', allowNull: true },
|
|
17
17
|
as: 'feeHistoryFeeCollection',
|
|
@@ -68,6 +68,14 @@ class FeeHistoryModel extends sequelize_1.Model {
|
|
|
68
68
|
foreignKey: 'userId',
|
|
69
69
|
as: 'userHasFeeHistory',
|
|
70
70
|
});
|
|
71
|
+
FeeHistoryModel.belongsTo(AcademicCalendarModel, {
|
|
72
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
73
|
+
as: 'feeHistoryAcaCal',
|
|
74
|
+
});
|
|
75
|
+
AcademicCalendarModel.hasMany(FeeHistoryModel, {
|
|
76
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
77
|
+
as: 'acaCalFeeHistory',
|
|
78
|
+
});
|
|
71
79
|
FeeHistoryModel.belongsTo(UserModel, {
|
|
72
80
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
73
81
|
as: 'createdByUser',
|
|
@@ -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, FeesCollectionModel, FeeReminderSettingModel, } = models;
|
|
9
|
+
const { UserModel, InstituteModel, FeesCollectionModel, FeeReminderSettingModel, AcademicCalendarModel, } = models;
|
|
10
10
|
FeeReminderModel.belongsTo(UserModel, {
|
|
11
11
|
foreignKey: { name: 'userId', field: 'user_id' },
|
|
12
12
|
as: 'reminderUser',
|
|
@@ -51,6 +51,14 @@ class FeeReminderModel extends sequelize_1.Model {
|
|
|
51
51
|
foreignKey: 'feeCollectionId',
|
|
52
52
|
as: 'feeReminders',
|
|
53
53
|
});
|
|
54
|
+
FeeReminderModel.belongsTo(AcademicCalendarModel, {
|
|
55
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
56
|
+
as: 'feeReminderAcaCal',
|
|
57
|
+
});
|
|
58
|
+
AcademicCalendarModel.hasMany(FeeReminderModel, {
|
|
59
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
60
|
+
as: 'acaCalFeeReminder',
|
|
61
|
+
});
|
|
54
62
|
}
|
|
55
63
|
static addHooks(models) {
|
|
56
64
|
const { BatchModel, UserHasBatchModel, FeesCollectionModel } = models;
|
|
@@ -198,6 +206,11 @@ FeeReminderModel.init({
|
|
|
198
206
|
type: sequelize_1.DataTypes.UUID,
|
|
199
207
|
allowNull: false,
|
|
200
208
|
},
|
|
209
|
+
academicCalendarId: {
|
|
210
|
+
type: sequelize_1.DataTypes.UUID,
|
|
211
|
+
allowNull: true,
|
|
212
|
+
field: 'academic_calendar_id'
|
|
213
|
+
},
|
|
201
214
|
}, {
|
|
202
215
|
modelName: 'FeeReminderModel',
|
|
203
216
|
tableName: 'fee_reminders',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class FeeReminderSettingModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { InstituteModel, UserModel } = models;
|
|
8
|
+
const { InstituteModel, UserModel, AcademicCalendarModel } = models;
|
|
9
9
|
FeeReminderSettingModel.belongsTo(InstituteModel, {
|
|
10
10
|
foreignKey: { name: 'instituteId', field: 'institute_id' },
|
|
11
11
|
as: 'settingInstitute',
|
|
@@ -14,6 +14,14 @@ class FeeReminderSettingModel extends sequelize_1.Model {
|
|
|
14
14
|
foreignKey: 'instituteId',
|
|
15
15
|
as: 'instituteReminderSettings',
|
|
16
16
|
});
|
|
17
|
+
FeeReminderSettingModel.belongsTo(AcademicCalendarModel, {
|
|
18
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
19
|
+
as: 'settingAcademic',
|
|
20
|
+
});
|
|
21
|
+
AcademicCalendarModel.hasMany(FeeReminderSettingModel, {
|
|
22
|
+
foreignKey: 'academicCalendarId',
|
|
23
|
+
as: 'academicReminderSettings',
|
|
24
|
+
});
|
|
17
25
|
FeeReminderSettingModel.belongsTo(UserModel, {
|
|
18
26
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
19
27
|
as: 'createdByUser',
|
|
@@ -5,7 +5,7 @@ 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 { BankAccountDetailsModel, TypeManagementModel, InstituteModel, UserModel } = models;
|
|
8
|
+
const { BankAccountDetailsModel, TypeManagementModel, InstituteModel, UserModel, AcademicCalendarModel } = models;
|
|
9
9
|
FeeTypeModel.belongsTo(BankAccountDetailsModel, {
|
|
10
10
|
foreignKey: { name: 'account' },
|
|
11
11
|
as: 'accountFeeType',
|
|
@@ -42,6 +42,14 @@ class FeeTypeModel extends sequelize_1.Model {
|
|
|
42
42
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
43
43
|
as: 'deletedByUser',
|
|
44
44
|
});
|
|
45
|
+
FeeTypeModel.belongsTo(AcademicCalendarModel, {
|
|
46
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
47
|
+
as: 'feeTypeAcademicCalendar',
|
|
48
|
+
});
|
|
49
|
+
AcademicCalendarModel.hasMany(FeeTypeModel, {
|
|
50
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
51
|
+
as: 'academicCalendarFeeType',
|
|
52
|
+
});
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
FeeTypeModel.init({
|
|
@@ -88,6 +96,11 @@ FeeTypeModel.init({
|
|
|
88
96
|
type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.FEE_TYPE_FREQUENCY)),
|
|
89
97
|
allowNull: false,
|
|
90
98
|
},
|
|
99
|
+
academicCalendarId: {
|
|
100
|
+
type: sequelize_1.DataTypes.UUID,
|
|
101
|
+
field: 'academic_calendar_id',
|
|
102
|
+
allowNull: true,
|
|
103
|
+
},
|
|
91
104
|
}, {
|
|
92
105
|
modelName: 'FeeTypeModel',
|
|
93
106
|
tableName: 'fee_type',
|
|
@@ -6,7 +6,7 @@ const app_1 = require("../../constants/app");
|
|
|
6
6
|
const errorMessages_1 = require("../../constants/errorMessages");
|
|
7
7
|
class GreetingsModel extends sequelize_1.Model {
|
|
8
8
|
static associate(models) {
|
|
9
|
-
const { UserModel, InstituteModel, FileStorageModel } = models;
|
|
9
|
+
const { UserModel, InstituteModel, FileStorageModel, AcademicCalendarModel } = models;
|
|
10
10
|
GreetingsModel.belongsTo(UserModel, {
|
|
11
11
|
foreignKey: {
|
|
12
12
|
name: 'createdBy',
|
|
@@ -53,6 +53,14 @@ class GreetingsModel extends sequelize_1.Model {
|
|
|
53
53
|
},
|
|
54
54
|
as: 'imageHasGreetings',
|
|
55
55
|
});
|
|
56
|
+
GreetingsModel.belongsTo(AcademicCalendarModel, {
|
|
57
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
58
|
+
as: 'GreetingsAcademicCalendar',
|
|
59
|
+
});
|
|
60
|
+
AcademicCalendarModel.hasMany(GreetingsModel, {
|
|
61
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
62
|
+
as: 'academicCalendarGreetings',
|
|
63
|
+
});
|
|
56
64
|
}
|
|
57
65
|
static addHooks(models) {
|
|
58
66
|
const beforeCreateOrUpdateHook = async (greetings) => {
|
|
@@ -86,6 +94,11 @@ GreetingsModel.init({
|
|
|
86
94
|
field: 'institute_id',
|
|
87
95
|
allowNull: true,
|
|
88
96
|
},
|
|
97
|
+
academicCalendarId: {
|
|
98
|
+
type: sequelize_1.DataTypes.UUID,
|
|
99
|
+
field: 'academic_calendar_id',
|
|
100
|
+
allowNull: true,
|
|
101
|
+
},
|
|
89
102
|
status: {
|
|
90
103
|
type: sequelize_1.DataTypes.STRING,
|
|
91
104
|
allowNull: true,
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class HomeWorkModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, BatchModel, InstituteModel, InstituteEntityModel } = models;
|
|
8
|
+
const { UserModel, BatchModel, InstituteModel, InstituteEntityModel, AcademicCalendarModel } = models;
|
|
9
9
|
HomeWorkModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
11
|
as: 'createdByUser',
|
|
@@ -42,6 +42,14 @@ class HomeWorkModel extends sequelize_1.Model {
|
|
|
42
42
|
foreignKey: { name: 'subjectId', field: 'subject_id' },
|
|
43
43
|
as: 'homeWorkSubject',
|
|
44
44
|
});
|
|
45
|
+
HomeWorkModel.belongsTo(AcademicCalendarModel, {
|
|
46
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
47
|
+
as: 'homeWorkAcademicCalendar',
|
|
48
|
+
});
|
|
49
|
+
AcademicCalendarModel.hasMany(HomeWorkModel, {
|
|
50
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
51
|
+
as: 'academicCalendarHomeWork',
|
|
52
|
+
});
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
HomeWorkModel.init({
|
|
@@ -89,6 +97,11 @@ HomeWorkModel.init({
|
|
|
89
97
|
allowNull: false,
|
|
90
98
|
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
91
99
|
},
|
|
100
|
+
academicCalendarId: {
|
|
101
|
+
type: sequelize_1.DataTypes.UUID,
|
|
102
|
+
allowNull: true,
|
|
103
|
+
field: 'academic_calendar_id',
|
|
104
|
+
},
|
|
92
105
|
}, {
|
|
93
106
|
modelName: 'HomeWorkModel',
|
|
94
107
|
tableName: 'home_work',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class LectureHistoryModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, TypeManagementModel, InstituteModel, WorkingDayModel, ClassRoomModel, BatchModel, InstituteEntityModel, LectureModel } = models;
|
|
8
|
+
const { UserModel, TypeManagementModel, InstituteModel, WorkingDayModel, ClassRoomModel, BatchModel, InstituteEntityModel, LectureModel, AcademicCalendarModel } = models;
|
|
9
9
|
LectureHistoryModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
11
|
as: 'createdByUser',
|
|
@@ -50,6 +50,14 @@ class LectureHistoryModel extends sequelize_1.Model {
|
|
|
50
50
|
foreignKey: { name: 'lectureId', field: 'lecture_id' },
|
|
51
51
|
as: 'lectureHistoryList',
|
|
52
52
|
});
|
|
53
|
+
LectureHistoryModel.belongsTo(AcademicCalendarModel, {
|
|
54
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
55
|
+
as: 'lectureHAcaCal',
|
|
56
|
+
});
|
|
57
|
+
AcademicCalendarModel.hasMany(LectureHistoryModel, {
|
|
58
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
59
|
+
as: 'acaCalLectureH',
|
|
60
|
+
});
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
LectureHistoryModel.init({
|
|
@@ -83,6 +91,11 @@ LectureHistoryModel.init({
|
|
|
83
91
|
color: { type: sequelize_1.DataTypes.STRING, allowNull: true },
|
|
84
92
|
lectureId: { type: sequelize_1.DataTypes.UUID, field: 'lecture_id', allowNull: true },
|
|
85
93
|
weekNumber: { type: sequelize_1.DataTypes.INTEGER, field: 'week_number', allowNull: true },
|
|
94
|
+
academicCalendarId: {
|
|
95
|
+
type: sequelize_1.DataTypes.UUID,
|
|
96
|
+
field: 'academic_calendar_id',
|
|
97
|
+
allowNull: true,
|
|
98
|
+
},
|
|
86
99
|
}, {
|
|
87
100
|
modelName: 'LectureHistoryModel',
|
|
88
101
|
tableName: 'lecture_history',
|
|
@@ -155,7 +155,7 @@ class LectureModel extends sequelize_1.Model {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
static associate(models) {
|
|
158
|
-
const { UserModel, TypeManagementModel, InstituteModel, WorkingDayModel, SlotModel, WorkingShiftModel, ClassRoomModel, BatchModel, InstituteEntityModel, } = models;
|
|
158
|
+
const { UserModel, TypeManagementModel, InstituteModel, WorkingDayModel, SlotModel, WorkingShiftModel, ClassRoomModel, BatchModel, InstituteEntityModel, AcademicCalendarModel, } = models;
|
|
159
159
|
LectureModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
|
|
160
160
|
LectureModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
|
|
161
161
|
LectureModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
|
|
@@ -184,6 +184,14 @@ class LectureModel extends sequelize_1.Model {
|
|
|
184
184
|
BatchModel.hasMany(LectureModel, { foreignKey: 'batchId', as: 'batchHasLectures' });
|
|
185
185
|
LectureModel.belongsTo(InstituteEntityModel, { foreignKey: 'subject', as: 'subjectDetails' });
|
|
186
186
|
InstituteEntityModel.hasMany(LectureModel, { foreignKey: 'subject', as: 'subjectHasLectures' });
|
|
187
|
+
LectureModel.belongsTo(AcademicCalendarModel, {
|
|
188
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
189
|
+
as: 'lectureAcaCal',
|
|
190
|
+
});
|
|
191
|
+
AcademicCalendarModel.hasMany(LectureModel, {
|
|
192
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
193
|
+
as: 'acaCalLecture',
|
|
194
|
+
});
|
|
187
195
|
}
|
|
188
196
|
}
|
|
189
197
|
LectureModel.init({
|
|
@@ -209,5 +217,10 @@ LectureModel.init({
|
|
|
209
217
|
plannerSyncStatus: { type: sequelize_1.DataTypes.STRING, field: 'planner_sync_status', allowNull: true, defaultValue: app_1.PLANNER_SYNC_STATUS.PENDING },
|
|
210
218
|
shiftId: { type: sequelize_1.DataTypes.UUID, field: 'shift_id', allowNull: true },
|
|
211
219
|
slotId: { type: sequelize_1.DataTypes.UUID, field: 'slot_id', allowNull: true },
|
|
220
|
+
academicCalendarId: {
|
|
221
|
+
type: sequelize_1.DataTypes.UUID,
|
|
222
|
+
field: 'academic_calendar_id',
|
|
223
|
+
allowNull: true,
|
|
224
|
+
},
|
|
212
225
|
}, { modelName: 'LectureModel', tableName: 'lectures', timestamps: true, sequelize: index_1.sequelize });
|
|
213
226
|
exports.default = LectureModel;
|
|
@@ -28,7 +28,7 @@ class MasterLeaveModel extends sequelize_1.Model {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
static associate(models) {
|
|
31
|
-
const { InstituteModel, TypeManagementModel, UserModel } = models;
|
|
31
|
+
const { InstituteModel, TypeManagementModel, UserModel, AcademicCalendarModel } = models;
|
|
32
32
|
MasterLeaveModel.belongsTo(InstituteModel, {
|
|
33
33
|
foreignKey: {
|
|
34
34
|
name: 'instituteId',
|
|
@@ -75,6 +75,14 @@ class MasterLeaveModel extends sequelize_1.Model {
|
|
|
75
75
|
},
|
|
76
76
|
as: 'deletedByUser',
|
|
77
77
|
});
|
|
78
|
+
MasterLeaveModel.belongsTo(AcademicCalendarModel, {
|
|
79
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id', allowNull: true },
|
|
80
|
+
as: 'masterLeaveAcaCal',
|
|
81
|
+
});
|
|
82
|
+
AcademicCalendarModel.hasMany(MasterLeaveModel, {
|
|
83
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id', allowNull: true },
|
|
84
|
+
as: 'acaCalMasterLeave',
|
|
85
|
+
});
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
88
|
MasterLeaveModel.init({
|
|
@@ -122,6 +130,11 @@ MasterLeaveModel.init({
|
|
|
122
130
|
type: sequelize_1.DataTypes.DATE,
|
|
123
131
|
allowNull: true,
|
|
124
132
|
},
|
|
133
|
+
academicCalendarId: {
|
|
134
|
+
type: sequelize_1.DataTypes.UUID,
|
|
135
|
+
field: 'academic_calendar_id',
|
|
136
|
+
allowNull: true,
|
|
137
|
+
},
|
|
125
138
|
}, {
|
|
126
139
|
modelName: 'MasterLeaveModel',
|
|
127
140
|
tableName: 'master_leaves',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class OfferModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel } = models;
|
|
8
|
+
const { UserModel, InstituteModel, AcademicCalenderModel } = models;
|
|
9
9
|
OfferModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: {
|
|
11
11
|
name: 'userId',
|
|
@@ -46,6 +46,14 @@ class OfferModel extends sequelize_1.Model {
|
|
|
46
46
|
},
|
|
47
47
|
as: 'deletedByUser',
|
|
48
48
|
});
|
|
49
|
+
OfferModel.belongsTo(AcademicCalenderModel, {
|
|
50
|
+
foreignKey: {
|
|
51
|
+
name: 'academicCalendarId',
|
|
52
|
+
field: 'academic_calendar_id',
|
|
53
|
+
},
|
|
54
|
+
as: 'offerAcaCal',
|
|
55
|
+
});
|
|
56
|
+
AcademicCalenderModel.hasMany(OfferModel, { foreignKey: 'academicCalendarId', as: 'acaCalOffer' });
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
OfferModel.init({
|
|
@@ -114,6 +122,10 @@ OfferModel.init({
|
|
|
114
122
|
type: sequelize_1.DataTypes.INTEGER,
|
|
115
123
|
allowNull: true,
|
|
116
124
|
},
|
|
125
|
+
academicCalendarId: {
|
|
126
|
+
type: sequelize_1.DataTypes.UUID,
|
|
127
|
+
allowNull: true,
|
|
128
|
+
}
|
|
117
129
|
}, {
|
|
118
130
|
modelName: 'OfferModel',
|
|
119
131
|
tableName: 'offers',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class PaymentTermsModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel } = models;
|
|
8
|
+
const { UserModel, InstituteModel, AcademicCalendarModel } = models;
|
|
9
9
|
PaymentTermsModel.belongsTo(InstituteModel, {
|
|
10
10
|
foreignKey: {
|
|
11
11
|
name: 'instituteId',
|
|
@@ -46,6 +46,14 @@ class PaymentTermsModel extends sequelize_1.Model {
|
|
|
46
46
|
},
|
|
47
47
|
as: 'deletedByUser',
|
|
48
48
|
});
|
|
49
|
+
PaymentTermsModel.belongsTo(AcademicCalendarModel, {
|
|
50
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
51
|
+
as: 'paymentTermsAcaCal',
|
|
52
|
+
});
|
|
53
|
+
AcademicCalendarModel.hasMany(PaymentTermsModel, {
|
|
54
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
55
|
+
as: 'acaCalPaymentTerms',
|
|
56
|
+
});
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
PaymentTermsModel.init({
|
|
@@ -103,6 +111,11 @@ PaymentTermsModel.init({
|
|
|
103
111
|
field: 'fee_collection_id',
|
|
104
112
|
allowNull: false,
|
|
105
113
|
},
|
|
114
|
+
academicCalendarId: {
|
|
115
|
+
type: sequelize_1.DataTypes.UUID,
|
|
116
|
+
field: 'academic_calendar_id',
|
|
117
|
+
allowNull: true,
|
|
118
|
+
},
|
|
106
119
|
}, {
|
|
107
120
|
modelName: 'PaymentTermsModel',
|
|
108
121
|
tableName: 'payment_terms',
|