@kipicore/dbcore 1.0.3
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/README.md +1 -0
- package/dist/configs/aws.d.ts +2 -0
- package/dist/configs/aws.js +12 -0
- package/dist/configs/env.d.ts +15 -0
- package/dist/configs/env.js +83 -0
- package/dist/constants/app.d.ts +848 -0
- package/dist/constants/app.js +1073 -0
- package/dist/constants/defaultModelAttributes.d.ts +17 -0
- package/dist/constants/defaultModelAttributes.js +21 -0
- package/dist/constants/errorMessages.d.ts +1055 -0
- package/dist/constants/errorMessages.js +1166 -0
- package/dist/constants/httpStatusCode.d.ts +26 -0
- package/dist/constants/httpStatusCode.js +30 -0
- package/dist/constants/successMessages.d.ts +699 -0
- package/dist/constants/successMessages.js +813 -0
- package/dist/db/mongodb.d.ts +1 -0
- package/dist/db/mongodb.js +24 -0
- package/dist/db/postgres.d.ts +2 -0
- package/dist/db/postgres.js +17 -0
- package/dist/helpers/s3Uploader.d.ts +3 -0
- package/dist/helpers/s3Uploader.js +61 -0
- package/dist/helpers/utils.d.ts +173 -0
- package/dist/helpers/utils.js +682 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +12 -0
- package/dist/interfaces/PaymentProcessorInterface.d.ts +0 -0
- package/dist/interfaces/PaymentProcessorInterface.js +1 -0
- package/dist/interfaces/academicCalendarInterface.d.ts +9 -0
- package/dist/interfaces/academicCalendarInterface.js +2 -0
- package/dist/interfaces/accountHasReceiptDetailsInterface.d.ts +17 -0
- package/dist/interfaces/accountHasReceiptDetailsInterface.js +2 -0
- package/dist/interfaces/announcementInterface.d.ts +19 -0
- package/dist/interfaces/announcementInterface.js +2 -0
- package/dist/interfaces/approvalRequestInterface.d.ts +14 -0
- package/dist/interfaces/approvalRequestInterface.js +2 -0
- package/dist/interfaces/areaInterface.d.ts +5 -0
- package/dist/interfaces/areaInterface.js +2 -0
- package/dist/interfaces/attendanceInterface.d.ts +21 -0
- package/dist/interfaces/attendanceInterface.js +2 -0
- package/dist/interfaces/bankAccountDetailsInterface.d.ts +14 -0
- package/dist/interfaces/bankAccountDetailsInterface.js +2 -0
- package/dist/interfaces/bannerInterface.d.ts +15 -0
- package/dist/interfaces/bannerInterface.js +2 -0
- package/dist/interfaces/batchInterface.d.ts +18 -0
- package/dist/interfaces/batchInterface.js +2 -0
- package/dist/interfaces/batchSubjectBookAssessmentInterface.d.ts +9 -0
- package/dist/interfaces/batchSubjectBookAssessmentInterface.js +2 -0
- package/dist/interfaces/batchSubjectProjectAssessmentInterface.d.ts +12 -0
- package/dist/interfaces/batchSubjectProjectAssessmentInterface.js +2 -0
- package/dist/interfaces/blogInterface.d.ts +46 -0
- package/dist/interfaces/blogInterface.js +2 -0
- package/dist/interfaces/bookAssessmentDateInterface.d.ts +8 -0
- package/dist/interfaces/bookAssessmentDateInterface.js +2 -0
- package/dist/interfaces/careerInterface.d.ts +12 -0
- package/dist/interfaces/careerInterface.js +2 -0
- package/dist/interfaces/categoriesInterface.d.ts +8 -0
- package/dist/interfaces/categoriesInterface.js +2 -0
- package/dist/interfaces/certificatesHistoryInterface.d.ts +9 -0
- package/dist/interfaces/certificatesHistoryInterface.js +2 -0
- package/dist/interfaces/certificatesManagementInterface.d.ts +11 -0
- package/dist/interfaces/certificatesManagementInterface.js +2 -0
- package/dist/interfaces/cityInterface.d.ts +12 -0
- package/dist/interfaces/cityInterface.js +2 -0
- package/dist/interfaces/classRoomInterface.d.ts +13 -0
- package/dist/interfaces/classRoomInterface.js +2 -0
- package/dist/interfaces/cloudStorageInterface.d.ts +15 -0
- package/dist/interfaces/cloudStorageInterface.js +2 -0
- package/dist/interfaces/coinPurchaseOfferInterface.d.ts +16 -0
- package/dist/interfaces/coinPurchaseOfferInterface.js +2 -0
- package/dist/interfaces/columnInterface.d.ts +15 -0
- package/dist/interfaces/columnInterface.js +2 -0
- package/dist/interfaces/commanInterface.d.ts +52 -0
- package/dist/interfaces/commanInterface.js +2 -0
- package/dist/interfaces/contactFeedBackInterface.d.ts +13 -0
- package/dist/interfaces/contactFeedBackInterface.js +2 -0
- package/dist/interfaces/countryInterface.d.ts +11 -0
- package/dist/interfaces/countryInterface.js +2 -0
- package/dist/interfaces/courseHasVisitorsInterface.d.ts +7 -0
- package/dist/interfaces/courseHasVisitorsInterface.js +2 -0
- package/dist/interfaces/courseInterface.d.ts +18 -0
- package/dist/interfaces/courseInterface.js +2 -0
- package/dist/interfaces/dailyBookInterface.d.ts +14 -0
- package/dist/interfaces/dailyBookInterface.js +2 -0
- package/dist/interfaces/dashboardManagementInterface.d.ts +19 -0
- package/dist/interfaces/dashboardManagementInterface.js +2 -0
- package/dist/interfaces/driverInterface.d.ts +21 -0
- package/dist/interfaces/driverInterface.js +2 -0
- package/dist/interfaces/entityGroupInterface.d.ts +12 -0
- package/dist/interfaces/entityGroupInterface.js +2 -0
- package/dist/interfaces/eventInterface.d.ts +21 -0
- package/dist/interfaces/eventInterface.js +2 -0
- package/dist/interfaces/examGroupInterface.d.ts +30 -0
- package/dist/interfaces/examGroupInterface.js +2 -0
- package/dist/interfaces/examHasAnswerSheetInterface.d.ts +23 -0
- package/dist/interfaces/examHasAnswerSheetInterface.js +2 -0
- package/dist/interfaces/examInterface.d.ts +38 -0
- package/dist/interfaces/examInterface.js +2 -0
- package/dist/interfaces/facilityInterface.d.ts +9 -0
- package/dist/interfaces/facilityInterface.js +2 -0
- package/dist/interfaces/featureActionInterface.d.ts +17 -0
- package/dist/interfaces/featureActionInterface.js +2 -0
- package/dist/interfaces/feeHistoryDetailsInterface.d.ts +17 -0
- package/dist/interfaces/feeHistoryDetailsInterface.js +2 -0
- package/dist/interfaces/feeHistoryInterface.d.ts +21 -0
- package/dist/interfaces/feeHistoryInterface.js +2 -0
- package/dist/interfaces/feeReminderInterface.d.ts +13 -0
- package/dist/interfaces/feeReminderInterface.js +2 -0
- package/dist/interfaces/feeReminderSettingInterface.d.ts +10 -0
- package/dist/interfaces/feeReminderSettingInterface.js +2 -0
- package/dist/interfaces/feeReminderTypeInterface.d.ts +10 -0
- package/dist/interfaces/feeReminderTypeInterface.js +2 -0
- package/dist/interfaces/feeTypeHasTermsInterface.d.ts +12 -0
- package/dist/interfaces/feeTypeHasTermsInterface.js +2 -0
- package/dist/interfaces/feeTypeInterface.d.ts +13 -0
- package/dist/interfaces/feeTypeInterface.js +2 -0
- package/dist/interfaces/feedBackInterface.d.ts +19 -0
- package/dist/interfaces/feedBackInterface.js +2 -0
- package/dist/interfaces/feesCollectionInterface.d.ts +19 -0
- package/dist/interfaces/feesCollectionInterface.js +2 -0
- package/dist/interfaces/fileStorageInterface.d.ts +14 -0
- package/dist/interfaces/fileStorageInterface.js +2 -0
- package/dist/interfaces/floorManagementInterface.d.ts +9 -0
- package/dist/interfaces/floorManagementInterface.js +2 -0
- package/dist/interfaces/generateIdCardInterface.d.ts +8 -0
- package/dist/interfaces/generateIdCardInterface.js +2 -0
- package/dist/interfaces/greetingsInterface.d.ts +12 -0
- package/dist/interfaces/greetingsInterface.js +2 -0
- package/dist/interfaces/holidayInterface.d.ts +22 -0
- package/dist/interfaces/holidayInterface.js +2 -0
- package/dist/interfaces/homeworkInterface.d.ts +13 -0
- package/dist/interfaces/homeworkInterface.js +2 -0
- package/dist/interfaces/informationSupportInterface.d.ts +15 -0
- package/dist/interfaces/informationSupportInterface.js +2 -0
- package/dist/interfaces/inquiryInterface.d.ts +54 -0
- package/dist/interfaces/inquiryInterface.js +2 -0
- package/dist/interfaces/instituteEntityInterface.d.ts +16 -0
- package/dist/interfaces/instituteEntityInterface.js +2 -0
- package/dist/interfaces/instituteEntityTypeInterface.d.ts +10 -0
- package/dist/interfaces/instituteEntityTypeInterface.js +2 -0
- package/dist/interfaces/instituteInterface.d.ts +35 -0
- package/dist/interfaces/instituteInterface.js +2 -0
- package/dist/interfaces/instituteSubscriptionPlanInterface.d.ts +21 -0
- package/dist/interfaces/instituteSubscriptionPlanInterface.js +2 -0
- package/dist/interfaces/inventoryHistoryInterface.d.ts +17 -0
- package/dist/interfaces/inventoryHistoryInterface.js +2 -0
- package/dist/interfaces/inventoryInterface.d.ts +15 -0
- package/dist/interfaces/inventoryInterface.js +2 -0
- package/dist/interfaces/invoiceInterface.d.ts +31 -0
- package/dist/interfaces/invoiceInterface.js +2 -0
- package/dist/interfaces/jobApplyInterface.d.ts +35 -0
- package/dist/interfaces/jobApplyInterface.js +2 -0
- package/dist/interfaces/lectureHistoryInterface.d.ts +24 -0
- package/dist/interfaces/lectureHistoryInterface.js +2 -0
- package/dist/interfaces/lectureInterface.d.ts +26 -0
- package/dist/interfaces/lectureInterface.js +2 -0
- package/dist/interfaces/masterLeaveInterface.d.ts +13 -0
- package/dist/interfaces/masterLeaveInterface.js +2 -0
- package/dist/interfaces/moduleFeatureInterface.d.ts +16 -0
- package/dist/interfaces/moduleFeatureInterface.js +2 -0
- package/dist/interfaces/moduleInterface.d.ts +15 -0
- package/dist/interfaces/moduleInterface.js +2 -0
- package/dist/interfaces/offersInterface.d.ts +18 -0
- package/dist/interfaces/offersInterface.js +2 -0
- package/dist/interfaces/paymentTermsInterface.d.ts +15 -0
- package/dist/interfaces/paymentTermsInterface.js +2 -0
- package/dist/interfaces/pdcChequeInterface.d.ts +16 -0
- package/dist/interfaces/pdcChequeInterface.js +2 -0
- package/dist/interfaces/pdcHistoryInterface.d.ts +17 -0
- package/dist/interfaces/pdcHistoryInterface.js +2 -0
- package/dist/interfaces/photosGalleryInterface.d.ts +17 -0
- package/dist/interfaces/photosGalleryInterface.js +2 -0
- package/dist/interfaces/pincodeInterface.d.ts +15 -0
- package/dist/interfaces/pincodeInterface.js +2 -0
- package/dist/interfaces/plannerInterface.d.ts +32 -0
- package/dist/interfaces/plannerInterface.js +2 -0
- package/dist/interfaces/productInterface.d.ts +10 -0
- package/dist/interfaces/productInterface.js +2 -0
- package/dist/interfaces/projectAssessmentOptionInterface.d.ts +8 -0
- package/dist/interfaces/projectAssessmentOptionInterface.js +2 -0
- package/dist/interfaces/replaceTeacherInterface.d.ts +22 -0
- package/dist/interfaces/replaceTeacherInterface.js +2 -0
- package/dist/interfaces/roleInterface.d.ts +26 -0
- package/dist/interfaces/roleInterface.js +2 -0
- package/dist/interfaces/rulesRegulationInterface.d.ts +10 -0
- package/dist/interfaces/rulesRegulationInterface.js +2 -0
- package/dist/interfaces/schoolFeeCollectionInterface.d.ts +13 -0
- package/dist/interfaces/schoolFeeCollectionInterface.js +2 -0
- package/dist/interfaces/schoolFeeInterface.d.ts +21 -0
- package/dist/interfaces/schoolFeeInterface.js +2 -0
- package/dist/interfaces/schoolOfferInterface.d.ts +20 -0
- package/dist/interfaces/schoolOfferInterface.js +2 -0
- package/dist/interfaces/sendNotificationInerface.d.ts +20 -0
- package/dist/interfaces/sendNotificationInerface.js +2 -0
- package/dist/interfaces/slotInterface.d.ts +8 -0
- package/dist/interfaces/slotInterface.js +2 -0
- package/dist/interfaces/stateInterface.d.ts +11 -0
- package/dist/interfaces/stateInterface.js +2 -0
- package/dist/interfaces/subCategoriesInterface.d.ts +9 -0
- package/dist/interfaces/subCategoriesInterface.js +2 -0
- package/dist/interfaces/subjectHasFeeInterface.d.ts +7 -0
- package/dist/interfaces/subjectHasFeeInterface.js +2 -0
- package/dist/interfaces/subjectHasPayFeeHistoryInterface.d.ts +9 -0
- package/dist/interfaces/subjectHasPayFeeHistoryInterface.js +2 -0
- package/dist/interfaces/subjectIndexInterface.d.ts +48 -0
- package/dist/interfaces/subjectIndexInterface.js +2 -0
- package/dist/interfaces/subscriptionPlanInterface.d.ts +29 -0
- package/dist/interfaces/subscriptionPlanInterface.js +2 -0
- package/dist/interfaces/syllabusInterface.d.ts +9 -0
- package/dist/interfaces/syllabusInterface.js +2 -0
- package/dist/interfaces/taskManagementInterface.d.ts +24 -0
- package/dist/interfaces/taskManagementInterface.js +2 -0
- package/dist/interfaces/testimonialInterface.d.ts +12 -0
- package/dist/interfaces/testimonialInterface.js +2 -0
- package/dist/interfaces/toDoInterface.d.ts +11 -0
- package/dist/interfaces/toDoInterface.js +2 -0
- package/dist/interfaces/tokenInterface.d.ts +27 -0
- package/dist/interfaces/tokenInterface.js +2 -0
- package/dist/interfaces/tripInterface.d.ts +13 -0
- package/dist/interfaces/tripInterface.js +2 -0
- package/dist/interfaces/typeManagementInterface.d.ts +11 -0
- package/dist/interfaces/typeManagementInterface.js +2 -0
- package/dist/interfaces/uniqueNumberCounterInterface.d.ts +11 -0
- package/dist/interfaces/uniqueNumberCounterInterface.js +2 -0
- package/dist/interfaces/userBookAssessmentInterface.d.ts +10 -0
- package/dist/interfaces/userBookAssessmentInterface.js +2 -0
- package/dist/interfaces/userDetailsInterface.d.ts +122 -0
- package/dist/interfaces/userDetailsInterface.js +2 -0
- package/dist/interfaces/userFeeTypeByAccountInterface.d.ts +19 -0
- package/dist/interfaces/userFeeTypeByAccountInterface.js +2 -0
- package/dist/interfaces/userFeeTypeInterface.d.ts +16 -0
- package/dist/interfaces/userFeeTypeInterface.js +2 -0
- package/dist/interfaces/userHasAnnouncementInterface.d.ts +9 -0
- package/dist/interfaces/userHasAnnouncementInterface.js +2 -0
- package/dist/interfaces/userHasBatchInterface.d.ts +7 -0
- package/dist/interfaces/userHasBatchInterface.js +2 -0
- package/dist/interfaces/userHasCourseInterface.d.ts +13 -0
- package/dist/interfaces/userHasCourseInterface.js +2 -0
- package/dist/interfaces/userHasDeviceInterface.d.ts +10 -0
- package/dist/interfaces/userHasDeviceInterface.js +2 -0
- package/dist/interfaces/userHasFeeTermsInterface.d.ts +37 -0
- package/dist/interfaces/userHasFeeTermsInterface.js +2 -0
- package/dist/interfaces/userHasFileInterface.d.ts +11 -0
- package/dist/interfaces/userHasFileInterface.js +2 -0
- package/dist/interfaces/userHasHomeWorkInterface.d.ts +11 -0
- package/dist/interfaces/userHasHomeWorkInterface.js +2 -0
- package/dist/interfaces/userHasInventoryHistoryInterface.d.ts +20 -0
- package/dist/interfaces/userHasInventoryHistoryInterface.js +2 -0
- package/dist/interfaces/userHasInventoryInterface.d.ts +21 -0
- package/dist/interfaces/userHasInventoryInterface.js +2 -0
- package/dist/interfaces/userHasLeaveHistoryInterface.d.ts +16 -0
- package/dist/interfaces/userHasLeaveHistoryInterface.js +2 -0
- package/dist/interfaces/userHasLeaveInterface.d.ts +12 -0
- package/dist/interfaces/userHasLeaveInterface.js +2 -0
- package/dist/interfaces/userHasOffer.d.ts +10 -0
- package/dist/interfaces/userHasOffer.js +2 -0
- package/dist/interfaces/userHasParentInterface.d.ts +14 -0
- package/dist/interfaces/userHasParentInterface.js +2 -0
- package/dist/interfaces/userHasRoleInterface.d.ts +13 -0
- package/dist/interfaces/userHasRoleInterface.js +2 -0
- package/dist/interfaces/userHasRollNumberInterface.d.ts +8 -0
- package/dist/interfaces/userHasRollNumberInterface.js +2 -0
- package/dist/interfaces/userHasStorageInterface.d.ts +11 -0
- package/dist/interfaces/userHasStorageInterface.js +2 -0
- package/dist/interfaces/userHasSubjectFeeInterface.d.ts +9 -0
- package/dist/interfaces/userHasSubjectFeeInterface.js +2 -0
- package/dist/interfaces/userInstituteMetaInterface.d.ts +39 -0
- package/dist/interfaces/userInstituteMetaInterface.js +2 -0
- package/dist/interfaces/userInterface.d.ts +44 -0
- package/dist/interfaces/userInterface.js +2 -0
- package/dist/interfaces/userLeaveRequestInterface.d.ts +15 -0
- package/dist/interfaces/userLeaveRequestInterface.js +2 -0
- package/dist/interfaces/userMetaInterface.d.ts +13 -0
- package/dist/interfaces/userMetaInterface.js +2 -0
- package/dist/interfaces/userPayoutDetailsInterface.d.ts +14 -0
- package/dist/interfaces/userPayoutDetailsInterface.js +2 -0
- package/dist/interfaces/userPayoutHistoryInterface.d.ts +18 -0
- package/dist/interfaces/userPayoutHistoryInterface.js +2 -0
- package/dist/interfaces/userPayoutInterface.d.ts +12 -0
- package/dist/interfaces/userPayoutInterface.js +2 -0
- package/dist/interfaces/userProjectAssessmentOptionInterface.d.ts +10 -0
- package/dist/interfaces/userProjectAssessmentOptionInterface.js +2 -0
- package/dist/interfaces/userRequiredStepsInterface.d.ts +9 -0
- package/dist/interfaces/userRequiredStepsInterface.js +2 -0
- package/dist/interfaces/userSchoolMetaInterface.d.ts +115 -0
- package/dist/interfaces/userSchoolMetaInterface.js +2 -0
- package/dist/interfaces/vehicleInterface.d.ts +11 -0
- package/dist/interfaces/vehicleInterface.js +2 -0
- package/dist/interfaces/vendorManagementInterface.d.ts +19 -0
- package/dist/interfaces/vendorManagementInterface.js +2 -0
- package/dist/interfaces/videoAnalystInterface.d.ts +37 -0
- package/dist/interfaces/videoAnalystInterface.js +2 -0
- package/dist/interfaces/walletHistoryInterface.d.ts +15 -0
- package/dist/interfaces/walletHistoryInterface.js +2 -0
- package/dist/interfaces/walletInterface.d.ts +10 -0
- package/dist/interfaces/walletInterface.js +2 -0
- package/dist/interfaces/walletTransactionInterface.d.ts +34 -0
- package/dist/interfaces/walletTransactionInterface.js +2 -0
- package/dist/interfaces/workingDayInterface.d.ts +11 -0
- package/dist/interfaces/workingDayInterface.js +2 -0
- package/dist/interfaces/workingShiftInterface.d.ts +12 -0
- package/dist/interfaces/workingShiftInterface.js +2 -0
- package/dist/models/mongodb/approvalRequestModel.d.ts +4 -0
- package/dist/models/mongodb/approvalRequestModel.js +96 -0
- package/dist/models/mongodb/attendanceModel.d.ts +4 -0
- package/dist/models/mongodb/attendanceModel.js +178 -0
- package/dist/models/mongodb/blogModel.d.ts +4 -0
- package/dist/models/mongodb/blogModel.js +91 -0
- package/dist/models/mongodb/careerModel.d.ts +4 -0
- package/dist/models/mongodb/careerModel.js +83 -0
- package/dist/models/mongodb/certificatesHistoryModel.d.ts +4 -0
- package/dist/models/mongodb/certificatesHistoryModel.js +58 -0
- package/dist/models/mongodb/certificatesManagementModel.d.ts +4 -0
- package/dist/models/mongodb/certificatesManagementModel.js +67 -0
- package/dist/models/mongodb/columnModel.d.ts +4 -0
- package/dist/models/mongodb/columnModel.js +75 -0
- package/dist/models/mongodb/dailyBookModel.d.ts +4 -0
- package/dist/models/mongodb/dailyBookModel.js +88 -0
- package/dist/models/mongodb/dashboardManagementModel.d.ts +4 -0
- package/dist/models/mongodb/dashboardManagementModel.js +111 -0
- package/dist/models/mongodb/eventModel.d.ts +4 -0
- package/dist/models/mongodb/eventModel.js +164 -0
- package/dist/models/mongodb/examGroupModel.d.ts +4 -0
- package/dist/models/mongodb/examGroupModel.js +293 -0
- package/dist/models/mongodb/examHasAnswerSheetModel.d.ts +4 -0
- package/dist/models/mongodb/examHasAnswerSheetModel.js +133 -0
- package/dist/models/mongodb/examModel.d.ts +4 -0
- package/dist/models/mongodb/examModel.js +267 -0
- package/dist/models/mongodb/feeReminderTypeModel.d.ts +4 -0
- package/dist/models/mongodb/feeReminderTypeModel.js +73 -0
- package/dist/models/mongodb/feedBackModel.d.ts +4 -0
- package/dist/models/mongodb/feedBackModel.js +111 -0
- package/dist/models/mongodb/generateIdCardModel.d.ts +4 -0
- package/dist/models/mongodb/generateIdCardModel.js +55 -0
- package/dist/models/mongodb/holidayModel.d.ts +4 -0
- package/dist/models/mongodb/holidayModel.js +172 -0
- package/dist/models/mongodb/index.d.ts +2 -0
- package/dist/models/mongodb/index.js +24 -0
- package/dist/models/mongodb/informationSupportModel.d.ts +4 -0
- package/dist/models/mongodb/informationSupportModel.js +96 -0
- package/dist/models/mongodb/inquiryModel.d.ts +4 -0
- package/dist/models/mongodb/inquiryModel.js +186 -0
- package/dist/models/mongodb/invoiceModel.d.ts +4 -0
- package/dist/models/mongodb/invoiceModel.js +134 -0
- package/dist/models/mongodb/jobApplyModel.d.ts +4 -0
- package/dist/models/mongodb/jobApplyModel.js +151 -0
- package/dist/models/mongodb/photosGalleryModel.d.ts +4 -0
- package/dist/models/mongodb/photosGalleryModel.js +86 -0
- package/dist/models/mongodb/plannerModel.d.ts +4 -0
- package/dist/models/mongodb/plannerModel.js +174 -0
- package/dist/models/mongodb/plugin/addDefaultAttributesPlugin.d.ts +2 -0
- package/dist/models/mongodb/plugin/addDefaultAttributesPlugin.js +63 -0
- package/dist/models/mongodb/plugin/transformIdInQueryPlugin.d.ts +3 -0
- package/dist/models/mongodb/plugin/transformIdInQueryPlugin.js +61 -0
- package/dist/models/mongodb/plugin/transformIdInResponsePlugin.d.ts +3 -0
- package/dist/models/mongodb/plugin/transformIdInResponsePlugin.js +65 -0
- package/dist/models/mongodb/replaceTeacherModel.d.ts +4 -0
- package/dist/models/mongodb/replaceTeacherModel.js +110 -0
- package/dist/models/mongodb/schoolFeeModel.d.ts +4 -0
- package/dist/models/mongodb/schoolFeeModel.js +178 -0
- package/dist/models/mongodb/subjectIndexModel.d.ts +4 -0
- package/dist/models/mongodb/subjectIndexModel.js +667 -0
- package/dist/models/mongodb/subscriptionPlanModel.d.ts +4 -0
- package/dist/models/mongodb/subscriptionPlanModel.js +133 -0
- package/dist/models/mongodb/taskManagementModel.d.ts +4 -0
- package/dist/models/mongodb/taskManagementModel.js +167 -0
- package/dist/models/mongodb/uniqueNumberCounterModel.d.ts +4 -0
- package/dist/models/mongodb/uniqueNumberCounterModel.js +83 -0
- package/dist/models/mongodb/userDetailsModel.d.ts +5 -0
- package/dist/models/mongodb/userDetailsModel.js +509 -0
- package/dist/models/mongodb/userDoc.d.ts +10 -0
- package/dist/models/mongodb/userDoc.js +9 -0
- package/dist/models/mongodb/userInstituteMetaModel.d.ts +4 -0
- package/dist/models/mongodb/userInstituteMetaModel.js +212 -0
- package/dist/models/mongodb/userSchoolMetaModel.d.ts +7 -0
- package/dist/models/mongodb/userSchoolMetaModel.js +552 -0
- package/dist/models/mongodb/videoAnalystModel.d.ts +4 -0
- package/dist/models/mongodb/videoAnalystModel.js +80 -0
- package/dist/models/mongodb/walletTransactionModel.d.ts +4 -0
- package/dist/models/mongodb/walletTransactionModel.js +163 -0
- package/dist/models/psql/SubCategoriesModel.d.ts +17 -0
- package/dist/models/psql/SubCategoriesModel.js +102 -0
- package/dist/models/psql/academicCalendarModel.d.ts +18 -0
- package/dist/models/psql/academicCalendarModel.js +94 -0
- package/dist/models/psql/accountHasReceiptDetailsModel.d.ts +26 -0
- package/dist/models/psql/accountHasReceiptDetailsModel.js +145 -0
- package/dist/models/psql/announcementModel.d.ts +28 -0
- package/dist/models/psql/announcementModel.js +198 -0
- package/dist/models/psql/areaModel.d.ts +9 -0
- package/dist/models/psql/areaModel.js +40 -0
- package/dist/models/psql/bankAccountDetailsModel.d.ts +23 -0
- package/dist/models/psql/bankAccountDetailsModel.js +100 -0
- package/dist/models/psql/bannerModel.d.ts +24 -0
- package/dist/models/psql/bannerModel.js +116 -0
- package/dist/models/psql/batchModel.d.ts +27 -0
- package/dist/models/psql/batchModel.js +222 -0
- package/dist/models/psql/batchSubjectBookAssessmentModel.d.ts +18 -0
- package/dist/models/psql/batchSubjectBookAssessmentModel.js +156 -0
- package/dist/models/psql/batchSubjectProjectAssessmentModel.d.ts +21 -0
- package/dist/models/psql/batchSubjectProjectAssessmentModel.js +154 -0
- package/dist/models/psql/bookAssessmentDateModel.d.ts +17 -0
- package/dist/models/psql/bookAssessmentDateModel.js +87 -0
- package/dist/models/psql/categoriesModel.d.ts +17 -0
- package/dist/models/psql/categoriesModel.js +80 -0
- package/dist/models/psql/cityModel.d.ts +13 -0
- package/dist/models/psql/cityModel.js +72 -0
- package/dist/models/psql/classRoomModel.d.ts +22 -0
- package/dist/models/psql/classRoomModel.js +126 -0
- package/dist/models/psql/cloudStorageModel.d.ts +24 -0
- package/dist/models/psql/cloudStorageModel.js +97 -0
- package/dist/models/psql/coinPurchaseOfferModel.d.ts +25 -0
- package/dist/models/psql/coinPurchaseOfferModel.js +103 -0
- package/dist/models/psql/contactFeedBackModel.d.ts +22 -0
- package/dist/models/psql/contactFeedBackModel.js +120 -0
- package/dist/models/psql/countryModel.d.ts +14 -0
- package/dist/models/psql/countryModel.js +43 -0
- package/dist/models/psql/courseHasVisitorsModel.d.ts +16 -0
- package/dist/models/psql/courseHasVisitorsModel.js +71 -0
- package/dist/models/psql/courseModel.d.ts +27 -0
- package/dist/models/psql/courseModel.js +136 -0
- package/dist/models/psql/driverModel.d.ts +30 -0
- package/dist/models/psql/driverModel.js +163 -0
- package/dist/models/psql/entityGroupModel.d.ts +21 -0
- package/dist/models/psql/entityGroupModel.js +100 -0
- package/dist/models/psql/facilityModel.d.ts +18 -0
- package/dist/models/psql/facilityModel.js +120 -0
- package/dist/models/psql/featureActionModel.d.ts +22 -0
- package/dist/models/psql/featureActionModel.js +95 -0
- package/dist/models/psql/feeHistoryDetailsModel.d.ts +26 -0
- package/dist/models/psql/feeHistoryDetailsModel.js +186 -0
- package/dist/models/psql/feeHistoryModel.d.ts +30 -0
- package/dist/models/psql/feeHistoryModel.js +334 -0
- package/dist/models/psql/feeReminderModel.d.ts +22 -0
- package/dist/models/psql/feeReminderModel.js +239 -0
- package/dist/models/psql/feeReminderSettingModel.d.ts +19 -0
- package/dist/models/psql/feeReminderSettingModel.js +90 -0
- package/dist/models/psql/feeTypeHasTermsModel.d.ts +21 -0
- package/dist/models/psql/feeTypeHasTermsModel.js +102 -0
- package/dist/models/psql/feeTypeModel.d.ts +22 -0
- package/dist/models/psql/feeTypeModel.js +125 -0
- package/dist/models/psql/feesCollectionModel.d.ts +28 -0
- package/dist/models/psql/feesCollectionModel.js +232 -0
- package/dist/models/psql/fileStorageModel.d.ts +6 -0
- package/dist/models/psql/fileStorageModel.js +86 -0
- package/dist/models/psql/floorManagementModel.d.ts +18 -0
- package/dist/models/psql/floorManagementModel.js +90 -0
- package/dist/models/psql/greetingsModel.d.ts +21 -0
- package/dist/models/psql/greetingsModel.js +118 -0
- package/dist/models/psql/homeWorkModel.d.ts +22 -0
- package/dist/models/psql/homeWorkModel.js +128 -0
- package/dist/models/psql/index.d.ts +4 -0
- package/dist/models/psql/index.js +121 -0
- package/dist/models/psql/instituteEntityModel.d.ts +25 -0
- package/dist/models/psql/instituteEntityModel.js +131 -0
- package/dist/models/psql/instituteEntityTypeModel.d.ts +19 -0
- package/dist/models/psql/instituteEntityTypeModel.js +74 -0
- package/dist/models/psql/instituteModel.d.ts +44 -0
- package/dist/models/psql/instituteModel.js +240 -0
- package/dist/models/psql/instituteSubscriptionPlanModel.d.ts +33 -0
- package/dist/models/psql/instituteSubscriptionPlanModel.js +186 -0
- package/dist/models/psql/inventoryHistoryModel.d.ts +26 -0
- package/dist/models/psql/inventoryHistoryModel.js +159 -0
- package/dist/models/psql/inventoryModel.d.ts +24 -0
- package/dist/models/psql/inventoryModel.js +132 -0
- package/dist/models/psql/lectureHistoryModel.d.ts +32 -0
- package/dist/models/psql/lectureHistoryModel.js +223 -0
- package/dist/models/psql/lectureModel.d.ts +34 -0
- package/dist/models/psql/lectureModel.js +485 -0
- package/dist/models/psql/masterLeaveModel.d.ts +22 -0
- package/dist/models/psql/masterLeaveModel.js +132 -0
- package/dist/models/psql/moduleFeatureModel.d.ts +21 -0
- package/dist/models/psql/moduleFeatureModel.js +98 -0
- package/dist/models/psql/moduleModel.d.ts +20 -0
- package/dist/models/psql/moduleModel.js +101 -0
- package/dist/models/psql/offerModel.d.ts +27 -0
- package/dist/models/psql/offerModel.js +144 -0
- package/dist/models/psql/paymentTermsModel.d.ts +17 -0
- package/dist/models/psql/paymentTermsModel.js +114 -0
- package/dist/models/psql/pdcChequeModel.d.ts +25 -0
- package/dist/models/psql/pdcChequeModel.js +138 -0
- package/dist/models/psql/pdcHistoryModel.d.ts +26 -0
- package/dist/models/psql/pdcHistoryModel.js +152 -0
- package/dist/models/psql/pincodeModel.d.ts +23 -0
- package/dist/models/psql/pincodeModel.js +79 -0
- package/dist/models/psql/productModel.d.ts +19 -0
- package/dist/models/psql/productModel.js +124 -0
- package/dist/models/psql/projectAssessmentOptionModel.d.ts +17 -0
- package/dist/models/psql/projectAssessmentOptionModel.js +90 -0
- package/dist/models/psql/roleModel.d.ts +22 -0
- package/dist/models/psql/roleModel.js +97 -0
- package/dist/models/psql/rulesRegulationModel.d.ts +19 -0
- package/dist/models/psql/rulesRegulationModel.js +72 -0
- package/dist/models/psql/schoolFeeCollectionModel.d.ts +22 -0
- package/dist/models/psql/schoolFeeCollectionModel.js +156 -0
- package/dist/models/psql/schoolOfferModel.d.ts +29 -0
- package/dist/models/psql/schoolOfferModel.js +167 -0
- package/dist/models/psql/sendNotificationModel.d.ts +22 -0
- package/dist/models/psql/sendNotificationModel.js +117 -0
- package/dist/models/psql/slotModel.d.ts +17 -0
- package/dist/models/psql/slotModel.js +99 -0
- package/dist/models/psql/stateModel.d.ts +13 -0
- package/dist/models/psql/stateModel.js +58 -0
- package/dist/models/psql/subjectHasFeeModel.d.ts +16 -0
- package/dist/models/psql/subjectHasFeeModel.js +78 -0
- package/dist/models/psql/subjectHasPayFeeHistoryModel.d.ts +18 -0
- package/dist/models/psql/subjectHasPayFeeHistoryModel.js +109 -0
- package/dist/models/psql/syllabusModel.d.ts +18 -0
- package/dist/models/psql/syllabusModel.js +125 -0
- package/dist/models/psql/testimonialModel.d.ts +21 -0
- package/dist/models/psql/testimonialModel.js +162 -0
- package/dist/models/psql/toDoModel.d.ts +20 -0
- package/dist/models/psql/toDoModel.js +116 -0
- package/dist/models/psql/tokenModel.d.ts +15 -0
- package/dist/models/psql/tokenModel.js +37 -0
- package/dist/models/psql/tripModel.d.ts +22 -0
- package/dist/models/psql/tripModel.js +114 -0
- package/dist/models/psql/typeManagementModel.d.ts +20 -0
- package/dist/models/psql/typeManagementModel.js +122 -0
- package/dist/models/psql/userBookAssessmentModel.d.ts +19 -0
- package/dist/models/psql/userBookAssessmentModel.js +141 -0
- package/dist/models/psql/userFeeTypeByAccountModel.d.ts +22 -0
- package/dist/models/psql/userFeeTypeByAccountModel.js +184 -0
- package/dist/models/psql/userFeeTypeModel.d.ts +25 -0
- package/dist/models/psql/userFeeTypeModel.js +172 -0
- package/dist/models/psql/userHasAnnouncementModel.d.ts +18 -0
- package/dist/models/psql/userHasAnnouncementModel.js +108 -0
- package/dist/models/psql/userHasBatchModel.d.ts +16 -0
- package/dist/models/psql/userHasBatchModel.js +92 -0
- package/dist/models/psql/userHasCourseModel.d.ts +22 -0
- package/dist/models/psql/userHasCourseModel.js +116 -0
- package/dist/models/psql/userHasDeviceModel.d.ts +19 -0
- package/dist/models/psql/userHasDeviceModel.js +91 -0
- package/dist/models/psql/userHasFeeTermsModel.d.ts +27 -0
- package/dist/models/psql/userHasFeeTermsModel.js +202 -0
- package/dist/models/psql/userHasFileModel.d.ts +16 -0
- package/dist/models/psql/userHasFileModel.js +107 -0
- package/dist/models/psql/userHasHomeWorkModel.d.ts +19 -0
- package/dist/models/psql/userHasHomeWorkModel.js +119 -0
- package/dist/models/psql/userHasInventoryHistoryModel.d.ts +29 -0
- package/dist/models/psql/userHasInventoryHistoryModel.js +146 -0
- package/dist/models/psql/userHasInventoryModel.d.ts +30 -0
- package/dist/models/psql/userHasInventoryModel.js +148 -0
- package/dist/models/psql/userHasLeaveHistoryModel.d.ts +25 -0
- package/dist/models/psql/userHasLeaveHistoryModel.js +106 -0
- package/dist/models/psql/userHasLeaveModel.d.ts +21 -0
- package/dist/models/psql/userHasLeaveModel.js +121 -0
- package/dist/models/psql/userHasOfferModel.d.ts +19 -0
- package/dist/models/psql/userHasOfferModel.js +154 -0
- package/dist/models/psql/userHasParentModel.d.ts +23 -0
- package/dist/models/psql/userHasParentModel.js +135 -0
- package/dist/models/psql/userHasRoleModel.d.ts +18 -0
- package/dist/models/psql/userHasRoleModel.js +97 -0
- package/dist/models/psql/userHasRollNumberModel.d.ts +17 -0
- package/dist/models/psql/userHasRollNumberModel.js +90 -0
- package/dist/models/psql/userHasStorageModel.d.ts +20 -0
- package/dist/models/psql/userHasStorageModel.js +86 -0
- package/dist/models/psql/userHasSubjectFeeModel.d.ts +18 -0
- package/dist/models/psql/userHasSubjectFeeModel.js +86 -0
- package/dist/models/psql/userLeaveRequestModel.d.ts +24 -0
- package/dist/models/psql/userLeaveRequestModel.js +104 -0
- package/dist/models/psql/userModel.d.ts +55 -0
- package/dist/models/psql/userModel.js +392 -0
- package/dist/models/psql/userPayoutDetailsModel.d.ts +21 -0
- package/dist/models/psql/userPayoutDetailsModel.js +162 -0
- package/dist/models/psql/userPayoutHistoryModel.d.ts +27 -0
- package/dist/models/psql/userPayoutHistoryModel.js +155 -0
- package/dist/models/psql/userPayoutModel.d.ts +20 -0
- package/dist/models/psql/userPayoutModel.js +316 -0
- package/dist/models/psql/userProjectAssessmentOptionModel.d.ts +19 -0
- package/dist/models/psql/userProjectAssessmentOptionModel.js +126 -0
- package/dist/models/psql/userRequiredStepsModel.d.ts +17 -0
- package/dist/models/psql/userRequiredStepsModel.js +78 -0
- package/dist/models/psql/vehicleModel.d.ts +20 -0
- package/dist/models/psql/vehicleModel.js +110 -0
- package/dist/models/psql/vendorManagementModel.d.ts +28 -0
- package/dist/models/psql/vendorManagementModel.js +179 -0
- package/dist/models/psql/walletHistoryModel.d.ts +24 -0
- package/dist/models/psql/walletHistoryModel.js +103 -0
- package/dist/models/psql/walletModel.d.ts +19 -0
- package/dist/models/psql/walletModel.js +93 -0
- package/dist/models/psql/workingDayModel.d.ts +20 -0
- package/dist/models/psql/workingDayModel.js +79 -0
- package/dist/models/psql/workingShiftModel.d.ts +21 -0
- package/dist/models/psql/workingShiftModel.js +92 -0
- package/dist/services/Concrete/mongooseCommonService.d.ts +36 -0
- package/dist/services/Concrete/mongooseCommonService.js +108 -0
- package/dist/services/Concrete/sequelizeCommanService.d.ts +17 -0
- package/dist/services/Concrete/sequelizeCommanService.js +123 -0
- package/dist/services/Contracts/IMongooseCommonService.d.ts +35 -0
- package/dist/services/Contracts/IMongooseCommonService.js +2 -0
- package/dist/services/Contracts/ISequelizeCommonService.d.ts +20 -0
- package/dist/services/Contracts/ISequelizeCommonService.js +2 -0
- package/dist/types/academicCalendarType.d.ts +6 -0
- package/dist/types/academicCalendarType.js +2 -0
- package/dist/types/accountHasReceiptDetailsType.d.ts +7 -0
- package/dist/types/accountHasReceiptDetailsType.js +2 -0
- package/dist/types/announcementType.d.ts +6 -0
- package/dist/types/announcementType.js +2 -0
- package/dist/types/approveRequestType.d.ts +2 -0
- package/dist/types/approveRequestType.js +2 -0
- package/dist/types/areaType.d.ts +3 -0
- package/dist/types/areaType.js +2 -0
- package/dist/types/attendanceType.d.ts +2 -0
- package/dist/types/attendanceType.js +2 -0
- package/dist/types/bankAccountDetailsType.d.ts +3 -0
- package/dist/types/bankAccountDetailsType.js +2 -0
- package/dist/types/bannerType.d.ts +7 -0
- package/dist/types/bannerType.js +2 -0
- package/dist/types/batchSubjectBookAssessmentType.d.ts +7 -0
- package/dist/types/batchSubjectBookAssessmentType.js +2 -0
- package/dist/types/batchSubjectProjectAssessmentType.d.ts +7 -0
- package/dist/types/batchSubjectProjectAssessmentType.js +2 -0
- package/dist/types/batchType.d.ts +7 -0
- package/dist/types/batchType.js +2 -0
- package/dist/types/blogType.d.ts +2 -0
- package/dist/types/blogType.js +2 -0
- package/dist/types/bookAssessmentDateType.d.ts +7 -0
- package/dist/types/bookAssessmentDateType.js +2 -0
- package/dist/types/careerType.d.ts +2 -0
- package/dist/types/careerType.js +2 -0
- package/dist/types/categoriesType.d.ts +3 -0
- package/dist/types/categoriesType.js +2 -0
- package/dist/types/certificatesHistoryType.d.ts +2 -0
- package/dist/types/certificatesHistoryType.js +2 -0
- package/dist/types/certificatesManagementType.d.ts +2 -0
- package/dist/types/certificatesManagementType.js +2 -0
- package/dist/types/classRoomType.d.ts +3 -0
- package/dist/types/classRoomType.js +2 -0
- package/dist/types/cloudStorageType.d.ts +3 -0
- package/dist/types/cloudStorageType.js +2 -0
- package/dist/types/coinPurchaseOfferType.d.ts +3 -0
- package/dist/types/coinPurchaseOfferType.js +2 -0
- package/dist/types/commonType.d.ts +9 -0
- package/dist/types/commonType.js +2 -0
- package/dist/types/contactFeedBackType.d.ts +3 -0
- package/dist/types/contactFeedBackType.js +2 -0
- package/dist/types/courseHasVisitorsType.d.ts +2 -0
- package/dist/types/courseHasVisitorsType.js +2 -0
- package/dist/types/courseType.d.ts +2 -0
- package/dist/types/courseType.js +2 -0
- package/dist/types/dailyBookType.d.ts +2 -0
- package/dist/types/dailyBookType.js +2 -0
- package/dist/types/dashboardManagementType.d.ts +2 -0
- package/dist/types/dashboardManagementType.js +2 -0
- package/dist/types/driverType.d.ts +6 -0
- package/dist/types/driverType.js +2 -0
- package/dist/types/entityGroupType.d.ts +3 -0
- package/dist/types/entityGroupType.js +2 -0
- package/dist/types/eventType.d.ts +2 -0
- package/dist/types/eventType.js +2 -0
- package/dist/types/examGroupType.d.ts +6 -0
- package/dist/types/examGroupType.js +2 -0
- package/dist/types/examHasAnswerSheetType.d.ts +2 -0
- package/dist/types/examHasAnswerSheetType.js +2 -0
- package/dist/types/examType.d.ts +6 -0
- package/dist/types/examType.js +2 -0
- package/dist/types/facilityType.d.ts +3 -0
- package/dist/types/facilityType.js +2 -0
- package/dist/types/featureActionType.d.ts +3 -0
- package/dist/types/featureActionType.js +2 -0
- package/dist/types/feeHistoryDetailsType.d.ts +6 -0
- package/dist/types/feeHistoryDetailsType.js +2 -0
- package/dist/types/feeHistoryType.d.ts +18 -0
- package/dist/types/feeHistoryType.js +2 -0
- package/dist/types/feeReminderSettingType.d.ts +3 -0
- package/dist/types/feeReminderSettingType.js +2 -0
- package/dist/types/feeReminderType.d.ts +3 -0
- package/dist/types/feeReminderType.js +2 -0
- package/dist/types/feeReminderTypeType.d.ts +2 -0
- package/dist/types/feeReminderTypeType.js +2 -0
- package/dist/types/feeTypeHasTermsType.d.ts +3 -0
- package/dist/types/feeTypeHasTermsType.js +2 -0
- package/dist/types/feeTypeType.d.ts +3 -0
- package/dist/types/feeTypeType.js +2 -0
- package/dist/types/feedBackType.d.ts +2 -0
- package/dist/types/feedBackType.js +2 -0
- package/dist/types/feesCollectionType.d.ts +3 -0
- package/dist/types/feesCollectionType.js +2 -0
- package/dist/types/fileStorageType.d.ts +3 -0
- package/dist/types/fileStorageType.js +2 -0
- package/dist/types/floormanagementType.d.ts +3 -0
- package/dist/types/floormanagementType.js +2 -0
- package/dist/types/generateIdCardType.d.ts +2 -0
- package/dist/types/generateIdCardType.js +2 -0
- package/dist/types/greetingsType.d.ts +6 -0
- package/dist/types/greetingsType.js +2 -0
- package/dist/types/holidayType.d.ts +2 -0
- package/dist/types/holidayType.js +3 -0
- package/dist/types/homeWorkType.d.ts +3 -0
- package/dist/types/homeWorkType.js +2 -0
- package/dist/types/informationSupportType.d.ts +2 -0
- package/dist/types/informationSupportType.js +2 -0
- package/dist/types/inquiryType.d.ts +2 -0
- package/dist/types/inquiryType.js +2 -0
- package/dist/types/instituteEntityType.d.ts +6 -0
- package/dist/types/instituteEntityType.js +2 -0
- package/dist/types/instituteEntityTypeType.d.ts +3 -0
- package/dist/types/instituteEntityTypeType.js +2 -0
- package/dist/types/instituteSubscriptionPlanType.d.ts +3 -0
- package/dist/types/instituteSubscriptionPlanType.js +2 -0
- package/dist/types/instituteType.d.ts +3 -0
- package/dist/types/instituteType.js +2 -0
- package/dist/types/inventoryHistoryType.d.ts +3 -0
- package/dist/types/inventoryHistoryType.js +2 -0
- package/dist/types/inventoryType.d.ts +3 -0
- package/dist/types/inventoryType.js +2 -0
- package/dist/types/jobApply.d.ts +2 -0
- package/dist/types/jobApply.js +2 -0
- package/dist/types/lectureHistoryType.d.ts +6 -0
- package/dist/types/lectureHistoryType.js +2 -0
- package/dist/types/lectureType.d.ts +6 -0
- package/dist/types/lectureType.js +2 -0
- package/dist/types/masterLeaveType.d.ts +3 -0
- package/dist/types/masterLeaveType.js +2 -0
- package/dist/types/moduleFeatureType.d.ts +3 -0
- package/dist/types/moduleFeatureType.js +2 -0
- package/dist/types/moduleType.d.ts +3 -0
- package/dist/types/moduleType.js +2 -0
- package/dist/types/offerType.d.ts +3 -0
- package/dist/types/offerType.js +2 -0
- package/dist/types/paymentTermsType.d.ts +3 -0
- package/dist/types/paymentTermsType.js +3 -0
- package/dist/types/pdcChequeType.d.ts +6 -0
- package/dist/types/pdcChequeType.js +2 -0
- package/dist/types/pdcHistoryType.d.ts +2 -0
- package/dist/types/pdcHistoryType.js +2 -0
- package/dist/types/photosGalleryType.d.ts +2 -0
- package/dist/types/photosGalleryType.js +2 -0
- package/dist/types/plannerType.d.ts +7 -0
- package/dist/types/plannerType.js +2 -0
- package/dist/types/productType.d.ts +3 -0
- package/dist/types/productType.js +2 -0
- package/dist/types/projectAssessmentOptionType.d.ts +7 -0
- package/dist/types/projectAssessmentOptionType.js +2 -0
- package/dist/types/roleType.d.ts +11 -0
- package/dist/types/roleType.js +2 -0
- package/dist/types/rulesRegulationType.d.ts +3 -0
- package/dist/types/rulesRegulationType.js +2 -0
- package/dist/types/schoolFeeCollectionType.d.ts +3 -0
- package/dist/types/schoolFeeCollectionType.js +2 -0
- package/dist/types/schoolFeeType.d.ts +3 -0
- package/dist/types/schoolFeeType.js +2 -0
- package/dist/types/schoolOfferType.d.ts +3 -0
- package/dist/types/schoolOfferType.js +2 -0
- package/dist/types/sendNotificationType.d.ts +3 -0
- package/dist/types/sendNotificationType.js +2 -0
- package/dist/types/slotType.d.ts +2 -0
- package/dist/types/slotType.js +2 -0
- package/dist/types/subCategoryType.d.ts +3 -0
- package/dist/types/subCategoryType.js +2 -0
- package/dist/types/subjectHasFeeType.d.ts +3 -0
- package/dist/types/subjectHasFeeType.js +2 -0
- package/dist/types/subjectHasPayFeeHistoryType.d.ts +3 -0
- package/dist/types/subjectHasPayFeeHistoryType.js +2 -0
- package/dist/types/subjectIndexType.d.ts +7 -0
- package/dist/types/subjectIndexType.js +2 -0
- package/dist/types/subscriptionPlanType.d.ts +2 -0
- package/dist/types/subscriptionPlanType.js +2 -0
- package/dist/types/syllabusType.d.ts +7 -0
- package/dist/types/syllabusType.js +2 -0
- package/dist/types/taskManagementType.d.ts +2 -0
- package/dist/types/taskManagementType.js +2 -0
- package/dist/types/testimonialType.d.ts +13 -0
- package/dist/types/testimonialType.js +2 -0
- package/dist/types/toDoType.d.ts +6 -0
- package/dist/types/toDoType.js +2 -0
- package/dist/types/tripType.d.ts +2 -0
- package/dist/types/tripType.js +2 -0
- package/dist/types/typeManagementType.d.ts +3 -0
- package/dist/types/typeManagementType.js +2 -0
- package/dist/types/uniqueNumberCounterType.d.ts +2 -0
- package/dist/types/uniqueNumberCounterType.js +2 -0
- package/dist/types/userBookAssessmentType.d.ts +7 -0
- package/dist/types/userBookAssessmentType.js +2 -0
- package/dist/types/userDetailsType.d.ts +2 -0
- package/dist/types/userDetailsType.js +2 -0
- package/dist/types/userFeeTypeByAccountType.d.ts +3 -0
- package/dist/types/userFeeTypeByAccountType.js +2 -0
- package/dist/types/userFeeTypeType.d.ts +6 -0
- package/dist/types/userFeeTypeType.js +2 -0
- package/dist/types/userHasAnnouncementType.d.ts +3 -0
- package/dist/types/userHasAnnouncementType.js +2 -0
- package/dist/types/userHasBatchType.d.ts +9 -0
- package/dist/types/userHasBatchType.js +2 -0
- package/dist/types/userHasCourseType.d.ts +3 -0
- package/dist/types/userHasCourseType.js +2 -0
- package/dist/types/userHasDeviceType.d.ts +3 -0
- package/dist/types/userHasDeviceType.js +2 -0
- package/dist/types/userHasFeeTermsType.d.ts +3 -0
- package/dist/types/userHasFeeTermsType.js +2 -0
- package/dist/types/userHasFileType.d.ts +3 -0
- package/dist/types/userHasFileType.js +2 -0
- package/dist/types/userHasHomeWorkType.d.ts +3 -0
- package/dist/types/userHasHomeWorkType.js +2 -0
- package/dist/types/userHasInventoryHistoryType.d.ts +3 -0
- package/dist/types/userHasInventoryHistoryType.js +2 -0
- package/dist/types/userHasInventoryType.d.ts +3 -0
- package/dist/types/userHasInventoryType.js +2 -0
- package/dist/types/userHasLeaveHistoryType.d.ts +3 -0
- package/dist/types/userHasLeaveHistoryType.js +2 -0
- package/dist/types/userHasLeaveType.d.ts +3 -0
- package/dist/types/userHasLeaveType.js +2 -0
- package/dist/types/userHasOffer.d.ts +3 -0
- package/dist/types/userHasOffer.js +2 -0
- package/dist/types/userHasParentType.d.ts +10 -0
- package/dist/types/userHasParentType.js +2 -0
- package/dist/types/userHasRoleType.d.ts +3 -0
- package/dist/types/userHasRoleType.js +2 -0
- package/dist/types/userHasRollNumberType.d.ts +3 -0
- package/dist/types/userHasRollNumberType.js +2 -0
- package/dist/types/userHasStorageType.d.ts +3 -0
- package/dist/types/userHasStorageType.js +2 -0
- package/dist/types/userHasSubjectFeeType.d.ts +3 -0
- package/dist/types/userHasSubjectFeeType.js +2 -0
- package/dist/types/userInstituteMetaType.d.ts +2 -0
- package/dist/types/userInstituteMetaType.js +2 -0
- package/dist/types/userLeaveRequestType.d.ts +3 -0
- package/dist/types/userLeaveRequestType.js +2 -0
- package/dist/types/userMetaType.d.ts +13 -0
- package/dist/types/userMetaType.js +2 -0
- package/dist/types/userPayoutDetailsType.d.ts +3 -0
- package/dist/types/userPayoutDetailsType.js +2 -0
- package/dist/types/userPayoutHistoryType.d.ts +3 -0
- package/dist/types/userPayoutHistoryType.js +2 -0
- package/dist/types/userPayoutType.d.ts +7 -0
- package/dist/types/userPayoutType.js +2 -0
- package/dist/types/userProjectAssessmentOptionType.d.ts +7 -0
- package/dist/types/userProjectAssessmentOptionType.js +2 -0
- package/dist/types/userRequiredStepsType.d.ts +3 -0
- package/dist/types/userRequiredStepsType.js +2 -0
- package/dist/types/userSchoolMetaType.d.ts +3 -0
- package/dist/types/userSchoolMetaType.js +2 -0
- package/dist/types/userType.d.ts +12 -0
- package/dist/types/userType.js +2 -0
- package/dist/types/vehicleType.d.ts +3 -0
- package/dist/types/vehicleType.js +2 -0
- package/dist/types/vendorType.d.ts +3 -0
- package/dist/types/vendorType.js +2 -0
- package/dist/types/videoAnalystType.d.ts +2 -0
- package/dist/types/videoAnalystType.js +2 -0
- package/dist/types/walletHistoryType.d.ts +3 -0
- package/dist/types/walletHistoryType.js +2 -0
- package/dist/types/walletTransactionType.d.ts +3 -0
- package/dist/types/walletTransactionType.js +2 -0
- package/dist/types/walletType.d.ts +3 -0
- package/dist/types/walletType.js +2 -0
- package/dist/types/workingDayType.d.ts +3 -0
- package/dist/types/workingDayType.js +2 -0
- package/dist/types/workingShiftType.d.ts +3 -0
- package/dist/types/workingShiftType.js +2 -0
- package/package.json +48 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
40
|
+
const app_1 = require("../../constants/app");
|
|
41
|
+
const errorMessages_1 = require("../../constants/errorMessages");
|
|
42
|
+
const instituteModel_1 = __importDefault(require("../psql/instituteModel"));
|
|
43
|
+
const instituteEntityModel_1 = __importDefault(require("../psql/instituteEntityModel"));
|
|
44
|
+
const sequelize_1 = require("sequelize");
|
|
45
|
+
const userInstituteMetaModel_1 = __importDefault(require("./userInstituteMetaModel"));
|
|
46
|
+
const utils_1 = require("../../helpers/utils");
|
|
47
|
+
const date_fns_1 = require("date-fns");
|
|
48
|
+
const examGroupDaysSchema = new mongoose_1.Schema({
|
|
49
|
+
date: {
|
|
50
|
+
type: Date,
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
note: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
subjectId: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
examId: {
|
|
62
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
isHoliday: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
required: true,
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
examDetails: {
|
|
71
|
+
type: mongoose_1.default.Schema.Types.Mixed,
|
|
72
|
+
},
|
|
73
|
+
}, { _id: false });
|
|
74
|
+
const examGroupStandardByDaysSchema = new mongoose_1.Schema({
|
|
75
|
+
standardId: {
|
|
76
|
+
type: String,
|
|
77
|
+
required: true,
|
|
78
|
+
},
|
|
79
|
+
// batches: {
|
|
80
|
+
// type: [String],
|
|
81
|
+
// default: [],
|
|
82
|
+
// },
|
|
83
|
+
// subjects: {
|
|
84
|
+
// type: [String],
|
|
85
|
+
// default: [],
|
|
86
|
+
// },
|
|
87
|
+
days: {
|
|
88
|
+
type: [examGroupDaysSchema],
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
isMarksAdded: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
95
|
+
result: {
|
|
96
|
+
type: String,
|
|
97
|
+
enum: app_1.EXAM_GROUP_STANDARD_RESULT,
|
|
98
|
+
default: app_1.EXAM_GROUP_STANDARD_RESULT.PENDING,
|
|
99
|
+
},
|
|
100
|
+
}, { _id: false });
|
|
101
|
+
const examGroupModelSchema = new mongoose_1.Schema({
|
|
102
|
+
title: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: true,
|
|
105
|
+
},
|
|
106
|
+
subTitle: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: false,
|
|
109
|
+
},
|
|
110
|
+
instituteId: {
|
|
111
|
+
type: String,
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
startDate: {
|
|
115
|
+
type: Date,
|
|
116
|
+
required: true,
|
|
117
|
+
},
|
|
118
|
+
endDate: {
|
|
119
|
+
type: Date,
|
|
120
|
+
required: true,
|
|
121
|
+
},
|
|
122
|
+
standards: {
|
|
123
|
+
type: [String],
|
|
124
|
+
default: [],
|
|
125
|
+
required: true,
|
|
126
|
+
},
|
|
127
|
+
subjects: {
|
|
128
|
+
type: [String],
|
|
129
|
+
default: [],
|
|
130
|
+
required: true,
|
|
131
|
+
},
|
|
132
|
+
standardByDays: {
|
|
133
|
+
type: [examGroupStandardByDaysSchema],
|
|
134
|
+
required: true,
|
|
135
|
+
},
|
|
136
|
+
status: {
|
|
137
|
+
type: String,
|
|
138
|
+
enum: app_1.EXAM_GROUP_STATUS,
|
|
139
|
+
default: app_1.EXAM_GROUP_STATUS.PENDING,
|
|
140
|
+
},
|
|
141
|
+
}, {
|
|
142
|
+
timestamps: true,
|
|
143
|
+
versionKey: false,
|
|
144
|
+
});
|
|
145
|
+
const createOrUpdateHook = async (examGroup) => {
|
|
146
|
+
try {
|
|
147
|
+
if (examGroup.instituteId) {
|
|
148
|
+
const institute = await instituteModel_1.default.findOne({
|
|
149
|
+
where: {
|
|
150
|
+
id: examGroup.instituteId,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
if (!institute)
|
|
154
|
+
throw new Error(errorMessages_1.INSTITUTE_ERROR_MESSAGES.NOT_FOUND);
|
|
155
|
+
}
|
|
156
|
+
if (examGroup.standards) {
|
|
157
|
+
examGroup.standards = [...new Set(examGroup.standards)];
|
|
158
|
+
const standardCount = await instituteEntityModel_1.default.count({
|
|
159
|
+
where: {
|
|
160
|
+
id: { [sequelize_1.Op.in]: examGroup.standards },
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
if (standardCount !== examGroup.standards.length)
|
|
164
|
+
throw new Error(errorMessages_1.INSTITUTE_ENTITY_TYPE_ERROR_MESSAGES.NOT_FOUND);
|
|
165
|
+
}
|
|
166
|
+
if (examGroup.isNew) {
|
|
167
|
+
examGroup.standardByDays = examGroup.standardByDays = [];
|
|
168
|
+
examGroup.subjects = [];
|
|
169
|
+
}
|
|
170
|
+
if (examGroup.standardByDays) {
|
|
171
|
+
examGroup.standardByDays = examGroup.standardByDays.filter((standardByDays) => examGroup.standards.includes(standardByDays.standardId));
|
|
172
|
+
const userInstituteMeta = await userInstituteMetaModel_1.default.findOne({
|
|
173
|
+
userId: examGroup.instituteId,
|
|
174
|
+
instituteId: examGroup.instituteId,
|
|
175
|
+
});
|
|
176
|
+
let subjectList = await instituteEntityModel_1.default.findAll({
|
|
177
|
+
where: {
|
|
178
|
+
entityId: { [sequelize_1.Op.in]: userInstituteMeta?.entities },
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
subjectList = subjectList.filter((subject) => examGroup.standards.includes(subject.entityId));
|
|
182
|
+
subjectList = subjectList.filter((subject) => userInstituteMeta?.entities?.includes(subject.id));
|
|
183
|
+
examGroup.subjects = subjectList.map((subject) => subject.id);
|
|
184
|
+
const subjectListByStandardId = (0, utils_1.groupByFieldOrFields)(subjectList, "entityId");
|
|
185
|
+
const dateList = [];
|
|
186
|
+
let startDate = examGroup.startDate;
|
|
187
|
+
while (new Date(startDate).getTime() < new Date(examGroup.endDate).getTime()) {
|
|
188
|
+
dateList.push(startDate);
|
|
189
|
+
startDate = (0, date_fns_1.addDays)(startDate, 1);
|
|
190
|
+
}
|
|
191
|
+
for (const standard of examGroup.standards) {
|
|
192
|
+
if (!subjectListByStandardId[standard])
|
|
193
|
+
continue;
|
|
194
|
+
// const standardSubjectList = subjectListByStandardId[standard].map((entity: { id: string }) => entity.id);
|
|
195
|
+
// const batches = await this.batchService.findAll({ subjects: { [Op.overlap]: standardSubjectList } });
|
|
196
|
+
const existStandardByDays = examGroup.standardByDays.find((standardByDays) => standardByDays.standardId === standard);
|
|
197
|
+
const existStandardByDaysIndex = examGroup.standardByDays.findIndex((standardByDays) => standardByDays.standardId === standard);
|
|
198
|
+
let standardByDays = {
|
|
199
|
+
standardId: standard,
|
|
200
|
+
// batches: batches.map(batch => batch.id),
|
|
201
|
+
// subjects: standardSubjectList,
|
|
202
|
+
days: [],
|
|
203
|
+
};
|
|
204
|
+
dateList.forEach((date) => {
|
|
205
|
+
const dayObject = {
|
|
206
|
+
date,
|
|
207
|
+
note: "",
|
|
208
|
+
subjectId: "",
|
|
209
|
+
isHoliday: false,
|
|
210
|
+
};
|
|
211
|
+
if (existStandardByDays) {
|
|
212
|
+
existStandardByDays.days = existStandardByDays.days.filter((day) => {
|
|
213
|
+
return dateList
|
|
214
|
+
.map((date) => new Date(date).getTime())
|
|
215
|
+
.includes(new Date(day.date).getTime());
|
|
216
|
+
});
|
|
217
|
+
const existDate = existStandardByDays.days.find((day) => {
|
|
218
|
+
return dateList
|
|
219
|
+
.map((date) => new Date(date).getTime())
|
|
220
|
+
.includes(new Date(day.date).getTime());
|
|
221
|
+
});
|
|
222
|
+
if (!existDate)
|
|
223
|
+
existStandardByDays.days.push(dayObject);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
standardByDays.days.push(dayObject);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
if (existStandardByDays) {
|
|
230
|
+
examGroup.standardByDays[existStandardByDaysIndex] =
|
|
231
|
+
existStandardByDays;
|
|
232
|
+
const isNotValidHoliday = examGroup.standardByDays[existStandardByDaysIndex].days.some((day) => day.isHoliday && day.subjectId.length > 1);
|
|
233
|
+
if (isNotValidHoliday)
|
|
234
|
+
throw new Error(errorMessages_1.EXAM_GROUP_ERROR_MESSAGES.INVALID_HOLIDAY);
|
|
235
|
+
standardByDays = { ...existStandardByDays };
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
examGroup.standardByDays.push(standardByDays);
|
|
239
|
+
}
|
|
240
|
+
/**************** Remove if want validate all subject exam created when status publish **************/
|
|
241
|
+
// if (examGroup.status === EXAM_GROUP_STATUS.PUBLISHED) {
|
|
242
|
+
// const isAllSubjectExamCreated = standardByDays.days.every(day => standardSubjectList.includes(day.subjectId as string));
|
|
243
|
+
// if (!isAllSubjectExamCreated) throw new Error(EXAM_GROUP_ERROR_MESSAGES.ALL_SUBJECT_EXAM_NOT_CREATED);
|
|
244
|
+
// }
|
|
245
|
+
}
|
|
246
|
+
//*********** days array remove duplicate date from date if multiple date empty ********///
|
|
247
|
+
examGroup.standardByDays = examGroup.standardByDays.map((standard) => ({
|
|
248
|
+
...standard,
|
|
249
|
+
days: standard.days.reduce((acc, day) => {
|
|
250
|
+
const existingIndex = acc.findIndex((d) => new Date(d.date).getTime() === new Date(day.date).getTime());
|
|
251
|
+
if (Object.keys(day.examDetails || {}).length > 0) {
|
|
252
|
+
// If an empty object exists for this date, remove it
|
|
253
|
+
if (existingIndex !== -1 &&
|
|
254
|
+
Object.keys(acc[existingIndex].examDetails || {}).length === 0) {
|
|
255
|
+
acc.splice(existingIndex, 1);
|
|
256
|
+
}
|
|
257
|
+
acc.push(day);
|
|
258
|
+
}
|
|
259
|
+
else if (existingIndex === -1) {
|
|
260
|
+
// Push empty examDetails object only if there's no existing entry
|
|
261
|
+
acc.push(day);
|
|
262
|
+
}
|
|
263
|
+
return acc;
|
|
264
|
+
}, []),
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
throw err;
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
examGroupModelSchema.pre("save", async function (next) {
|
|
273
|
+
const subjectIndex = this;
|
|
274
|
+
try {
|
|
275
|
+
await createOrUpdateHook(subjectIndex);
|
|
276
|
+
next();
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
throw error;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
examGroupModelSchema.pre("updateMany", async function (next) {
|
|
283
|
+
const subjectIndex = this.getUpdate();
|
|
284
|
+
try {
|
|
285
|
+
await createOrUpdateHook(subjectIndex);
|
|
286
|
+
next();
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
throw error;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
const ExamGroupModel = mongoose_1.default.model("exam_groups", examGroupModelSchema);
|
|
293
|
+
exports.default = ExamGroupModel;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
40
|
+
const app_1 = require("../../constants/app");
|
|
41
|
+
const examModel_1 = __importDefault(require("./examModel"));
|
|
42
|
+
const errorMessages_1 = require("../../constants/errorMessages");
|
|
43
|
+
// Define the schema for IAnswerSheetQuestion
|
|
44
|
+
const AnswerSheetQuestionSchema = new mongoose_1.Schema({
|
|
45
|
+
index: {
|
|
46
|
+
type: Number,
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
options: {
|
|
50
|
+
type: [String],
|
|
51
|
+
required: false,
|
|
52
|
+
},
|
|
53
|
+
selectedOptions: {
|
|
54
|
+
type: [String],
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
validOptions: {
|
|
58
|
+
type: [String],
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
result: {
|
|
62
|
+
type: String,
|
|
63
|
+
enum: Object.values(app_1.EXAM_ANSWER_SHEET_QUESTION_RESULT),
|
|
64
|
+
default: app_1.EXAM_ANSWER_SHEET_QUESTION_RESULT.NOT_ATTENDED,
|
|
65
|
+
required: false,
|
|
66
|
+
},
|
|
67
|
+
}, { _id: false } // Prevent creation of an automatic `_id` field for subdocuments
|
|
68
|
+
);
|
|
69
|
+
// Define the main schema for IExamHasAnswerSheetModelAttributes
|
|
70
|
+
const examHasAnswerSheetSchema = new mongoose_1.Schema({
|
|
71
|
+
examId: {
|
|
72
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
73
|
+
ref: "exams",
|
|
74
|
+
required: true,
|
|
75
|
+
},
|
|
76
|
+
questions: {
|
|
77
|
+
type: [AnswerSheetQuestionSchema],
|
|
78
|
+
default: [],
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
userId: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: true,
|
|
84
|
+
},
|
|
85
|
+
userType: {
|
|
86
|
+
type: String,
|
|
87
|
+
enum: Object.values(app_1.USER_TYPES),
|
|
88
|
+
required: true,
|
|
89
|
+
},
|
|
90
|
+
type: {
|
|
91
|
+
type: String,
|
|
92
|
+
enum: Object.values(app_1.EXAM_ANSWER_SHEET_RESULT_TYPE),
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
status: {
|
|
96
|
+
type: String,
|
|
97
|
+
enum: Object.values(app_1.EXAM_ANSWER_SHEET_STATUS),
|
|
98
|
+
default: app_1.EXAM_ANSWER_SHEET_STATUS.PENDING,
|
|
99
|
+
required: true,
|
|
100
|
+
},
|
|
101
|
+
obtainedMarks: {
|
|
102
|
+
type: Number,
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
resultStatus: {
|
|
106
|
+
type: String,
|
|
107
|
+
enum: Object.values(app_1.EXAM_ANSWER_SHEET_RESULT_STATUS),
|
|
108
|
+
required: false,
|
|
109
|
+
},
|
|
110
|
+
isInProgress: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false,
|
|
113
|
+
required: false,
|
|
114
|
+
},
|
|
115
|
+
studentExamIp: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: "",
|
|
118
|
+
required: false,
|
|
119
|
+
},
|
|
120
|
+
}, {
|
|
121
|
+
timestamps: true,
|
|
122
|
+
versionKey: false,
|
|
123
|
+
});
|
|
124
|
+
// Add a pre-save hook to validate examId existence
|
|
125
|
+
examHasAnswerSheetSchema.pre("save", async function (next) {
|
|
126
|
+
const examExists = await examModel_1.default.findOne({ where: { id: this.examId } });
|
|
127
|
+
if (!examExists) {
|
|
128
|
+
return next(new Error(errorMessages_1.EXAM_ERROR_MESSAGES.NOT_FOUND));
|
|
129
|
+
}
|
|
130
|
+
next();
|
|
131
|
+
});
|
|
132
|
+
const ExamHasAnswerSheetModel = mongoose_1.default.model("exam_answer_sheets", examHasAnswerSheetSchema);
|
|
133
|
+
exports.default = ExamHasAnswerSheetModel;
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
40
|
+
const app_1 = require("../../constants/app");
|
|
41
|
+
const sequelize_1 = require("sequelize");
|
|
42
|
+
const errorMessages_1 = require("../../constants/errorMessages");
|
|
43
|
+
const instituteEntityModel_1 = __importDefault(require("../psql/instituteEntityModel"));
|
|
44
|
+
const classRoomModel_1 = __importDefault(require("../psql/classRoomModel"));
|
|
45
|
+
const instituteModel_1 = __importDefault(require("../psql/instituteModel"));
|
|
46
|
+
const fileStorageModel_1 = __importDefault(require("../psql/fileStorageModel"));
|
|
47
|
+
const typeManagementModel_1 = __importDefault(require("../psql/typeManagementModel"));
|
|
48
|
+
const batchModel_1 = __importDefault(require("../psql/batchModel"));
|
|
49
|
+
const ExamHasBatchSchema = new mongoose_1.Schema({
|
|
50
|
+
batchId: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
classroomId: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
58
|
+
startTime: {
|
|
59
|
+
type: Date,
|
|
60
|
+
required: true,
|
|
61
|
+
},
|
|
62
|
+
endTime: {
|
|
63
|
+
type: Date,
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
isMarksAdded: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
}, { _id: false } // Prevent creation of an automatic `_id` field for subdocuments
|
|
71
|
+
);
|
|
72
|
+
const examModelSchema = new mongoose_1.Schema({
|
|
73
|
+
title: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: true,
|
|
76
|
+
},
|
|
77
|
+
subTitle: {
|
|
78
|
+
type: String,
|
|
79
|
+
required: false,
|
|
80
|
+
},
|
|
81
|
+
description: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: false,
|
|
84
|
+
},
|
|
85
|
+
subject: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true,
|
|
88
|
+
},
|
|
89
|
+
batches: {
|
|
90
|
+
type: [ExamHasBatchSchema],
|
|
91
|
+
required: true,
|
|
92
|
+
},
|
|
93
|
+
mode: {
|
|
94
|
+
type: String,
|
|
95
|
+
enum: Object.values(app_1.EXAM_MODE),
|
|
96
|
+
required: true,
|
|
97
|
+
},
|
|
98
|
+
type: {
|
|
99
|
+
type: String,
|
|
100
|
+
required: true,
|
|
101
|
+
},
|
|
102
|
+
scheduleDate: {
|
|
103
|
+
type: Date,
|
|
104
|
+
required: true,
|
|
105
|
+
},
|
|
106
|
+
maxMarks: {
|
|
107
|
+
type: Number,
|
|
108
|
+
required: true,
|
|
109
|
+
},
|
|
110
|
+
passingMarks: {
|
|
111
|
+
type: Number,
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
status: {
|
|
115
|
+
type: String,
|
|
116
|
+
enum: Object.values(app_1.EXAM_STATUS),
|
|
117
|
+
default: app_1.EXAM_STATUS.PENDING,
|
|
118
|
+
required: false,
|
|
119
|
+
},
|
|
120
|
+
nagativeMarksPerQuestion: {
|
|
121
|
+
type: Number,
|
|
122
|
+
required: false,
|
|
123
|
+
},
|
|
124
|
+
marksPerQuestion: {
|
|
125
|
+
type: Number,
|
|
126
|
+
required: false,
|
|
127
|
+
},
|
|
128
|
+
instituteId: {
|
|
129
|
+
type: String,
|
|
130
|
+
required: false,
|
|
131
|
+
},
|
|
132
|
+
fileId: {
|
|
133
|
+
type: String,
|
|
134
|
+
required: false,
|
|
135
|
+
},
|
|
136
|
+
// fileUrl: {
|
|
137
|
+
// type: String,
|
|
138
|
+
// required: false,
|
|
139
|
+
// },
|
|
140
|
+
totalQuestions: {
|
|
141
|
+
type: Number,
|
|
142
|
+
required: false,
|
|
143
|
+
},
|
|
144
|
+
mcqOptions: {
|
|
145
|
+
type: [String],
|
|
146
|
+
required: false,
|
|
147
|
+
},
|
|
148
|
+
ansSelectionType: {
|
|
149
|
+
type: String,
|
|
150
|
+
enum: Object.values(app_1.EXAM_ANSWER_SELECTION_TYPE),
|
|
151
|
+
required: false,
|
|
152
|
+
},
|
|
153
|
+
validAnsType: {
|
|
154
|
+
type: String,
|
|
155
|
+
enum: Object.values(app_1.EXAM_VALID_ANSWER_TYPE),
|
|
156
|
+
required: false,
|
|
157
|
+
},
|
|
158
|
+
standard: {
|
|
159
|
+
type: String,
|
|
160
|
+
required: false,
|
|
161
|
+
},
|
|
162
|
+
groupId: {
|
|
163
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
164
|
+
required: false,
|
|
165
|
+
},
|
|
166
|
+
isPublished: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
default: true,
|
|
169
|
+
},
|
|
170
|
+
createdBy: {
|
|
171
|
+
type: String,
|
|
172
|
+
required: false,
|
|
173
|
+
},
|
|
174
|
+
updatedBy: {
|
|
175
|
+
type: String,
|
|
176
|
+
required: false,
|
|
177
|
+
},
|
|
178
|
+
deletedBy: {
|
|
179
|
+
type: String,
|
|
180
|
+
required: false,
|
|
181
|
+
},
|
|
182
|
+
isMarksAdded: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: false,
|
|
185
|
+
},
|
|
186
|
+
plannerSyncStatus: {
|
|
187
|
+
type: String,
|
|
188
|
+
default: app_1.PLANNER_SYNC_STATUS.PENDING,
|
|
189
|
+
},
|
|
190
|
+
}, {
|
|
191
|
+
timestamps: true,
|
|
192
|
+
versionKey: false,
|
|
193
|
+
});
|
|
194
|
+
examModelSchema.pre("save", async function (next) {
|
|
195
|
+
const exam = this;
|
|
196
|
+
try {
|
|
197
|
+
if (exam.batches && exam.batches.length && exam.subject) {
|
|
198
|
+
let where = {
|
|
199
|
+
id: exam.subject,
|
|
200
|
+
};
|
|
201
|
+
const subject = await instituteEntityModel_1.default.findOne({ where });
|
|
202
|
+
if (!subject) {
|
|
203
|
+
return next(new Error(errorMessages_1.BATCH_ERROR_MESSAGES.INVALID_SELECTED));
|
|
204
|
+
}
|
|
205
|
+
where = {
|
|
206
|
+
id: { [sequelize_1.Op.in]: exam.batches.map((batch) => batch.batchId) },
|
|
207
|
+
subjects: { [sequelize_1.Op.overlap]: [exam.subject] },
|
|
208
|
+
};
|
|
209
|
+
const batchesList = await batchModel_1.default.findAll({ where });
|
|
210
|
+
if (batchesList.length !== exam.batches.length) {
|
|
211
|
+
return next(new Error(errorMessages_1.BATCH_ERROR_MESSAGES.INVALID_SELECTED));
|
|
212
|
+
}
|
|
213
|
+
if (exam.mode === app_1.EXAM_MODE.OFFLINE && !exam.groupId) {
|
|
214
|
+
where = {
|
|
215
|
+
id: { [sequelize_1.Op.in]: exam.batches.map((batch) => batch.classroomId) },
|
|
216
|
+
};
|
|
217
|
+
const classroomCount = await classRoomModel_1.default.count({ where });
|
|
218
|
+
const classroomDataount = [
|
|
219
|
+
...new Set(exam.batches.map((val) => val.classroomId)),
|
|
220
|
+
].length;
|
|
221
|
+
if (classroomCount !== classroomDataount) {
|
|
222
|
+
return next(new Error(errorMessages_1.CLASSROOM_ERROR_MESSAGES.INVALID_SELECTED));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (exam.instituteId) {
|
|
227
|
+
const institute = await instituteModel_1.default.findByPk(exam.instituteId);
|
|
228
|
+
if (!institute) {
|
|
229
|
+
return next(new Error(errorMessages_1.INSTITUTE_ERROR_MESSAGES.NOT_FOUND));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (exam.fileId) {
|
|
233
|
+
const file = await fileStorageModel_1.default.findByPk(exam.fileId);
|
|
234
|
+
if (!file) {
|
|
235
|
+
return next(new Error(errorMessages_1.FILE_STORAGE_ERROR_MESSAGES.NOT_FOUND));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (exam.type) {
|
|
239
|
+
const type = await typeManagementModel_1.default.findOne({
|
|
240
|
+
where: {
|
|
241
|
+
id: exam.type,
|
|
242
|
+
type: app_1.TYPE_MANAGEMENT_TYPE.EXAM,
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
if (!type) {
|
|
246
|
+
return next(new Error(errorMessages_1.TYPE_MANAGEMENT_ERROR_MESSAGES.NOT_FOUND));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
next(); // Proceed with the save operation
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
return next(error); // Handle any errors that occur during the validation
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
examModelSchema.index({
|
|
256
|
+
instituteId: 1,
|
|
257
|
+
"batches.batchId": 1,
|
|
258
|
+
scheduleDate: 1,
|
|
259
|
+
subject: 1,
|
|
260
|
+
status: 1,
|
|
261
|
+
mode: 1,
|
|
262
|
+
});
|
|
263
|
+
const ExamModel = mongoose_1.default.model("exams", examModelSchema);
|
|
264
|
+
// (async () => {
|
|
265
|
+
// await ExamModel.syncIndexes();
|
|
266
|
+
// })(); // Rebuilds indexes in DB based on schema
|
|
267
|
+
exports.default = ExamModel;
|