@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,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const sequelize_1 = require("sequelize");
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
|
+
class WorkingDayModel extends sequelize_1.Model {
|
|
11
|
+
}
|
|
12
|
+
WorkingDayModel.init({
|
|
13
|
+
id: {
|
|
14
|
+
type: sequelize_1.DataTypes.UUID,
|
|
15
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true,
|
|
18
|
+
},
|
|
19
|
+
dayName: {
|
|
20
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
21
|
+
field: 'day_name',
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
dayOfWeek: {
|
|
25
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
26
|
+
field: 'day_of_week',
|
|
27
|
+
allowNull: false,
|
|
28
|
+
},
|
|
29
|
+
status: {
|
|
30
|
+
type: sequelize_1.DataTypes.STRING(30),
|
|
31
|
+
allowNull: false,
|
|
32
|
+
defaultValue: app_1.WORKIN_DAY_STATUS.INACTIVE,
|
|
33
|
+
},
|
|
34
|
+
startTime: {
|
|
35
|
+
type: sequelize_1.DataTypes.DATE,
|
|
36
|
+
allowNull: false,
|
|
37
|
+
field: 'start_time',
|
|
38
|
+
},
|
|
39
|
+
endTime: {
|
|
40
|
+
type: sequelize_1.DataTypes.DATE,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
field: 'end_time',
|
|
43
|
+
},
|
|
44
|
+
instituteId: {
|
|
45
|
+
type: sequelize_1.DataTypes.UUID,
|
|
46
|
+
field: 'institute_id',
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
}, {
|
|
50
|
+
modelName: 'WorkingDayModel',
|
|
51
|
+
tableName: 'working_days',
|
|
52
|
+
timestamps: true,
|
|
53
|
+
sequelize: index_1.sequelize,
|
|
54
|
+
});
|
|
55
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
56
|
+
foreignKey: {
|
|
57
|
+
name: 'createdBy',
|
|
58
|
+
allowNull: true,
|
|
59
|
+
field: 'created_by',
|
|
60
|
+
},
|
|
61
|
+
as: 'createdByUser',
|
|
62
|
+
});
|
|
63
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
64
|
+
foreignKey: {
|
|
65
|
+
name: 'updatedBy',
|
|
66
|
+
allowNull: true,
|
|
67
|
+
field: 'updated_by',
|
|
68
|
+
},
|
|
69
|
+
as: 'updatedByUser',
|
|
70
|
+
});
|
|
71
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
72
|
+
foreignKey: {
|
|
73
|
+
name: 'deletedBy',
|
|
74
|
+
allowNull: true,
|
|
75
|
+
field: 'deleted_by',
|
|
76
|
+
},
|
|
77
|
+
as: 'deletedByUser',
|
|
78
|
+
});
|
|
79
|
+
exports.default = WorkingDayModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { SCHOOL_SHIFT, WORKIN_DAY_STATUS } from '../../constants/app';
|
|
3
|
+
import { IWorkingShiftAttributes } from '../../interfaces/workingShiftInterface';
|
|
4
|
+
import { TWorkingShiftCreationAttributes } from '../../types/workingShiftType';
|
|
5
|
+
declare class WorkingShiftModel extends Model<IWorkingShiftAttributes, TWorkingShiftCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
status: WORKIN_DAY_STATUS;
|
|
8
|
+
shiftType: SCHOOL_SHIFT;
|
|
9
|
+
startTime: Date;
|
|
10
|
+
endTime: Date;
|
|
11
|
+
workingId: string;
|
|
12
|
+
instituteId: string;
|
|
13
|
+
slotId: string;
|
|
14
|
+
createdBy: string;
|
|
15
|
+
updatedBy: string;
|
|
16
|
+
deletedBy: string;
|
|
17
|
+
readonly createdAt: Date;
|
|
18
|
+
readonly deletedAt: string;
|
|
19
|
+
readonly updatedAt: Date;
|
|
20
|
+
}
|
|
21
|
+
export default WorkingShiftModel;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const sequelize_1 = require("sequelize");
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
|
+
const workingDayModel_1 = __importDefault(require("./workingDayModel"));
|
|
11
|
+
const instituteModel_1 = __importDefault(require("./instituteModel"));
|
|
12
|
+
const slotModel_1 = __importDefault(require("./slotModel"));
|
|
13
|
+
class WorkingShiftModel extends sequelize_1.Model {
|
|
14
|
+
}
|
|
15
|
+
WorkingShiftModel.init({
|
|
16
|
+
id: {
|
|
17
|
+
type: sequelize_1.DataTypes.UUID,
|
|
18
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
19
|
+
allowNull: false,
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
},
|
|
22
|
+
workingId: {
|
|
23
|
+
type: sequelize_1.DataTypes.UUID,
|
|
24
|
+
field: 'working_id',
|
|
25
|
+
allowNull: false,
|
|
26
|
+
},
|
|
27
|
+
slotId: {
|
|
28
|
+
type: sequelize_1.DataTypes.UUID,
|
|
29
|
+
field: 'slot_id',
|
|
30
|
+
allowNull: false,
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING(30),
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: app_1.WORKIN_DAY_STATUS.ACTIVE,
|
|
36
|
+
},
|
|
37
|
+
shiftType: {
|
|
38
|
+
type: sequelize_1.DataTypes.STRING(30),
|
|
39
|
+
allowNull: false,
|
|
40
|
+
},
|
|
41
|
+
startTime: {
|
|
42
|
+
type: sequelize_1.DataTypes.DATE,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
field: 'start_time',
|
|
45
|
+
},
|
|
46
|
+
endTime: {
|
|
47
|
+
type: sequelize_1.DataTypes.DATE,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
field: 'end_time',
|
|
50
|
+
},
|
|
51
|
+
instituteId: {
|
|
52
|
+
type: sequelize_1.DataTypes.UUID,
|
|
53
|
+
field: 'institute_id',
|
|
54
|
+
allowNull: true,
|
|
55
|
+
},
|
|
56
|
+
}, {
|
|
57
|
+
modelName: 'WorkingShiftModel',
|
|
58
|
+
tableName: 'working_shift_days',
|
|
59
|
+
timestamps: true,
|
|
60
|
+
sequelize: index_1.sequelize,
|
|
61
|
+
});
|
|
62
|
+
WorkingShiftModel.belongsTo(workingDayModel_1.default, { foreignKey: 'workingId', as: 'shiftHasWorkingDay' });
|
|
63
|
+
workingDayModel_1.default.hasMany(WorkingShiftModel, { foreignKey: 'workingId', as: 'workingDayShift' });
|
|
64
|
+
WorkingShiftModel.belongsTo(instituteModel_1.default, { foreignKey: 'instituteId', as: 'shiftHasInstituted' });
|
|
65
|
+
workingDayModel_1.default.hasMany(WorkingShiftModel, { foreignKey: 'instituteId', as: 'institutedShift' });
|
|
66
|
+
WorkingShiftModel.belongsTo(slotModel_1.default, { foreignKey: 'slotId', as: 'shiftSlot' });
|
|
67
|
+
slotModel_1.default.hasMany(WorkingShiftModel, { foreignKey: 'slotId', as: 'slotHasShift' });
|
|
68
|
+
WorkingShiftModel.belongsTo(userModel_1.default, {
|
|
69
|
+
foreignKey: {
|
|
70
|
+
name: 'createdBy',
|
|
71
|
+
allowNull: true,
|
|
72
|
+
field: 'created_by',
|
|
73
|
+
},
|
|
74
|
+
as: 'createdByUser',
|
|
75
|
+
});
|
|
76
|
+
WorkingShiftModel.belongsTo(userModel_1.default, {
|
|
77
|
+
foreignKey: {
|
|
78
|
+
name: 'updatedBy',
|
|
79
|
+
allowNull: true,
|
|
80
|
+
field: 'updated_by',
|
|
81
|
+
},
|
|
82
|
+
as: 'updatedByUser',
|
|
83
|
+
});
|
|
84
|
+
WorkingShiftModel.belongsTo(userModel_1.default, {
|
|
85
|
+
foreignKey: {
|
|
86
|
+
name: 'deletedBy',
|
|
87
|
+
allowNull: true,
|
|
88
|
+
field: 'deleted_by',
|
|
89
|
+
},
|
|
90
|
+
as: 'deletedByUser',
|
|
91
|
+
});
|
|
92
|
+
exports.default = WorkingShiftModel;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FilterQuery, UpdateQuery, Document, QueryOptions, Model as MongooseModel, PopulateOptions, MongooseUpdateQueryOptions, UpdateWriteOpResult, ClientSession, CreateOptions } from "mongoose";
|
|
2
|
+
import { TPaginationOptions } from "../../types/commonType";
|
|
3
|
+
import { IMongooseCommonService } from "../Contracts/IMongooseCommonService";
|
|
4
|
+
import { PipelineStage } from "mongoose";
|
|
5
|
+
export declare class MongooseCommonService<T extends Document> implements IMongooseCommonService<T> {
|
|
6
|
+
private model;
|
|
7
|
+
constructor(model: MongooseModel<T>);
|
|
8
|
+
findAll(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T[]>;
|
|
9
|
+
findOne(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T | null>;
|
|
10
|
+
findById(id: string, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T | null>;
|
|
11
|
+
findAllWithPagination: (filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]) => Promise<TPaginationOptions<T>>;
|
|
12
|
+
count(filter: FilterQuery<T>): Promise<number>;
|
|
13
|
+
update(filter: FilterQuery<T>, updateData: UpdateQuery<T>, options?: MongooseUpdateQueryOptions<T> & {
|
|
14
|
+
userId?: string;
|
|
15
|
+
session?: ClientSession;
|
|
16
|
+
}): Promise<UpdateWriteOpResult | null>;
|
|
17
|
+
upsert(filter: FilterQuery<T>, updateData: UpdateQuery<T>, options?: QueryOptions & {
|
|
18
|
+
userId?: string;
|
|
19
|
+
session?: ClientSession;
|
|
20
|
+
}): Promise<T | null>;
|
|
21
|
+
create(createData: Partial<T>, options?: CreateOptions & {
|
|
22
|
+
userId?: string;
|
|
23
|
+
session?: ClientSession;
|
|
24
|
+
}): Promise<T>;
|
|
25
|
+
bulkCreate(createData: Partial<T>[], options?: CreateOptions & {
|
|
26
|
+
userId?: string;
|
|
27
|
+
session?: ClientSession;
|
|
28
|
+
}): Promise<T[]>;
|
|
29
|
+
delete(filter: FilterQuery<T>, options?: MongooseUpdateQueryOptions<T> & {
|
|
30
|
+
userId?: string;
|
|
31
|
+
session?: ClientSession;
|
|
32
|
+
}): Promise<UpdateWriteOpResult | null>;
|
|
33
|
+
aggregate(pipeline: PipelineStage[]): Promise<{
|
|
34
|
+
[key: string]: string | number | object;
|
|
35
|
+
}[]>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongooseCommonService = void 0;
|
|
4
|
+
const app_1 = require("../../constants/app");
|
|
5
|
+
class MongooseCommonService {
|
|
6
|
+
constructor(model) {
|
|
7
|
+
this.findAllWithPagination = async (filter, options = {}, populate) => {
|
|
8
|
+
try {
|
|
9
|
+
const convertOrderToSort = (order) => {
|
|
10
|
+
const sort = {};
|
|
11
|
+
for (const [key, direction] of order) {
|
|
12
|
+
sort[key] = direction.toUpperCase() === "DESC" ? -1 : 1;
|
|
13
|
+
}
|
|
14
|
+
return sort;
|
|
15
|
+
};
|
|
16
|
+
const { order, projection, ...restOptions } = options;
|
|
17
|
+
let { page, limit } = options;
|
|
18
|
+
const sort = convertOrderToSort(order || app_1.PAGINATION_ORDER);
|
|
19
|
+
// Ensure page and limit are positive integers
|
|
20
|
+
page = Math.max(1, page || app_1.PAGINATION.PAGE);
|
|
21
|
+
limit = Math.max(1, limit || app_1.PAGINATION.LIMIT);
|
|
22
|
+
// Calculate offset
|
|
23
|
+
const skip = (page - 1) * limit;
|
|
24
|
+
// Count total records
|
|
25
|
+
const totalRecords = await this.model.countDocuments(filter).exec();
|
|
26
|
+
const totalPages = Math.ceil(totalRecords / limit);
|
|
27
|
+
// Query the records
|
|
28
|
+
const query = this.model.find(filter, projection, {
|
|
29
|
+
...restOptions,
|
|
30
|
+
limit,
|
|
31
|
+
skip,
|
|
32
|
+
sort,
|
|
33
|
+
});
|
|
34
|
+
// Apply populate if necessary
|
|
35
|
+
if (populate) {
|
|
36
|
+
query.populate(populate);
|
|
37
|
+
}
|
|
38
|
+
const recordList = await query.exec();
|
|
39
|
+
// Construct the pagination result
|
|
40
|
+
const paginationOptions = {
|
|
41
|
+
limit,
|
|
42
|
+
totalRecords,
|
|
43
|
+
totalPages,
|
|
44
|
+
hasPreviousPage: page > 1,
|
|
45
|
+
currentPage: Math.min(page, totalPages),
|
|
46
|
+
hasNextPage: page < totalPages,
|
|
47
|
+
recordList,
|
|
48
|
+
};
|
|
49
|
+
return paginationOptions;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
throw err;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
this.model = model;
|
|
56
|
+
}
|
|
57
|
+
async findAll(filter, options = {}, populate) {
|
|
58
|
+
const query = this.model.find(filter, null, options);
|
|
59
|
+
if (populate)
|
|
60
|
+
query.populate(populate);
|
|
61
|
+
return query.exec();
|
|
62
|
+
}
|
|
63
|
+
async findOne(filter, options = {}, populate) {
|
|
64
|
+
const query = this.model.findOne(filter, null, options);
|
|
65
|
+
if (populate)
|
|
66
|
+
query.populate(populate);
|
|
67
|
+
return query.exec();
|
|
68
|
+
}
|
|
69
|
+
async findById(id, options = {}, populate) {
|
|
70
|
+
const query = this.model.findById(id, null, options);
|
|
71
|
+
if (populate)
|
|
72
|
+
query.populate(populate);
|
|
73
|
+
return query.exec();
|
|
74
|
+
}
|
|
75
|
+
async count(filter) {
|
|
76
|
+
return this.model.countDocuments(filter).exec();
|
|
77
|
+
}
|
|
78
|
+
async update(filter, updateData, options = {}) {
|
|
79
|
+
return this.model.updateMany(filter, updateData, options).exec();
|
|
80
|
+
}
|
|
81
|
+
async upsert(filter, updateData, options = {
|
|
82
|
+
upsert: true,
|
|
83
|
+
new: true,
|
|
84
|
+
}) {
|
|
85
|
+
return this.model.findOneAndUpdate(filter, updateData, options).exec();
|
|
86
|
+
}
|
|
87
|
+
async create(createData, options = {}) {
|
|
88
|
+
const [createdDoc] = await this.model.create([{ ...createData, createdBy: options.userId }], options);
|
|
89
|
+
return createdDoc;
|
|
90
|
+
}
|
|
91
|
+
async bulkCreate(createData, options = {}) {
|
|
92
|
+
return this.model.create(
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
|
+
createData.map((data) => {
|
|
95
|
+
data.createdBy = options.userId;
|
|
96
|
+
return data;
|
|
97
|
+
}), options);
|
|
98
|
+
}
|
|
99
|
+
async delete(filter, options = {}) {
|
|
100
|
+
return this.model
|
|
101
|
+
.updateMany(filter, { deletedBy: options.userId, deletedAt: new Date() }, options)
|
|
102
|
+
.exec();
|
|
103
|
+
}
|
|
104
|
+
async aggregate(pipeline) {
|
|
105
|
+
return this.model.aggregate(pipeline).exec();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.MongooseCommonService = MongooseCommonService;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FindOptions, WhereOptions, Model, ModelStatic, UpdateOptions, BulkCreateOptions, DestroyOptions, CreateOptions, Identifier, UpsertOptions, CountOptions } from 'sequelize';
|
|
2
|
+
import { ISequelizeCommonService } from '../Contracts/ISequelizeCommonService';
|
|
3
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
4
|
+
export default class SequelizeCommonService<T extends Model> implements ISequelizeCommonService<T> {
|
|
5
|
+
private model;
|
|
6
|
+
constructor(model: ModelStatic<T>);
|
|
7
|
+
findByPk(identifier: Identifier, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'] | null>;
|
|
8
|
+
findAll: (where: WhereOptions<T["_attributes"]>, options?: FindOptions<T["_attributes"]>) => Promise<T["_attributes"][]>;
|
|
9
|
+
findAllWithPagination: (where: WhereOptions<T["_attributes"]>, options?: FindOptions<T["_attributes"]>) => Promise<TPaginationOptions<T["_attributes"]>>;
|
|
10
|
+
findOne: (where: WhereOptions<T["_attributes"]>, options?: FindOptions<T["_attributes"]>) => Promise<T["_attributes"] | null>;
|
|
11
|
+
update: (where: WhereOptions<T["_attributes"]>, updateData: Partial<T["_attributes"]>, options?: Omit<UpdateOptions, "where">) => Promise<[number]>;
|
|
12
|
+
upsert: (conflictWhere: WhereOptions<T["_attributes"]>, updateData: T["_creationAttributes"], options?: Partial<UpsertOptions>) => Promise<[T["_attributes"], boolean | null]>;
|
|
13
|
+
create: (createData: T["_creationAttributes"], options?: CreateOptions) => Promise<T["_attributes"]>;
|
|
14
|
+
bulkCreate: (createData: T["_creationAttributes"][], options?: BulkCreateOptions<T["_attributes"]>) => Promise<T["_attributes"][]>;
|
|
15
|
+
delete: (where: WhereOptions<T["_attributes"]>, options?: DestroyOptions<T["_attributes"]>) => Promise<number>;
|
|
16
|
+
count: (where: WhereOptions<T["_attributes"]>, options?: CountOptions<T["_attributes"]>) => Promise<number>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const app_1 = require("../../constants/app");
|
|
4
|
+
class SequelizeCommonService {
|
|
5
|
+
constructor(model) {
|
|
6
|
+
this.findAll = (where, options) => {
|
|
7
|
+
try {
|
|
8
|
+
const finalOptions = {
|
|
9
|
+
...(options || {}),
|
|
10
|
+
order: options?.order || app_1.PAGINATION_ORDER,
|
|
11
|
+
};
|
|
12
|
+
return this.model.findAll({ where, ...finalOptions });
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
throw err;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
this.findAllWithPagination = async (where, options) => {
|
|
19
|
+
try {
|
|
20
|
+
if (!options)
|
|
21
|
+
options = {};
|
|
22
|
+
const limit = options.limit || app_1.PAGINATION.LIMIT;
|
|
23
|
+
const currentPage = options.page || app_1.PAGINATION.PAGE;
|
|
24
|
+
// Clean options for count()
|
|
25
|
+
const countOptions = { ...options };
|
|
26
|
+
// options.subQuery = false;
|
|
27
|
+
delete countOptions.order;
|
|
28
|
+
delete countOptions.limit;
|
|
29
|
+
delete countOptions.offset;
|
|
30
|
+
const totalRecords = await this.model.count({
|
|
31
|
+
where,
|
|
32
|
+
include: options.include,
|
|
33
|
+
distinct: true,
|
|
34
|
+
});
|
|
35
|
+
const totalPages = Math.ceil(totalRecords / limit);
|
|
36
|
+
// Apply pagination + order for findAll
|
|
37
|
+
options.limit = limit;
|
|
38
|
+
options.offset = (currentPage - 1) * limit;
|
|
39
|
+
options.order = options.order || app_1.PAGINATION_ORDER;
|
|
40
|
+
const listOfRecords = await this.findAll(where, options);
|
|
41
|
+
const paginationOptions = {
|
|
42
|
+
limit,
|
|
43
|
+
totalRecords,
|
|
44
|
+
totalPages,
|
|
45
|
+
hasPreviousPage: currentPage - 1 > 0 ? true : false,
|
|
46
|
+
currentPage: currentPage > totalPages ? totalPages : currentPage,
|
|
47
|
+
hasNextPage: currentPage < totalPages,
|
|
48
|
+
recordList: listOfRecords,
|
|
49
|
+
};
|
|
50
|
+
return paginationOptions;
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.findOne = async (where, options) => {
|
|
57
|
+
try {
|
|
58
|
+
return this.model.findOne({ where, ...options });
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
throw err;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
this.update = async (where, updateData, options) => {
|
|
65
|
+
try {
|
|
66
|
+
return this.model.update(updateData, { where, ...options });
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
throw err;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.upsert = async (conflictWhere, updateData, options) => {
|
|
73
|
+
try {
|
|
74
|
+
return this.model.upsert(updateData, { conflictWhere, ...options });
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
this.create = async (createData, options) => {
|
|
81
|
+
try {
|
|
82
|
+
return this.model.create(createData, options);
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
throw err;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
this.bulkCreate = async (createData, options) => {
|
|
89
|
+
try {
|
|
90
|
+
return this.model.bulkCreate(createData, options);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
throw err;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this.delete = async (where, options) => {
|
|
97
|
+
try {
|
|
98
|
+
return this.model.destroy({ where, ...options });
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
throw err;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
this.count = (where, options) => {
|
|
105
|
+
try {
|
|
106
|
+
return this.model.count({ where, ...options });
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
this.model = model;
|
|
113
|
+
}
|
|
114
|
+
findByPk(identifier, options) {
|
|
115
|
+
try {
|
|
116
|
+
return this.model.findByPk(identifier, options);
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
throw err;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.default = SequelizeCommonService;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FilterQuery, UpdateQuery, Document, QueryOptions, PopulateOptions, MongooseUpdateQueryOptions, UpdateWriteOpResult, ClientSession, CreateOptions } from 'mongoose';
|
|
2
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
3
|
+
export interface IReadService<T extends Document> {
|
|
4
|
+
findAll(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T[]>;
|
|
5
|
+
findOne(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T | null>;
|
|
6
|
+
findById(id: string, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T | null>;
|
|
7
|
+
findAllWithPagination(filter: FilterQuery<T>, options: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<TPaginationOptions<T>>;
|
|
8
|
+
count(filter: FilterQuery<T>): Promise<number>;
|
|
9
|
+
}
|
|
10
|
+
export interface IWriteService<T extends Document> {
|
|
11
|
+
update(filter: FilterQuery<T>, updateData: UpdateQuery<T>, options?: MongooseUpdateQueryOptions<T> & {
|
|
12
|
+
userId?: string;
|
|
13
|
+
session?: ClientSession;
|
|
14
|
+
}): Promise<UpdateWriteOpResult | null>;
|
|
15
|
+
upsert(filter: FilterQuery<T>, updateData: UpdateQuery<T>, options?: QueryOptions & {
|
|
16
|
+
userId?: string;
|
|
17
|
+
session?: ClientSession;
|
|
18
|
+
}): Promise<T | null>;
|
|
19
|
+
create(createData: Partial<T>, options?: CreateOptions & {
|
|
20
|
+
userId?: string;
|
|
21
|
+
session?: ClientSession;
|
|
22
|
+
}): Promise<T>;
|
|
23
|
+
bulkCreate(createData: Partial<T>[], options?: CreateOptions & {
|
|
24
|
+
userId?: string;
|
|
25
|
+
session?: ClientSession;
|
|
26
|
+
}): Promise<T[]>;
|
|
27
|
+
}
|
|
28
|
+
export interface IDeleteService<T extends Document> {
|
|
29
|
+
delete(filter: FilterQuery<T>, options?: MongooseUpdateQueryOptions<T> & {
|
|
30
|
+
userId?: string;
|
|
31
|
+
session?: ClientSession;
|
|
32
|
+
}): Promise<UpdateWriteOpResult | null>;
|
|
33
|
+
}
|
|
34
|
+
export interface IMongooseCommonService<T extends Document> extends IReadService<T>, IWriteService<T>, IDeleteService<T> {
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FindOptions, WhereOptions, UpdateOptions, BulkCreateOptions, DestroyOptions, CreateOptions, Identifier, Model, UpsertOptions, CountOptions } from 'sequelize';
|
|
2
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
3
|
+
export interface IReadService<T extends Model> {
|
|
4
|
+
findAll(where: WhereOptions<T['_attributes']>, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'][]>;
|
|
5
|
+
findOne(where: WhereOptions<T['_attributes']>, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'] | null>;
|
|
6
|
+
findByPk(identifier: Identifier, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'] | null>;
|
|
7
|
+
findAllWithPagination(where: WhereOptions<T['_attributes']>, options?: FindOptions<T['_attributes']>): Promise<TPaginationOptions<T['_attributes']>>;
|
|
8
|
+
count(where: WhereOptions<T['_attributes']>, options?: CountOptions<T['_attributes']>): Promise<number>;
|
|
9
|
+
}
|
|
10
|
+
export interface IWriteService<T extends Model> {
|
|
11
|
+
update(where: WhereOptions<T['_attributes']>, updateData: Partial<T['_attributes']>, options?: Partial<UpdateOptions>): Promise<[number]>;
|
|
12
|
+
upsert(conflictWhere: WhereOptions<T['_attributes']>, updateData: T['_creationAttributes'], options?: Partial<UpsertOptions>): Promise<[T['_attributes'], boolean | null]>;
|
|
13
|
+
create(createData: T['_creationAttributes'], options?: CreateOptions): Promise<T['_attributes']>;
|
|
14
|
+
bulkCreate(createData: T['_creationAttributes'][], options?: BulkCreateOptions<T['_attributes']>): Promise<T['_attributes'][]>;
|
|
15
|
+
}
|
|
16
|
+
export interface IDeleteService<T extends Model> {
|
|
17
|
+
delete(where: WhereOptions<T['_attributes']>, options?: DestroyOptions<T['_attributes']>): Promise<number>;
|
|
18
|
+
}
|
|
19
|
+
export interface ISequelizeCommonService<T extends Model> extends IReadService<T>, IWriteService<T>, IDeleteService<T> {
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IAcademicCalendarModelAttributes } from '../interfaces/academicCalendarInterface';
|
|
3
|
+
export type TAcademicCalendarModelCreationAttributes = Optional<IAcademicCalendarModelAttributes, 'id'>;
|
|
4
|
+
export interface TUpdateAcademicCalenderStatusParams {
|
|
5
|
+
instituteId?: string | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IAccountHasReceiptDetailsInterfaceModelAttributes } from '../interfaces/accountHasReceiptDetailsInterface';
|
|
3
|
+
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface';
|
|
4
|
+
export type TAccountHasReceiptDetailsModelCreationAttributes = Optional<IAccountHasReceiptDetailsInterfaceModelAttributes, 'id'>;
|
|
5
|
+
export type TAccountHasReceiptDetailAttributesWithAssociations = IAccountHasReceiptDetailsInterfaceModelAttributes & {
|
|
6
|
+
accountHasReceiptDetailsProfileImage?: IFileStorageAttributes;
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IAnnouncementModelAttributes } from '../interfaces/announcementInterface';
|
|
3
|
+
export type TAnnouncementModelCreationAttributes = Optional<IAnnouncementModelAttributes, 'id'>;
|
|
4
|
+
export type TAnnouncementCreateParams = {
|
|
5
|
+
announcementId?: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IBannerModelAttributes } from '../interfaces/bannerInterface';
|
|
3
|
+
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface';
|
|
4
|
+
export type TBannerModelCreationAttributes = Optional<IBannerModelAttributes, 'id'>;
|
|
5
|
+
export type TBannerAttributesWithAssociations = IBannerModelAttributes & {
|
|
6
|
+
bannerFileStorage?: IFileStorageAttributes;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IBatchSubjectBookAssessmentModelAttributes } from '../interfaces/batchSubjectBookAssessmentInterface';
|
|
3
|
+
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface';
|
|
4
|
+
export type TBatchSubjectBookAssessmentModelCreationAttributes = Optional<IBatchSubjectBookAssessmentModelAttributes, 'id'>;
|
|
5
|
+
export type TBatchSubjectBookAssessmentAttributesWithAssociations = IBatchSubjectBookAssessmentModelAttributes & {
|
|
6
|
+
batchSubjectBookAssessmentFileStorage?: IFileStorageAttributes;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Optional } from 'sequelize';
|
|
2
|
+
import { IBatchSubjectProjectAssessmentModelAttributes } from '../interfaces/batchSubjectProjectAssessmentInterface';
|
|
3
|
+
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface';
|
|
4
|
+
export type TBatchSubjectProjectAssessmentModelCreationAttributes = Optional<IBatchSubjectProjectAssessmentModelAttributes, 'id'>;
|
|
5
|
+
export type TBatchSubjectProjectAssessmentAttributesWithAssociations = IBatchSubjectProjectAssessmentModelAttributes & {
|
|
6
|
+
batchSubjectProjectAssessmentFileStorage?: IFileStorageAttributes;
|
|
7
|
+
};
|