@kipicore/dbcore 1.1.122 → 1.1.123
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/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/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/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 index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class UserHasLeaveModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel, MasterLeaveModel, UserHasLeaveModel } = models;
|
|
8
|
+
const { UserModel, InstituteModel, MasterLeaveModel, UserHasLeaveModel, AcademicCalendarModel } = models;
|
|
9
9
|
UserHasLeaveModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: { name: 'userId', field: 'user_id' },
|
|
11
11
|
as: 'leaveUser',
|
|
@@ -50,6 +50,14 @@ class UserHasLeaveModel extends sequelize_1.Model {
|
|
|
50
50
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
51
51
|
as: 'deletedByUser',
|
|
52
52
|
});
|
|
53
|
+
UserHasLeaveModel.belongsTo(AcademicCalendarModel, {
|
|
54
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
55
|
+
as: 'userHLeaveAcaCal',
|
|
56
|
+
});
|
|
57
|
+
AcademicCalendarModel.hasMany(UserHasLeaveModel, {
|
|
58
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
59
|
+
as: 'acaCalUserHLeave',
|
|
60
|
+
});
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
UserHasLeaveModel.init({
|
|
@@ -91,6 +99,11 @@ UserHasLeaveModel.init({
|
|
|
91
99
|
defaultValue: 0,
|
|
92
100
|
allowNull: false,
|
|
93
101
|
},
|
|
102
|
+
academicCalendarId: {
|
|
103
|
+
type: sequelize_1.DataTypes.UUID,
|
|
104
|
+
field: 'academic_calendar_id',
|
|
105
|
+
allowNull: true,
|
|
106
|
+
},
|
|
94
107
|
}, {
|
|
95
108
|
modelName: 'UserHasLeaveModel',
|
|
96
109
|
tableName: 'user_has_leave',
|
|
@@ -4,7 +4,7 @@ const sequelize_1 = require("sequelize");
|
|
|
4
4
|
const index_1 = require("./index");
|
|
5
5
|
class UserHasOfferModel extends sequelize_1.Model {
|
|
6
6
|
static associate(models) {
|
|
7
|
-
const { UserModel, InstituteModel, FeesCollectionModel, OfferModel, CourseModel } = models;
|
|
7
|
+
const { UserModel, InstituteModel, FeesCollectionModel, OfferModel, CourseModel, AcademicCalenderModel } = models;
|
|
8
8
|
UserHasOfferModel.belongsTo(InstituteModel, {
|
|
9
9
|
foreignKey: { name: 'instituteId', field: 'institute_id' },
|
|
10
10
|
as: 'userHasOfferInstitute',
|
|
@@ -56,6 +56,14 @@ class UserHasOfferModel extends sequelize_1.Model {
|
|
|
56
56
|
foreignKey: 'courseId',
|
|
57
57
|
as: 'userOfferHasCourse',
|
|
58
58
|
});
|
|
59
|
+
UserHasOfferModel.belongsTo(AcademicCalenderModel, {
|
|
60
|
+
foreignKey: {
|
|
61
|
+
name: 'academicCalendarId',
|
|
62
|
+
field: 'academic_calendar_id',
|
|
63
|
+
},
|
|
64
|
+
as: 'userHOfferAcaCal',
|
|
65
|
+
});
|
|
66
|
+
AcademicCalenderModel.hasMany(UserHasOfferModel, { foreignKey: 'academicCalendarId', field: 'academic_calendar_id', as: 'acaCalUserHOffer' });
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
UserHasOfferModel.init({
|
|
@@ -90,6 +98,10 @@ UserHasOfferModel.init({
|
|
|
90
98
|
type: sequelize_1.DataTypes.UUID,
|
|
91
99
|
allowNull: true,
|
|
92
100
|
},
|
|
101
|
+
academicCalendarId: {
|
|
102
|
+
type: sequelize_1.DataTypes.UUID,
|
|
103
|
+
allowNull: true,
|
|
104
|
+
}
|
|
93
105
|
}, {
|
|
94
106
|
modelName: 'UserHasOfferModel',
|
|
95
107
|
tableName: 'user_has_offers',
|
|
@@ -4,7 +4,7 @@ const sequelize_1 = require("sequelize");
|
|
|
4
4
|
const index_1 = require("./index");
|
|
5
5
|
class UserHasRollNumberModel extends sequelize_1.Model {
|
|
6
6
|
static associate(models) {
|
|
7
|
-
const { UserModel, InstituteModel, BatchModel } = models;
|
|
7
|
+
const { UserModel, InstituteModel, BatchModel, AcademicCalendarModel } = models;
|
|
8
8
|
UserHasRollNumberModel.belongsTo(InstituteModel, {
|
|
9
9
|
foreignKey: { name: 'instituteId', field: 'institute_id' },
|
|
10
10
|
as: 'rollNumberHasInstitute',
|
|
@@ -41,6 +41,14 @@ class UserHasRollNumberModel extends sequelize_1.Model {
|
|
|
41
41
|
foreignKey: 'userId',
|
|
42
42
|
as: 'rollNumberHasUser',
|
|
43
43
|
});
|
|
44
|
+
UserHasRollNumberModel.belongsTo(AcademicCalendarModel, {
|
|
45
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
46
|
+
as: 'userHRollNAcaCal',
|
|
47
|
+
});
|
|
48
|
+
AcademicCalendarModel.hasMany(UserHasRollNumberModel, {
|
|
49
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
50
|
+
as: 'acaCalUserHRollN',
|
|
51
|
+
});
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
54
|
UserHasRollNumberModel.init({
|
|
@@ -66,6 +74,11 @@ UserHasRollNumberModel.init({
|
|
|
66
74
|
type: sequelize_1.DataTypes.INTEGER,
|
|
67
75
|
allowNull: false,
|
|
68
76
|
},
|
|
77
|
+
academicCalendarId: {
|
|
78
|
+
type: sequelize_1.DataTypes.UUID,
|
|
79
|
+
field: 'academic_calendar_id',
|
|
80
|
+
allowNull: true,
|
|
81
|
+
},
|
|
69
82
|
}, {
|
|
70
83
|
modelName: 'UserHasRollNumberModel',
|
|
71
84
|
tableName: 'user_has_roll_number',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class UserLeaveRequestModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel, MasterLeaveModel, UserHasLeaveModel } = models;
|
|
8
|
+
const { UserModel, InstituteModel, MasterLeaveModel, UserHasLeaveModel, AcademicCalendarModel } = models;
|
|
9
9
|
UserLeaveRequestModel.belongsTo(UserModel, { foreignKey: 'userId', as: 'user' });
|
|
10
10
|
UserLeaveRequestModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
|
|
11
11
|
UserLeaveRequestModel.belongsTo(MasterLeaveModel, { foreignKey: 'leaveId', as: 'leaveDetails' });
|
|
@@ -26,6 +26,14 @@ class UserLeaveRequestModel extends sequelize_1.Model {
|
|
|
26
26
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
27
27
|
as: 'deletedByUser',
|
|
28
28
|
});
|
|
29
|
+
UserLeaveRequestModel.belongsTo(AcademicCalendarModel, {
|
|
30
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
31
|
+
as: 'userLReqAcaCal',
|
|
32
|
+
});
|
|
33
|
+
AcademicCalendarModel.hasMany(UserLeaveRequestModel, {
|
|
34
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
35
|
+
as: 'acaCalUserLReq',
|
|
36
|
+
});
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
39
|
UserLeaveRequestModel.init({
|
|
@@ -79,6 +87,11 @@ UserLeaveRequestModel.init({
|
|
|
79
87
|
type: sequelize_1.DataTypes.DATE,
|
|
80
88
|
allowNull: false,
|
|
81
89
|
},
|
|
90
|
+
academicCalendarId: {
|
|
91
|
+
type: sequelize_1.DataTypes.UUID,
|
|
92
|
+
field: 'academic_calendar_id',
|
|
93
|
+
allowNull: true,
|
|
94
|
+
},
|
|
82
95
|
}, {
|
|
83
96
|
modelName: 'UserLeaveRequestModel',
|
|
84
97
|
tableName: 'user_leave_request',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class UserProjectAssessmentOptionModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { BatchSubjectProjectAssessmentModel, ProjectAssessmentOptionModel, UserModel } = models;
|
|
8
|
+
const { BatchSubjectProjectAssessmentModel, ProjectAssessmentOptionModel, UserModel, AcademicCalendarModel } = models;
|
|
9
9
|
UserProjectAssessmentOptionModel.belongsTo(BatchSubjectProjectAssessmentModel, {
|
|
10
10
|
foreignKey: { name: 'assessmentProjectId', field: 'assessment_project_id' },
|
|
11
11
|
as: 'assessmentProject',
|
|
@@ -42,6 +42,14 @@ class UserProjectAssessmentOptionModel extends sequelize_1.Model {
|
|
|
42
42
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
43
43
|
as: 'deletedByUser',
|
|
44
44
|
});
|
|
45
|
+
UserProjectAssessmentOptionModel.belongsTo(AcademicCalendarModel, {
|
|
46
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
47
|
+
as: 'syllabusAcaCal',
|
|
48
|
+
});
|
|
49
|
+
AcademicCalendarModel.hasMany(UserProjectAssessmentOptionModel, {
|
|
50
|
+
foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
|
|
51
|
+
as: 'acaCalSyllabus',
|
|
52
|
+
});
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
UserProjectAssessmentOptionModel.init({
|
|
@@ -75,6 +83,11 @@ UserProjectAssessmentOptionModel.init({
|
|
|
75
83
|
type: sequelize_1.DataTypes.TEXT,
|
|
76
84
|
allowNull: true,
|
|
77
85
|
},
|
|
86
|
+
academicCalendarId: {
|
|
87
|
+
type: sequelize_1.DataTypes.UUID,
|
|
88
|
+
field: 'academic_calendar_id',
|
|
89
|
+
allowNull: true,
|
|
90
|
+
},
|
|
78
91
|
}, {
|
|
79
92
|
modelName: 'UserProjectAssessmentOptionModel',
|
|
80
93
|
tableName: 'user_project_assessment_options',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class WorkingDayModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel } = models;
|
|
8
|
+
const { UserModel, AcademicCalendarModel } = models;
|
|
9
9
|
WorkingDayModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
11
|
as: 'createdByUser',
|
|
@@ -18,6 +18,10 @@ class WorkingDayModel extends sequelize_1.Model {
|
|
|
18
18
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
19
19
|
as: 'deletedByUser',
|
|
20
20
|
});
|
|
21
|
+
WorkingDayModel.belongsTo(AcademicCalendarModel, {
|
|
22
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
23
|
+
as: 'workingDayAcaCal',
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
WorkingDayModel.init({
|
|
@@ -57,6 +61,11 @@ WorkingDayModel.init({
|
|
|
57
61
|
allowNull: true,
|
|
58
62
|
field: 'institute_id',
|
|
59
63
|
},
|
|
64
|
+
academicCalendarId: {
|
|
65
|
+
type: sequelize_1.DataTypes.UUID,
|
|
66
|
+
field: 'academic_calendar_id',
|
|
67
|
+
allowNull: true,
|
|
68
|
+
},
|
|
60
69
|
}, {
|
|
61
70
|
modelName: 'WorkingDayModel',
|
|
62
71
|
tableName: 'working_days',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class WorkingShiftModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { WorkingDayModel, InstituteModel, SlotModel, UserModel } = models;
|
|
8
|
+
const { WorkingDayModel, InstituteModel, SlotModel, UserModel, AcademicCalendarModel } = models;
|
|
9
9
|
WorkingShiftModel.belongsTo(WorkingDayModel, {
|
|
10
10
|
foreignKey: 'workingId',
|
|
11
11
|
as: 'shiftHasWorkingDay',
|
|
@@ -42,6 +42,10 @@ class WorkingShiftModel extends sequelize_1.Model {
|
|
|
42
42
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
43
43
|
as: 'deletedByUser',
|
|
44
44
|
});
|
|
45
|
+
WorkingShiftModel.belongsTo(AcademicCalendarModel, {
|
|
46
|
+
foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
|
|
47
|
+
as: 'workingShiftAcaCal',
|
|
48
|
+
});
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
WorkingShiftModel.init({
|
|
@@ -86,6 +90,11 @@ WorkingShiftModel.init({
|
|
|
86
90
|
allowNull: true,
|
|
87
91
|
field: 'institute_id',
|
|
88
92
|
},
|
|
93
|
+
academicCalendarId: {
|
|
94
|
+
type: sequelize_1.DataTypes.UUID,
|
|
95
|
+
field: 'academic_calendar_id',
|
|
96
|
+
allowNull: true,
|
|
97
|
+
},
|
|
89
98
|
}, {
|
|
90
99
|
modelName: 'WorkingShiftModel',
|
|
91
100
|
tableName: 'working_shift_days',
|
package/package.json
CHANGED