@kipicore/dbcore 1.1.19 → 1.1.21
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/.sequelizerc +13 -0
- package/dist/.sequelizerc +13 -0
- package/dist/configs/aws.js +4 -4
- package/dist/configs/index.d.ts +2 -0
- package/dist/configs/index.js +18 -0
- package/dist/constants/app.js +13 -13
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +21 -0
- package/dist/constants/successMessages.d.ts +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.js +18 -0
- package/dist/helpers/s3Uploader.d.ts +1 -1
- package/dist/helpers/s3Uploader.js +6 -6
- package/dist/helpers/utils.d.ts +3 -3
- package/dist/helpers/utils.js +4 -4
- package/dist/index.d.ts +17 -419
- package/dist/index.js +30 -755
- package/dist/interfaces/academicCalendarInterface.d.ts +2 -2
- package/dist/interfaces/accountHasReceiptDetailsInterface.d.ts +1 -1
- package/dist/interfaces/announcementInterface.d.ts +2 -2
- package/dist/interfaces/approvalRequestInterface.d.ts +2 -2
- package/dist/interfaces/attendanceInterface.d.ts +2 -2
- package/dist/interfaces/bankAccountDetailsInterface.d.ts +2 -2
- package/dist/interfaces/bannerInterface.d.ts +2 -2
- package/dist/interfaces/batchInterface.d.ts +2 -2
- package/dist/interfaces/batchSubjectBookAssessmentInterface.d.ts +1 -1
- package/dist/interfaces/batchSubjectProjectAssessmentInterface.d.ts +1 -1
- package/dist/interfaces/blogInterface.d.ts +2 -2
- package/dist/interfaces/bookAssessmentDateInterface.d.ts +2 -2
- package/dist/interfaces/careerInterface.d.ts +2 -2
- package/dist/interfaces/categoriesInterface.d.ts +2 -2
- package/dist/interfaces/certificatesHistoryInterface.d.ts +1 -1
- package/dist/interfaces/certificatesManagementInterface.d.ts +2 -2
- package/dist/interfaces/cityInterface.d.ts +1 -1
- package/dist/interfaces/classRoomInterface.d.ts +2 -2
- package/dist/interfaces/cloudStorageInterface.d.ts +2 -2
- package/dist/interfaces/coinPurchaseOfferInterface.d.ts +2 -2
- package/dist/interfaces/columnInterface.d.ts +2 -2
- package/dist/interfaces/contactFeedBackInterface.d.ts +2 -2
- package/dist/interfaces/countryInterface.d.ts +1 -1
- package/dist/interfaces/courseHasVisitorsInterface.d.ts +1 -1
- package/dist/interfaces/courseInterface.d.ts +2 -2
- package/dist/interfaces/dailyBookInterface.d.ts +1 -1
- package/dist/interfaces/dashboardManagementInterface.d.ts +2 -2
- package/dist/interfaces/driverInterface.d.ts +2 -2
- package/dist/interfaces/entityGroupInterface.d.ts +2 -2
- package/dist/interfaces/eventInterface.d.ts +2 -2
- package/dist/interfaces/examGroupInterface.d.ts +3 -3
- package/dist/interfaces/examHasAnswerSheetInterface.d.ts +2 -2
- package/dist/interfaces/examInterface.d.ts +2 -2
- package/dist/interfaces/facilityInterface.d.ts +2 -2
- package/dist/interfaces/featureActionInterface.d.ts +2 -2
- package/dist/interfaces/feeHistoryDetailsInterface.d.ts +2 -2
- package/dist/interfaces/feeHistoryInterface.d.ts +2 -2
- package/dist/interfaces/feeReminderInterface.d.ts +1 -1
- package/dist/interfaces/feeReminderSettingInterface.d.ts +2 -2
- package/dist/interfaces/feeReminderTypeInterface.d.ts +2 -2
- package/dist/interfaces/feeTypeHasTermsInterface.d.ts +2 -2
- package/dist/interfaces/feeTypeInterface.d.ts +2 -2
- package/dist/interfaces/feedBackInterface.d.ts +2 -2
- package/dist/interfaces/feesCollectionInterface.d.ts +2 -2
- package/dist/interfaces/fileStorageInterface.d.ts +2 -2
- package/dist/interfaces/floorManagementInterface.d.ts +2 -2
- package/dist/interfaces/generateIdCardInterface.d.ts +1 -1
- package/dist/interfaces/greetingsInterface.d.ts +2 -2
- package/dist/interfaces/holidayInterface.d.ts +2 -2
- package/dist/interfaces/homeworkInterface.d.ts +2 -2
- package/dist/interfaces/index.d.ts +137 -0
- package/dist/interfaces/index.js +153 -0
- package/dist/interfaces/informationSupportInterface.d.ts +2 -2
- package/dist/interfaces/inquiryInterface.d.ts +3 -3
- package/dist/interfaces/instituteEntityInterface.d.ts +2 -2
- package/dist/interfaces/instituteEntityTypeInterface.d.ts +2 -2
- package/dist/interfaces/instituteInterface.d.ts +2 -2
- package/dist/interfaces/instituteSubscriptionPlanInterface.d.ts +2 -2
- package/dist/interfaces/inventoryHistoryInterface.d.ts +2 -2
- package/dist/interfaces/inventoryInterface.d.ts +2 -2
- package/dist/interfaces/invoiceInterface.d.ts +2 -2
- package/dist/interfaces/jobApplyInterface.d.ts +2 -2
- package/dist/interfaces/lectureHistoryInterface.d.ts +2 -2
- package/dist/interfaces/lectureInterface.d.ts +2 -2
- package/dist/interfaces/masterLeaveInterface.d.ts +2 -2
- package/dist/interfaces/moduleFeatureInterface.d.ts +2 -2
- package/dist/interfaces/moduleInterface.d.ts +2 -2
- package/dist/interfaces/offersInterface.d.ts +2 -2
- package/dist/interfaces/paymentTermsInterface.d.ts +2 -2
- package/dist/interfaces/pdcChequeInterface.d.ts +2 -2
- package/dist/interfaces/pdcHistoryInterface.d.ts +2 -2
- package/dist/interfaces/photosGalleryInterface.d.ts +2 -2
- package/dist/interfaces/pincodeInterface.d.ts +1 -1
- package/dist/interfaces/plannerInterface.d.ts +2 -2
- package/dist/interfaces/productInterface.d.ts +2 -2
- package/dist/interfaces/projectAssessmentOptionInterface.d.ts +1 -1
- package/dist/interfaces/replaceTeacherInterface.d.ts +2 -2
- package/dist/interfaces/roleInterface.d.ts +4 -4
- package/dist/interfaces/rulesRegulationInterface.d.ts +2 -2
- package/dist/interfaces/schoolFeeCollectionInterface.d.ts +1 -1
- package/dist/interfaces/schoolFeeInterface.d.ts +2 -2
- package/dist/interfaces/schoolOfferInterface.d.ts +2 -2
- package/dist/interfaces/sendNotificationInerface.d.ts +2 -2
- package/dist/interfaces/slotInterface.d.ts +2 -2
- package/dist/interfaces/stateInterface.d.ts +1 -1
- package/dist/interfaces/subCategoriesInterface.d.ts +2 -2
- package/dist/interfaces/subjectHasFeeInterface.d.ts +1 -1
- package/dist/interfaces/subjectHasPayFeeHistoryInterface.d.ts +1 -1
- package/dist/interfaces/subjectIndexInterface.d.ts +2 -2
- package/dist/interfaces/subscriptionPlanInterface.d.ts +2 -2
- package/dist/interfaces/syllabusInterface.d.ts +2 -2
- package/dist/interfaces/taskManagementInterface.d.ts +2 -2
- package/dist/interfaces/testimonialInterface.d.ts +2 -2
- package/dist/interfaces/toDoInterface.d.ts +2 -2
- package/dist/interfaces/tokenInterface.d.ts +2 -2
- package/dist/interfaces/tripInterface.d.ts +2 -2
- package/dist/interfaces/typeManagementInterface.d.ts +2 -2
- package/dist/interfaces/uniqueNumberCounterInterface.d.ts +2 -2
- package/dist/interfaces/userBookAssessmentInterface.d.ts +2 -2
- package/dist/interfaces/userDetailsInterface.d.ts +2 -2
- package/dist/interfaces/userFeeTypeByAccountInterface.d.ts +2 -2
- package/dist/interfaces/userFeeTypeInterface.d.ts +2 -2
- package/dist/interfaces/userHasAnnouncementInterface.d.ts +2 -2
- package/dist/interfaces/userHasBatchInterface.d.ts +1 -1
- package/dist/interfaces/userHasCourseInterface.d.ts +2 -2
- package/dist/interfaces/userHasDeviceInterface.d.ts +2 -2
- package/dist/interfaces/userHasFeeTermsInterface.d.ts +2 -2
- package/dist/interfaces/userHasFileInterface.d.ts +2 -2
- package/dist/interfaces/userHasHomeWorkInterface.d.ts +2 -2
- package/dist/interfaces/userHasInventoryHistoryInterface.d.ts +2 -2
- package/dist/interfaces/userHasInventoryInterface.d.ts +2 -2
- package/dist/interfaces/userHasLeaveHistoryInterface.d.ts +2 -2
- package/dist/interfaces/userHasLeaveInterface.d.ts +2 -2
- package/dist/interfaces/userHasOfferInterface.d.ts +1 -1
- package/dist/interfaces/userHasParentInterface.d.ts +2 -2
- package/dist/interfaces/userHasRoleInterface.d.ts +2 -2
- package/dist/interfaces/userHasRollNumberInterface.d.ts +1 -1
- package/dist/interfaces/userHasStorageInterface.d.ts +2 -2
- package/dist/interfaces/userHasSubjectFeeInterface.d.ts +1 -1
- package/dist/interfaces/userInstituteMetaInterface.d.ts +2 -2
- package/dist/interfaces/userInterface.d.ts +2 -2
- package/dist/interfaces/userLeaveRequestInterface.d.ts +2 -2
- package/dist/interfaces/userMetaInterface.d.ts +2 -2
- package/dist/interfaces/userPayoutDetailsInterface.d.ts +2 -2
- package/dist/interfaces/userPayoutHistoryInterface.d.ts +2 -2
- package/dist/interfaces/userPayoutInterface.d.ts +2 -2
- package/dist/interfaces/userProjectAssessmentOptionInterface.d.ts +2 -2
- package/dist/interfaces/userRequiredStepsInterface.d.ts +2 -2
- package/dist/interfaces/userSchoolMetaInterface.d.ts +2 -2
- package/dist/interfaces/vehicleInterface.d.ts +2 -2
- package/dist/interfaces/vendorManagementInterface.d.ts +2 -2
- package/dist/interfaces/videoAnalystInterface.d.ts +1 -1
- package/dist/interfaces/walletHistoryInterface.d.ts +2 -2
- package/dist/interfaces/walletInterface.d.ts +2 -2
- package/dist/interfaces/walletTransactionInterface.d.ts +3 -3
- package/dist/interfaces/workingDayInterface.d.ts +2 -2
- package/dist/interfaces/workingShiftInterface.d.ts +2 -2
- package/dist/models/mongodb/approvalRequestModel.d.ts +1 -1
- package/dist/models/mongodb/approvalRequestModel.js +4 -4
- package/dist/models/mongodb/attendanceModel.d.ts +1 -1
- package/dist/models/mongodb/attendanceModel.js +23 -23
- package/dist/models/mongodb/blogModel.d.ts +1 -1
- package/dist/models/mongodb/blogModel.js +3 -3
- package/dist/models/mongodb/careerModel.d.ts +1 -1
- package/dist/models/mongodb/careerModel.js +3 -3
- package/dist/models/mongodb/certificatesHistoryModel.d.ts +1 -1
- package/dist/models/mongodb/certificatesManagementModel.d.ts +1 -1
- package/dist/models/mongodb/certificatesManagementModel.js +3 -3
- package/dist/models/mongodb/columnModel.d.ts +1 -1
- package/dist/models/mongodb/columnModel.js +5 -5
- package/dist/models/mongodb/dailyBookModel.d.ts +1 -1
- package/dist/models/mongodb/dashboardManagementModel.d.ts +1 -1
- package/dist/models/mongodb/dashboardManagementModel.js +6 -6
- package/dist/models/mongodb/eventModel.d.ts +1 -1
- package/dist/models/mongodb/eventModel.js +15 -15
- package/dist/models/mongodb/examGroupModel.d.ts +1 -1
- package/dist/models/mongodb/examGroupModel.js +18 -18
- package/dist/models/mongodb/examHasAnswerSheetModel.d.ts +1 -1
- package/dist/models/mongodb/examHasAnswerSheetModel.js +12 -12
- package/dist/models/mongodb/examModel.d.ts +1 -1
- package/dist/models/mongodb/examModel.js +28 -28
- package/dist/models/mongodb/feeReminderTypeModel.d.ts +1 -1
- package/dist/models/mongodb/feeReminderTypeModel.js +3 -3
- package/dist/models/mongodb/feedBackModel.d.ts +1 -1
- package/dist/models/mongodb/feedBackModel.js +3 -3
- package/dist/models/mongodb/generateIdCardModel.d.ts +1 -1
- package/dist/models/mongodb/holidayModel.d.ts +1 -1
- package/dist/models/mongodb/holidayModel.js +15 -15
- package/dist/models/mongodb/index.d.ts +36 -2
- package/dist/models/mongodb/index.js +60 -10
- package/dist/models/mongodb/informationSupportModel.d.ts +1 -1
- package/dist/models/mongodb/informationSupportModel.js +2 -2
- package/dist/models/mongodb/inquiryModel.d.ts +1 -1
- package/dist/models/mongodb/inquiryModel.js +18 -18
- package/dist/models/mongodb/invoiceModel.d.ts +1 -1
- package/dist/models/mongodb/invoiceModel.js +7 -7
- package/dist/models/mongodb/jobApplyModel.d.ts +1 -1
- package/dist/models/mongodb/jobApplyModel.js +7 -7
- package/dist/models/mongodb/photosGalleryModel.d.ts +1 -1
- package/dist/models/mongodb/photosGalleryModel.js +6 -6
- package/dist/models/mongodb/plannerModel.d.ts +1 -1
- package/dist/models/mongodb/plannerModel.js +3 -3
- package/dist/models/mongodb/replaceTeacherModel.d.ts +1 -1
- package/dist/models/mongodb/replaceTeacherModel.js +6 -6
- package/dist/models/mongodb/schoolFeeModel.d.ts +1 -1
- package/dist/models/mongodb/schoolFeeModel.js +12 -12
- package/dist/models/mongodb/subjectIndexModel.d.ts +1 -1
- package/dist/models/mongodb/subjectIndexModel.js +88 -88
- package/dist/models/mongodb/subscriptionPlanModel.d.ts +1 -1
- package/dist/models/mongodb/subscriptionPlanModel.js +6 -6
- package/dist/models/mongodb/taskManagementModel.d.ts +1 -1
- package/dist/models/mongodb/taskManagementModel.js +10 -10
- package/dist/models/mongodb/uniqueNumberCounterModel.d.ts +1 -1
- package/dist/models/mongodb/uniqueNumberCounterModel.js +3 -3
- package/dist/models/mongodb/userDetailsModel.d.ts +1 -1
- package/dist/models/mongodb/userDetailsModel.js +19 -19
- package/dist/models/mongodb/userInstituteMetaModel.d.ts +1 -1
- package/dist/models/mongodb/userInstituteMetaModel.js +14 -14
- package/dist/models/mongodb/userSchoolMetaModel.d.ts +1 -1
- package/dist/models/mongodb/userSchoolMetaModel.js +30 -30
- package/dist/models/mongodb/videoAnalystModel.d.ts +1 -1
- package/dist/models/mongodb/walletTransactionModel.d.ts +1 -1
- package/dist/models/mongodb/walletTransactionModel.js +12 -12
- package/dist/models/psql/SubCategoriesModel.d.ts +3 -3
- package/dist/models/psql/SubCategoriesModel.js +14 -14
- package/dist/models/psql/academicCalendarModel.d.ts +3 -3
- package/dist/models/psql/academicCalendarModel.js +13 -13
- package/dist/models/psql/accountHasReceiptDetailsModel.d.ts +2 -2
- package/dist/models/psql/accountHasReceiptDetailsModel.js +15 -15
- package/dist/models/psql/announcementModel.d.ts +3 -3
- package/dist/models/psql/announcementModel.js +30 -30
- package/dist/models/psql/areaModel.d.ts +2 -2
- package/dist/models/psql/areaModel.js +5 -5
- package/dist/models/psql/bankAccountDetailsModel.d.ts +3 -3
- package/dist/models/psql/bankAccountDetailsModel.js +16 -16
- package/dist/models/psql/bannerModel.d.ts +3 -3
- package/dist/models/psql/bannerModel.js +20 -20
- package/dist/models/psql/batchModel.d.ts +3 -3
- package/dist/models/psql/batchModel.js +27 -27
- package/dist/models/psql/batchSubjectBookAssessmentModel.d.ts +2 -2
- package/dist/models/psql/batchSubjectBookAssessmentModel.js +20 -20
- package/dist/models/psql/batchSubjectProjectAssessmentModel.d.ts +2 -2
- package/dist/models/psql/batchSubjectProjectAssessmentModel.js +17 -17
- package/dist/models/psql/bookAssessmentDateModel.d.ts +3 -3
- package/dist/models/psql/bookAssessmentDateModel.js +12 -12
- package/dist/models/psql/categoriesModel.d.ts +3 -3
- package/dist/models/psql/categoriesModel.js +11 -11
- package/dist/models/psql/cityModel.d.ts +1 -1
- package/dist/models/psql/cityModel.js +8 -8
- package/dist/models/psql/classRoomModel.d.ts +3 -3
- package/dist/models/psql/classRoomModel.js +18 -18
- package/dist/models/psql/cloudStorageModel.d.ts +3 -3
- package/dist/models/psql/cloudStorageModel.js +10 -10
- package/dist/models/psql/coinPurchaseOfferModel.d.ts +3 -3
- package/dist/models/psql/coinPurchaseOfferModel.js +10 -10
- package/dist/models/psql/contactFeedBackModel.d.ts +3 -3
- package/dist/models/psql/contactFeedBackModel.js +16 -16
- package/dist/models/psql/countryModel.d.ts +1 -1
- package/dist/models/psql/countryModel.js +2 -2
- package/dist/models/psql/courseHasVisitorsModel.d.ts +2 -2
- package/dist/models/psql/courseHasVisitorsModel.js +9 -9
- package/dist/models/psql/courseModel.d.ts +3 -3
- package/dist/models/psql/courseModel.js +18 -18
- package/dist/models/psql/driverModel.d.ts +3 -3
- package/dist/models/psql/driverModel.js +25 -25
- package/dist/models/psql/entityGroupModel.d.ts +3 -3
- package/dist/models/psql/entityGroupModel.js +12 -12
- package/dist/models/psql/facilityModel.d.ts +3 -3
- package/dist/models/psql/facilityModel.js +20 -20
- package/dist/models/psql/featureActionModel.d.ts +3 -3
- package/dist/models/psql/featureActionModel.js +10 -10
- package/dist/models/psql/feeHistoryDetailsModel.d.ts +3 -3
- package/dist/models/psql/feeHistoryDetailsModel.js +23 -23
- package/dist/models/psql/feeHistoryModel.d.ts +3 -3
- package/dist/models/psql/feeHistoryModel.js +49 -49
- package/dist/models/psql/feeReminderModel.d.ts +2 -2
- package/dist/models/psql/feeReminderModel.js +41 -41
- package/dist/models/psql/feeReminderSettingModel.d.ts +3 -3
- package/dist/models/psql/feeReminderSettingModel.js +14 -14
- package/dist/models/psql/feeTypeHasTermsModel.d.ts +3 -3
- package/dist/models/psql/feeTypeHasTermsModel.js +14 -14
- package/dist/models/psql/feeTypeModel.d.ts +3 -3
- package/dist/models/psql/feeTypeModel.js +24 -24
- package/dist/models/psql/feesCollectionModel.d.ts +3 -3
- package/dist/models/psql/feesCollectionModel.js +30 -30
- package/dist/models/psql/fileStorageModel.d.ts +2 -2
- package/dist/models/psql/fileStorageModel.js +8 -8
- package/dist/models/psql/floorManagementModel.d.ts +3 -3
- package/dist/models/psql/floorManagementModel.js +11 -11
- package/dist/models/psql/greetingsModel.d.ts +3 -3
- package/dist/models/psql/greetingsModel.js +17 -17
- package/dist/models/psql/homeWorkModel.d.ts +3 -3
- package/dist/models/psql/homeWorkModel.js +18 -18
- package/dist/models/psql/index.js +2 -2
- package/dist/models/psql/instituteEntityModel.d.ts +3 -3
- package/dist/models/psql/instituteEntityModel.js +14 -14
- package/dist/models/psql/instituteEntityTypeModel.d.ts +3 -3
- package/dist/models/psql/instituteEntityTypeModel.js +10 -10
- package/dist/models/psql/instituteModel.d.ts +3 -3
- package/dist/models/psql/instituteModel.js +30 -30
- package/dist/models/psql/instituteSubscriptionPlanModel.d.ts +3 -3
- package/dist/models/psql/instituteSubscriptionPlanModel.js +16 -16
- package/dist/models/psql/inventoryHistoryModel.d.ts +3 -3
- package/dist/models/psql/inventoryHistoryModel.js +20 -20
- package/dist/models/psql/inventoryModel.d.ts +3 -3
- package/dist/models/psql/inventoryModel.js +16 -16
- package/dist/models/psql/lectureHistoryModel.d.ts +3 -3
- package/dist/models/psql/lectureHistoryModel.js +33 -33
- package/dist/models/psql/lectureModel.d.ts +3 -3
- package/dist/models/psql/lectureModel.js +74 -74
- package/dist/models/psql/masterLeaveModel.d.ts +3 -3
- package/dist/models/psql/masterLeaveModel.js +23 -23
- package/dist/models/psql/modelIndex.d.ts +101 -0
- package/dist/models/psql/modelIndex.js +117 -0
- package/dist/models/psql/moduleFeatureModel.d.ts +3 -3
- package/dist/models/psql/moduleFeatureModel.js +12 -12
- package/dist/models/psql/moduleModel.d.ts +3 -3
- package/dist/models/psql/moduleModel.js +14 -14
- package/dist/models/psql/offerModel.d.ts +3 -3
- package/dist/models/psql/offerModel.js +16 -16
- package/dist/models/psql/paymentTermsModel.d.ts +2 -2
- package/dist/models/psql/paymentTermsModel.js +15 -15
- package/dist/models/psql/pdcChequeModel.d.ts +3 -3
- package/dist/models/psql/pdcChequeModel.js +19 -19
- package/dist/models/psql/pdcHistoryModel.d.ts +3 -3
- package/dist/models/psql/pdcHistoryModel.js +22 -22
- package/dist/models/psql/pincodeModel.d.ts +1 -1
- package/dist/models/psql/pincodeModel.js +8 -8
- package/dist/models/psql/productModel.d.ts +3 -3
- package/dist/models/psql/productModel.js +17 -17
- package/dist/models/psql/projectAssessmentOptionModel.d.ts +2 -2
- package/dist/models/psql/projectAssessmentOptionModel.js +9 -9
- package/dist/models/psql/roleModel.d.ts +3 -3
- package/dist/models/psql/roleModel.js +9 -9
- package/dist/models/psql/rulesRegulationModel.d.ts +3 -3
- package/dist/models/psql/rulesRegulationModel.js +8 -8
- package/dist/models/psql/schoolFeeCollectionModel.d.ts +2 -2
- package/dist/models/psql/schoolFeeCollectionModel.js +14 -14
- package/dist/models/psql/schoolOfferModel.d.ts +3 -3
- package/dist/models/psql/schoolOfferModel.js +18 -18
- package/dist/models/psql/sendNotificationModel.d.ts +3 -3
- package/dist/models/psql/sendNotificationModel.js +14 -14
- package/dist/models/psql/slotModel.d.ts +3 -3
- package/dist/models/psql/slotModel.js +14 -14
- package/dist/models/psql/stateModel.d.ts +1 -1
- package/dist/models/psql/stateModel.js +5 -5
- package/dist/models/psql/subjectHasFeeModel.d.ts +2 -2
- package/dist/models/psql/subjectHasFeeModel.js +12 -12
- package/dist/models/psql/subjectHasPayFeeHistoryModel.d.ts +2 -2
- package/dist/models/psql/subjectHasPayFeeHistoryModel.js +17 -17
- package/dist/models/psql/syllabusModel.d.ts +3 -3
- package/dist/models/psql/syllabusModel.js +17 -17
- package/dist/models/psql/testimonialModel.d.ts +3 -3
- package/dist/models/psql/testimonialModel.js +31 -31
- package/dist/models/psql/toDoModel.d.ts +3 -3
- package/dist/models/psql/toDoModel.js +19 -19
- package/dist/models/psql/tokenModel.d.ts +2 -2
- package/dist/models/psql/tokenModel.js +2 -2
- package/dist/models/psql/tripModel.d.ts +3 -3
- package/dist/models/psql/tripModel.js +16 -16
- package/dist/models/psql/typeManagementModel.d.ts +3 -3
- package/dist/models/psql/typeManagementModel.js +16 -16
- package/dist/models/psql/userBookAssessmentModel.d.ts +3 -3
- package/dist/models/psql/userBookAssessmentModel.js +20 -20
- package/dist/models/psql/userFeeTypeByAccountModel.d.ts +2 -2
- package/dist/models/psql/userFeeTypeByAccountModel.js +22 -22
- package/dist/models/psql/userFeeTypeModel.d.ts +3 -3
- package/dist/models/psql/userFeeTypeModel.js +23 -23
- package/dist/models/psql/userHasAnnouncementModel.d.ts +3 -3
- package/dist/models/psql/userHasAnnouncementModel.js +17 -17
- package/dist/models/psql/userHasBatchModel.d.ts +2 -2
- package/dist/models/psql/userHasBatchModel.js +11 -11
- package/dist/models/psql/userHasCourseModel.d.ts +3 -3
- package/dist/models/psql/userHasCourseModel.js +17 -17
- package/dist/models/psql/userHasDeviceModel.d.ts +3 -3
- package/dist/models/psql/userHasDeviceModel.js +11 -11
- package/dist/models/psql/userHasFeeTermsModel.d.ts +3 -3
- package/dist/models/psql/userHasFeeTermsModel.js +23 -23
- package/dist/models/psql/userHasFileModel.d.ts +2 -2
- package/dist/models/psql/userHasFileModel.js +15 -15
- package/dist/models/psql/userHasHomeWorkModel.d.ts +3 -3
- package/dist/models/psql/userHasHomeWorkModel.js +20 -20
- package/dist/models/psql/userHasInventoryHistoryModel.d.ts +3 -3
- package/dist/models/psql/userHasInventoryHistoryModel.js +16 -16
- package/dist/models/psql/userHasInventoryModel.d.ts +3 -3
- package/dist/models/psql/userHasInventoryModel.js +19 -19
- package/dist/models/psql/userHasLeaveHistoryModel.d.ts +3 -3
- package/dist/models/psql/userHasLeaveHistoryModel.js +20 -20
- package/dist/models/psql/userHasLeaveModel.d.ts +3 -3
- package/dist/models/psql/userHasLeaveModel.js +17 -17
- package/dist/models/psql/userHasOfferModel.d.ts +2 -2
- package/dist/models/psql/userHasOfferModel.js +20 -20
- package/dist/models/psql/userHasParentModel.d.ts +3 -3
- package/dist/models/psql/userHasParentModel.js +12 -12
- package/dist/models/psql/userHasRoleModel.d.ts +3 -3
- package/dist/models/psql/userHasRoleModel.js +13 -13
- package/dist/models/psql/userHasRollNumberModel.d.ts +2 -2
- package/dist/models/psql/userHasRollNumberModel.js +14 -14
- package/dist/models/psql/userHasStorageModel.d.ts +3 -3
- package/dist/models/psql/userHasStorageModel.js +11 -11
- package/dist/models/psql/userHasSubjectFeeModel.d.ts +2 -2
- package/dist/models/psql/userHasSubjectFeeModel.js +12 -12
- package/dist/models/psql/userLeaveRequestModel.d.ts +3 -3
- package/dist/models/psql/userLeaveRequestModel.js +23 -23
- package/dist/models/psql/userModel.d.ts +3 -3
- package/dist/models/psql/userModel.js +43 -43
- package/dist/models/psql/userPayoutDetailsModel.d.ts +3 -3
- package/dist/models/psql/userPayoutDetailsModel.js +22 -22
- package/dist/models/psql/userPayoutHistoryModel.d.ts +3 -3
- package/dist/models/psql/userPayoutHistoryModel.js +17 -17
- package/dist/models/psql/userPayoutModel.d.ts +3 -3
- package/dist/models/psql/userPayoutModel.js +31 -31
- package/dist/models/psql/userProjectAssessmentOptionModel.d.ts +3 -3
- package/dist/models/psql/userProjectAssessmentOptionModel.js +17 -17
- package/dist/models/psql/userRequiredStepsModel.d.ts +2 -2
- package/dist/models/psql/userRequiredStepsModel.js +8 -8
- package/dist/models/psql/vehicleModel.d.ts +3 -3
- package/dist/models/psql/vehicleModel.js +14 -14
- package/dist/models/psql/vendorManagementModel.d.ts +3 -3
- package/dist/models/psql/vendorManagementModel.js +20 -20
- package/dist/models/psql/walletHistoryModel.d.ts +3 -3
- package/dist/models/psql/walletHistoryModel.js +13 -13
- package/dist/models/psql/walletModel.d.ts +3 -3
- package/dist/models/psql/walletModel.js +10 -10
- package/dist/models/psql/workingDayModel.d.ts +3 -3
- package/dist/models/psql/workingDayModel.js +8 -8
- package/dist/models/psql/workingShiftModel.d.ts +3 -3
- package/dist/models/psql/workingShiftModel.js +17 -17
- package/dist/services/Concrete/mongooseCommonService.d.ts +2 -2
- package/dist/services/Concrete/mongooseCommonService.js +4 -4
- package/dist/services/Concrete/sequelizeCommonService.d.ts +2 -2
- package/dist/services/Concrete/sequelizeCommonService.js +5 -5
- package/dist/services/Contracts/IMongooseCommonService.d.ts +1 -1
- package/dist/services/Contracts/ISequelizeCommonService.d.ts +1 -1
- package/dist/types/academicCalendarType.d.ts +1 -1
- package/dist/types/accountHasReceiptDetailsType.d.ts +2 -2
- package/dist/types/announcementType.d.ts +1 -1
- package/dist/types/approveRequestType.d.ts +1 -1
- package/dist/types/areaType.d.ts +1 -1
- package/dist/types/attendanceType.d.ts +1 -1
- package/dist/types/bankAccountDetailsType.d.ts +1 -1
- package/dist/types/bannerType.d.ts +2 -2
- package/dist/types/batchSubjectBookAssessmentType.d.ts +2 -2
- package/dist/types/batchSubjectProjectAssessmentType.d.ts +2 -2
- package/dist/types/batchType.d.ts +2 -2
- package/dist/types/blogType.d.ts +1 -1
- package/dist/types/bookAssessmentDateType.d.ts +2 -2
- package/dist/types/careerType.d.ts +1 -1
- package/dist/types/categoriesType.d.ts +1 -1
- package/dist/types/certificatesHistoryType.d.ts +1 -1
- package/dist/types/certificatesManagementType.d.ts +1 -1
- package/dist/types/classRoomType.d.ts +1 -1
- package/dist/types/cloudStorageType.d.ts +1 -1
- package/dist/types/coinPurchaseOfferType.d.ts +1 -1
- package/dist/types/contactFeedBackType.d.ts +1 -1
- package/dist/types/courseHasVisitorsType.d.ts +1 -1
- package/dist/types/courseType.d.ts +1 -1
- package/dist/types/dailyBookType.d.ts +1 -1
- package/dist/types/dashboardManagementType.d.ts +1 -1
- package/dist/types/driverType.d.ts +2 -2
- package/dist/types/entityGroupType.d.ts +1 -1
- package/dist/types/eventType.d.ts +1 -1
- package/dist/types/examGroupType.d.ts +1 -1
- package/dist/types/examHasAnswerSheetType.d.ts +1 -1
- package/dist/types/examType.d.ts +2 -2
- package/dist/types/facilityType.d.ts +1 -1
- package/dist/types/featureActionType.d.ts +1 -1
- package/dist/types/feeHistoryDetailsType.d.ts +2 -2
- package/dist/types/feeHistoryType.d.ts +3 -3
- package/dist/types/feeReminderSettingType.d.ts +1 -1
- package/dist/types/feeReminderType.d.ts +1 -1
- package/dist/types/feeReminderTypeType.d.ts +1 -1
- package/dist/types/feeTypeHasTermsType.d.ts +1 -1
- package/dist/types/feeTypeType.d.ts +1 -1
- package/dist/types/feedBackType.d.ts +1 -1
- package/dist/types/feesCollectionType.d.ts +1 -1
- package/dist/types/fileStorageType.d.ts +1 -1
- package/dist/types/floormanagementType.d.ts +1 -1
- package/dist/types/generateIdCardType.d.ts +1 -1
- package/dist/types/greetingsType.d.ts +2 -2
- package/dist/types/holidayType.d.ts +1 -1
- package/dist/types/homeWorkType.d.ts +1 -1
- package/dist/types/index.d.ts +129 -0
- package/dist/types/index.js +145 -0
- package/dist/types/informationSupportType.d.ts +1 -1
- package/dist/types/inquiryType.d.ts +1 -1
- package/dist/types/instituteEntityType.d.ts +1 -1
- package/dist/types/instituteEntityTypeType.d.ts +1 -1
- package/dist/types/instituteSubscriptionPlanType.d.ts +1 -1
- package/dist/types/instituteType.d.ts +1 -1
- package/dist/types/inventoryHistoryType.d.ts +1 -1
- package/dist/types/inventoryType.d.ts +1 -1
- package/dist/types/jobApply.d.ts +1 -1
- package/dist/types/lectureHistoryType.d.ts +2 -2
- package/dist/types/lectureType.d.ts +2 -2
- package/dist/types/masterLeaveType.d.ts +1 -1
- package/dist/types/moduleFeatureType.d.ts +1 -1
- package/dist/types/moduleType.d.ts +1 -1
- package/dist/types/offerType.d.ts +1 -1
- package/dist/types/paymentTermsType.d.ts +1 -1
- package/dist/types/pdcChequeType.d.ts +2 -2
- package/dist/types/pdcHistoryType.d.ts +1 -1
- package/dist/types/photosGalleryType.d.ts +1 -1
- package/dist/types/plannerType.d.ts +1 -1
- package/dist/types/productType.d.ts +1 -1
- package/dist/types/projectAssessmentOptionType.d.ts +2 -2
- package/dist/types/roleType.d.ts +4 -4
- package/dist/types/rulesRegulationType.d.ts +1 -1
- package/dist/types/schoolFeeCollectionType.d.ts +1 -1
- package/dist/types/schoolFeeType.d.ts +1 -1
- package/dist/types/schoolOfferType.d.ts +1 -1
- package/dist/types/sendNotificationType.d.ts +1 -1
- package/dist/types/slotType.d.ts +1 -1
- package/dist/types/subCategoryType.d.ts +1 -1
- package/dist/types/subjectHasFeeType.d.ts +1 -1
- package/dist/types/subjectHasPayFeeHistoryType.d.ts +1 -1
- package/dist/types/subjectIndexType.d.ts +2 -2
- package/dist/types/subscriptionPlanType.d.ts +1 -1
- package/dist/types/syllabusType.d.ts +2 -2
- package/dist/types/taskManagementType.d.ts +1 -1
- package/dist/types/testimonialType.d.ts +2 -2
- package/dist/types/toDoType.d.ts +2 -2
- package/dist/types/tripType.d.ts +1 -1
- package/dist/types/typeManagementType.d.ts +1 -1
- package/dist/types/uniqueNumberCounterType.d.ts +1 -1
- package/dist/types/userBookAssessmentType.d.ts +2 -2
- package/dist/types/userDetailsType.d.ts +1 -1
- package/dist/types/userFeeTypeByAccountType.d.ts +1 -1
- package/dist/types/userFeeTypeType.d.ts +1 -1
- package/dist/types/userHasAnnouncementType.d.ts +1 -1
- package/dist/types/userHasBatchType.d.ts +3 -3
- package/dist/types/userHasCourseType.d.ts +1 -1
- package/dist/types/userHasDeviceType.d.ts +1 -1
- package/dist/types/userHasFeeTermsType.d.ts +1 -1
- package/dist/types/userHasFileType.d.ts +1 -1
- package/dist/types/userHasHomeWorkType.d.ts +1 -1
- package/dist/types/userHasInventoryHistoryType.d.ts +1 -1
- package/dist/types/userHasInventoryType.d.ts +1 -1
- package/dist/types/userHasLeaveHistoryType.d.ts +1 -1
- package/dist/types/userHasLeaveType.d.ts +1 -1
- package/dist/types/userHasOffer.d.ts +1 -1
- package/dist/types/userHasParentType.d.ts +1 -1
- package/dist/types/userHasRoleType.d.ts +1 -1
- package/dist/types/userHasRollNumberType.d.ts +1 -1
- package/dist/types/userHasStorageType.d.ts +1 -1
- package/dist/types/userHasSubjectFeeType.d.ts +1 -1
- package/dist/types/userInstituteMetaType.d.ts +1 -1
- package/dist/types/userLeaveRequestType.d.ts +1 -1
- package/dist/types/userMetaType.d.ts +2 -2
- package/dist/types/userPayoutDetailsType.d.ts +1 -1
- package/dist/types/userPayoutHistoryType.d.ts +1 -1
- package/dist/types/userPayoutType.d.ts +2 -2
- package/dist/types/userProjectAssessmentOptionType.d.ts +2 -2
- package/dist/types/userRequiredStepsType.d.ts +1 -1
- package/dist/types/userSchoolMetaType.d.ts +1 -1
- package/dist/types/userType.d.ts +3 -3
- package/dist/types/vehicleType.d.ts +1 -1
- package/dist/types/vendorType.d.ts +1 -1
- package/dist/types/videoAnalystType.d.ts +1 -1
- package/dist/types/walletHistoryType.d.ts +1 -1
- package/dist/types/walletTransactionType.d.ts +1 -1
- package/dist/types/walletType.d.ts +1 -1
- package/dist/types/workingDayType.d.ts +1 -1
- package/dist/types/workingShiftType.d.ts +1 -1
- package/package.json +5 -4
- /package/dist/interfaces/{commanInterface.d.ts → commonInterface.d.ts} +0 -0
- /package/dist/interfaces/{commanInterface.js → commonInterface.js} +0 -0
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
|
+
const instituteModel_1 = __importDefault(require("./instituteModel"));
|
|
11
|
+
const fileStorageModel_1 = __importDefault(require("./fileStorageModel"));
|
|
12
12
|
class VehicleModel extends sequelize_1.Model {
|
|
13
13
|
}
|
|
14
14
|
VehicleModel.init({
|
|
@@ -24,9 +24,9 @@ VehicleModel.init({
|
|
|
24
24
|
},
|
|
25
25
|
status: {
|
|
26
26
|
type: sequelize_1.DataTypes.ENUM,
|
|
27
|
-
values: Object.values(
|
|
27
|
+
values: Object.values(app_1.COMMAN_STATUS),
|
|
28
28
|
allowNull: false,
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
30
30
|
},
|
|
31
31
|
number: {
|
|
32
32
|
type: sequelize_1.DataTypes.STRING,
|
|
@@ -59,23 +59,23 @@ VehicleModel.init({
|
|
|
59
59
|
where: { deleted_at: null },
|
|
60
60
|
},
|
|
61
61
|
],
|
|
62
|
-
sequelize:
|
|
62
|
+
sequelize: index_1.sequelize,
|
|
63
63
|
});
|
|
64
|
-
VehicleModel.belongsTo(
|
|
64
|
+
VehicleModel.belongsTo(instituteModel_1.default, {
|
|
65
65
|
foreignKey: {
|
|
66
66
|
name: 'instituteId',
|
|
67
67
|
field: 'institute_id',
|
|
68
68
|
},
|
|
69
69
|
as: 'vehicleInstitute',
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
instituteModel_1.default.hasMany(VehicleModel, {
|
|
72
72
|
foreignKey: {
|
|
73
73
|
name: 'instituteId',
|
|
74
74
|
field: 'institute_id',
|
|
75
75
|
},
|
|
76
76
|
as: 'instituteVehicleList',
|
|
77
77
|
});
|
|
78
|
-
VehicleModel.belongsTo(
|
|
78
|
+
VehicleModel.belongsTo(fileStorageModel_1.default, {
|
|
79
79
|
foreignKey: {
|
|
80
80
|
name: 'rcBookFileId',
|
|
81
81
|
field: 'rc_book_file_id',
|
|
@@ -83,7 +83,7 @@ VehicleModel.belongsTo(fileStorageModel_js_1.default, {
|
|
|
83
83
|
as: 'vehicleRcBookFile',
|
|
84
84
|
});
|
|
85
85
|
// Associations
|
|
86
|
-
VehicleModel.belongsTo(
|
|
86
|
+
VehicleModel.belongsTo(userModel_1.default, {
|
|
87
87
|
foreignKey: {
|
|
88
88
|
name: 'createdBy',
|
|
89
89
|
allowNull: true,
|
|
@@ -91,7 +91,7 @@ VehicleModel.belongsTo(userModel_js_1.default, {
|
|
|
91
91
|
},
|
|
92
92
|
as: 'createdByUser',
|
|
93
93
|
});
|
|
94
|
-
VehicleModel.belongsTo(
|
|
94
|
+
VehicleModel.belongsTo(userModel_1.default, {
|
|
95
95
|
foreignKey: {
|
|
96
96
|
name: 'updatedBy',
|
|
97
97
|
allowNull: true,
|
|
@@ -99,7 +99,7 @@ VehicleModel.belongsTo(userModel_js_1.default, {
|
|
|
99
99
|
},
|
|
100
100
|
as: 'updatedByUser',
|
|
101
101
|
});
|
|
102
|
-
VehicleModel.belongsTo(
|
|
102
|
+
VehicleModel.belongsTo(userModel_1.default, {
|
|
103
103
|
foreignKey: {
|
|
104
104
|
name: 'deletedBy',
|
|
105
105
|
allowNull: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { TVendorCreationAttributes } from '../../types/vendorType
|
|
3
|
-
import { IVendorModelAttributes } from '../../interfaces/vendorManagementInterface
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app
|
|
2
|
+
import { TVendorCreationAttributes } from '../../types/vendorType';
|
|
3
|
+
import { IVendorModelAttributes } from '../../interfaces/vendorManagementInterface';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
declare class VendorManagementModel extends Model<IVendorModelAttributes, TVendorCreationAttributes> {
|
|
6
6
|
status: COMMAN_STATUS;
|
|
7
7
|
name: string;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
7
|
+
const app_1 = require("../../constants/app");
|
|
8
|
+
const index_1 = require("./index");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
|
+
const instituteModel_1 = __importDefault(require("./instituteModel"));
|
|
11
|
+
const cityModel_1 = __importDefault(require("./cityModel"));
|
|
12
|
+
const stateModel_1 = __importDefault(require("./stateModel"));
|
|
13
|
+
const countryModel_1 = __importDefault(require("./countryModel"));
|
|
14
14
|
class VendorManagementModel extends sequelize_1.Model {
|
|
15
15
|
}
|
|
16
16
|
VendorManagementModel.init({
|
|
@@ -23,7 +23,7 @@ VendorManagementModel.init({
|
|
|
23
23
|
status: {
|
|
24
24
|
type: sequelize_1.DataTypes.STRING,
|
|
25
25
|
allowNull: true,
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
27
27
|
},
|
|
28
28
|
name: {
|
|
29
29
|
type: sequelize_1.DataTypes.STRING,
|
|
@@ -86,9 +86,9 @@ VendorManagementModel.init({
|
|
|
86
86
|
modelName: 'VendorManagement',
|
|
87
87
|
tableName: 'vendor_management',
|
|
88
88
|
timestamps: true,
|
|
89
|
-
sequelize:
|
|
89
|
+
sequelize: index_1.sequelize,
|
|
90
90
|
});
|
|
91
|
-
VendorManagementModel.belongsTo(
|
|
91
|
+
VendorManagementModel.belongsTo(userModel_1.default, {
|
|
92
92
|
foreignKey: {
|
|
93
93
|
name: 'createdBy',
|
|
94
94
|
allowNull: true,
|
|
@@ -96,7 +96,7 @@ VendorManagementModel.belongsTo(userModel_js_1.default, {
|
|
|
96
96
|
},
|
|
97
97
|
as: 'createdByUser',
|
|
98
98
|
});
|
|
99
|
-
VendorManagementModel.belongsTo(
|
|
99
|
+
VendorManagementModel.belongsTo(userModel_1.default, {
|
|
100
100
|
foreignKey: {
|
|
101
101
|
name: 'updatedBy',
|
|
102
102
|
allowNull: true,
|
|
@@ -104,7 +104,7 @@ VendorManagementModel.belongsTo(userModel_js_1.default, {
|
|
|
104
104
|
},
|
|
105
105
|
as: 'updatedByUser',
|
|
106
106
|
});
|
|
107
|
-
VendorManagementModel.belongsTo(
|
|
107
|
+
VendorManagementModel.belongsTo(userModel_1.default, {
|
|
108
108
|
foreignKey: {
|
|
109
109
|
name: 'deletedBy',
|
|
110
110
|
allowNull: true,
|
|
@@ -112,7 +112,7 @@ VendorManagementModel.belongsTo(userModel_js_1.default, {
|
|
|
112
112
|
},
|
|
113
113
|
as: 'deletedByUser',
|
|
114
114
|
});
|
|
115
|
-
VendorManagementModel.belongsTo(
|
|
115
|
+
VendorManagementModel.belongsTo(instituteModel_1.default, {
|
|
116
116
|
foreignKey: {
|
|
117
117
|
name: 'instituteId',
|
|
118
118
|
allowNull: true,
|
|
@@ -120,7 +120,7 @@ VendorManagementModel.belongsTo(instituteModel_js_1.default, {
|
|
|
120
120
|
},
|
|
121
121
|
as: 'instituteVendor',
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
instituteModel_1.default.hasMany(VendorManagementModel, {
|
|
124
124
|
foreignKey: {
|
|
125
125
|
name: 'instituteId',
|
|
126
126
|
allowNull: true,
|
|
@@ -128,7 +128,7 @@ instituteModel_js_1.default.hasMany(VendorManagementModel, {
|
|
|
128
128
|
},
|
|
129
129
|
as: 'vendorInstitute',
|
|
130
130
|
});
|
|
131
|
-
VendorManagementModel.belongsTo(
|
|
131
|
+
VendorManagementModel.belongsTo(cityModel_1.default, {
|
|
132
132
|
foreignKey: {
|
|
133
133
|
name: 'cityId',
|
|
134
134
|
allowNull: true,
|
|
@@ -136,7 +136,7 @@ VendorManagementModel.belongsTo(cityModel_js_1.default, {
|
|
|
136
136
|
},
|
|
137
137
|
as: 'cityDetails',
|
|
138
138
|
});
|
|
139
|
-
|
|
139
|
+
cityModel_1.default.hasMany(VendorManagementModel, {
|
|
140
140
|
foreignKey: {
|
|
141
141
|
name: 'cityId',
|
|
142
142
|
allowNull: true,
|
|
@@ -144,7 +144,7 @@ cityModel_js_1.default.hasMany(VendorManagementModel, {
|
|
|
144
144
|
},
|
|
145
145
|
as: 'detailsOfCity',
|
|
146
146
|
});
|
|
147
|
-
VendorManagementModel.belongsTo(
|
|
147
|
+
VendorManagementModel.belongsTo(stateModel_1.default, {
|
|
148
148
|
foreignKey: {
|
|
149
149
|
name: 'stateId',
|
|
150
150
|
allowNull: true,
|
|
@@ -152,7 +152,7 @@ VendorManagementModel.belongsTo(stateModel_js_1.default, {
|
|
|
152
152
|
},
|
|
153
153
|
as: 'stateDetails',
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
stateModel_1.default.hasMany(VendorManagementModel, {
|
|
156
156
|
foreignKey: {
|
|
157
157
|
name: 'stateId',
|
|
158
158
|
allowNull: true,
|
|
@@ -160,7 +160,7 @@ stateModel_js_1.default.hasMany(VendorManagementModel, {
|
|
|
160
160
|
},
|
|
161
161
|
as: 'detailsOfState',
|
|
162
162
|
});
|
|
163
|
-
VendorManagementModel.belongsTo(
|
|
163
|
+
VendorManagementModel.belongsTo(countryModel_1.default, {
|
|
164
164
|
foreignKey: {
|
|
165
165
|
name: 'countryId',
|
|
166
166
|
allowNull: true,
|
|
@@ -168,7 +168,7 @@ VendorManagementModel.belongsTo(countryModel_js_1.default, {
|
|
|
168
168
|
},
|
|
169
169
|
as: 'countryDetails',
|
|
170
170
|
});
|
|
171
|
-
|
|
171
|
+
countryModel_1.default.hasMany(VendorManagementModel, {
|
|
172
172
|
foreignKey: {
|
|
173
173
|
name: 'countryId',
|
|
174
174
|
allowNull: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { IWalletHistoryModelAttributes } from '../../interfaces/walletHistoryInterface
|
|
3
|
-
import { TWalletHistoryModelCreationAttributes } from '../../types/walletHistoryType
|
|
4
|
-
import { WALLET_HISTORY_ACTION, WALLET_HISTORY_ITEM_TYPE, WALLET_HISTORY_STATUS, WALLET_HISTORY_TYPE } from '../../constants/app
|
|
2
|
+
import { IWalletHistoryModelAttributes } from '../../interfaces/walletHistoryInterface';
|
|
3
|
+
import { TWalletHistoryModelCreationAttributes } from '../../types/walletHistoryType';
|
|
4
|
+
import { WALLET_HISTORY_ACTION, WALLET_HISTORY_ITEM_TYPE, WALLET_HISTORY_STATUS, WALLET_HISTORY_TYPE } from '../../constants/app';
|
|
5
5
|
declare class WalletHistoryModel extends Model<IWalletHistoryModelAttributes, TWalletHistoryModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
userId: string;
|
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
|
+
const walletModel_1 = __importDefault(require("./walletModel"));
|
|
11
11
|
class WalletHistoryModel extends sequelize_1.Model {
|
|
12
12
|
}
|
|
13
13
|
WalletHistoryModel.init({
|
|
@@ -62,7 +62,7 @@ WalletHistoryModel.init({
|
|
|
62
62
|
status: {
|
|
63
63
|
type: sequelize_1.DataTypes.STRING,
|
|
64
64
|
allowNull: false,
|
|
65
|
-
defaultValue:
|
|
65
|
+
defaultValue: app_1.WALLET_HISTORY_STATUS.PENDING,
|
|
66
66
|
},
|
|
67
67
|
}, {
|
|
68
68
|
modelName: 'WalletHistoryModel',
|
|
@@ -70,33 +70,33 @@ WalletHistoryModel.init({
|
|
|
70
70
|
timestamps: true,
|
|
71
71
|
paranoid: true, // enables soft delete (deletedAt)
|
|
72
72
|
sequelize: // enables soft delete (deletedAt)
|
|
73
|
-
|
|
73
|
+
index_1.sequelize,
|
|
74
74
|
});
|
|
75
|
-
WalletHistoryModel.belongsTo(
|
|
75
|
+
WalletHistoryModel.belongsTo(userModel_1.default, {
|
|
76
76
|
foreignKey: { name: 'userId', allowNull: false, field: 'user_id' },
|
|
77
77
|
as: 'walletHistoryUser',
|
|
78
78
|
});
|
|
79
|
-
|
|
79
|
+
userModel_1.default.hasMany(WalletHistoryModel, {
|
|
80
80
|
foreignKey: { name: 'userId', allowNull: false, field: 'user_id' },
|
|
81
81
|
as: 'userWalletHistoryList',
|
|
82
82
|
});
|
|
83
|
-
WalletHistoryModel.belongsTo(
|
|
83
|
+
WalletHistoryModel.belongsTo(walletModel_1.default, {
|
|
84
84
|
foreignKey: { name: 'walletId', allowNull: false, field: 'wallet_id' },
|
|
85
85
|
as: 'wallet',
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
walletModel_1.default.hasMany(WalletHistoryModel, {
|
|
88
88
|
foreignKey: { name: 'walletId', allowNull: false, field: 'wallet_id' },
|
|
89
89
|
as: 'walletHistoryList',
|
|
90
90
|
});
|
|
91
|
-
WalletHistoryModel.belongsTo(
|
|
91
|
+
WalletHistoryModel.belongsTo(userModel_1.default, {
|
|
92
92
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
93
93
|
as: 'createdByUser',
|
|
94
94
|
});
|
|
95
|
-
WalletHistoryModel.belongsTo(
|
|
95
|
+
WalletHistoryModel.belongsTo(userModel_1.default, {
|
|
96
96
|
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
97
97
|
as: 'updatedByUser',
|
|
98
98
|
});
|
|
99
|
-
WalletHistoryModel.belongsTo(
|
|
99
|
+
WalletHistoryModel.belongsTo(userModel_1.default, {
|
|
100
100
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
101
101
|
as: 'deletedByUser',
|
|
102
102
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { IWalletModelAttributes } from '../../interfaces/walletInterface
|
|
3
|
-
import { TWalletModelCreationAttributes } from '../../types/walletType
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app
|
|
2
|
+
import { IWalletModelAttributes } from '../../interfaces/walletInterface';
|
|
3
|
+
import { TWalletModelCreationAttributes } from '../../types/walletType';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
declare class WalletModel extends Model<IWalletModelAttributes, TWalletModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
uuid: string;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
10
|
class WalletModel extends sequelize_1.Model {
|
|
11
11
|
}
|
|
12
12
|
WalletModel.init({
|
|
@@ -29,7 +29,7 @@ WalletModel.init({
|
|
|
29
29
|
status: {
|
|
30
30
|
type: sequelize_1.DataTypes.STRING,
|
|
31
31
|
allowNull: false,
|
|
32
|
-
defaultValue:
|
|
32
|
+
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
33
33
|
},
|
|
34
34
|
storageInGb: {
|
|
35
35
|
type: sequelize_1.DataTypes.FLOAT,
|
|
@@ -47,9 +47,9 @@ WalletModel.init({
|
|
|
47
47
|
modelName: 'WalletModel',
|
|
48
48
|
tableName: 'wallets',
|
|
49
49
|
timestamps: true,
|
|
50
|
-
sequelize:
|
|
50
|
+
sequelize: index_1.sequelize,
|
|
51
51
|
});
|
|
52
|
-
WalletModel.hasMany(
|
|
52
|
+
WalletModel.hasMany(userModel_1.default, {
|
|
53
53
|
foreignKey: {
|
|
54
54
|
name: 'uuid',
|
|
55
55
|
allowNull: false,
|
|
@@ -58,7 +58,7 @@ WalletModel.hasMany(userModel_js_1.default, {
|
|
|
58
58
|
sourceKey: 'uuid',
|
|
59
59
|
as: 'walletUserList',
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
userModel_1.default.belongsTo(WalletModel, {
|
|
62
62
|
foreignKey: {
|
|
63
63
|
name: 'uuid',
|
|
64
64
|
allowNull: false,
|
|
@@ -66,7 +66,7 @@ userModel_js_1.default.belongsTo(WalletModel, {
|
|
|
66
66
|
},
|
|
67
67
|
as: 'userWallet',
|
|
68
68
|
});
|
|
69
|
-
WalletModel.belongsTo(
|
|
69
|
+
WalletModel.belongsTo(userModel_1.default, {
|
|
70
70
|
foreignKey: {
|
|
71
71
|
name: 'createdBy',
|
|
72
72
|
allowNull: true,
|
|
@@ -74,7 +74,7 @@ WalletModel.belongsTo(userModel_js_1.default, {
|
|
|
74
74
|
},
|
|
75
75
|
as: 'createdByUser',
|
|
76
76
|
});
|
|
77
|
-
WalletModel.belongsTo(
|
|
77
|
+
WalletModel.belongsTo(userModel_1.default, {
|
|
78
78
|
foreignKey: {
|
|
79
79
|
name: 'updatedBy',
|
|
80
80
|
allowNull: true,
|
|
@@ -82,7 +82,7 @@ WalletModel.belongsTo(userModel_js_1.default, {
|
|
|
82
82
|
},
|
|
83
83
|
as: 'updatedByUser',
|
|
84
84
|
});
|
|
85
|
-
WalletModel.belongsTo(
|
|
85
|
+
WalletModel.belongsTo(userModel_1.default, {
|
|
86
86
|
foreignKey: {
|
|
87
87
|
name: 'deletedBy',
|
|
88
88
|
allowNull: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { WORKIN_DAY_STATUS } from '../../constants/app
|
|
3
|
-
import { IWorkingDayAttributes } from '../../interfaces/workingDayInterface
|
|
4
|
-
import { TWorkingDayCreationAttributes } from '../../types/workingDayType
|
|
2
|
+
import { WORKIN_DAY_STATUS } from '../../constants/app';
|
|
3
|
+
import { IWorkingDayAttributes } from '../../interfaces/workingDayInterface';
|
|
4
|
+
import { TWorkingDayCreationAttributes } from '../../types/workingDayType';
|
|
5
5
|
declare class WorkingDayModel extends Model<IWorkingDayAttributes, TWorkingDayCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
dayName: string;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const app_1 = require("../../constants/app");
|
|
9
|
+
const userModel_1 = __importDefault(require("./userModel"));
|
|
10
10
|
class WorkingDayModel extends sequelize_1.Model {
|
|
11
11
|
}
|
|
12
12
|
WorkingDayModel.init({
|
|
@@ -29,7 +29,7 @@ WorkingDayModel.init({
|
|
|
29
29
|
status: {
|
|
30
30
|
type: sequelize_1.DataTypes.STRING(30),
|
|
31
31
|
allowNull: false,
|
|
32
|
-
defaultValue:
|
|
32
|
+
defaultValue: app_1.WORKIN_DAY_STATUS.INACTIVE,
|
|
33
33
|
},
|
|
34
34
|
startTime: {
|
|
35
35
|
type: sequelize_1.DataTypes.DATE,
|
|
@@ -50,9 +50,9 @@ WorkingDayModel.init({
|
|
|
50
50
|
modelName: 'WorkingDayModel',
|
|
51
51
|
tableName: 'working_days',
|
|
52
52
|
timestamps: true,
|
|
53
|
-
sequelize:
|
|
53
|
+
sequelize: index_1.sequelize,
|
|
54
54
|
});
|
|
55
|
-
WorkingDayModel.belongsTo(
|
|
55
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
56
56
|
foreignKey: {
|
|
57
57
|
name: 'createdBy',
|
|
58
58
|
allowNull: true,
|
|
@@ -60,7 +60,7 @@ WorkingDayModel.belongsTo(userModel_js_1.default, {
|
|
|
60
60
|
},
|
|
61
61
|
as: 'createdByUser',
|
|
62
62
|
});
|
|
63
|
-
WorkingDayModel.belongsTo(
|
|
63
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
64
64
|
foreignKey: {
|
|
65
65
|
name: 'updatedBy',
|
|
66
66
|
allowNull: true,
|
|
@@ -68,7 +68,7 @@ WorkingDayModel.belongsTo(userModel_js_1.default, {
|
|
|
68
68
|
},
|
|
69
69
|
as: 'updatedByUser',
|
|
70
70
|
});
|
|
71
|
-
WorkingDayModel.belongsTo(
|
|
71
|
+
WorkingDayModel.belongsTo(userModel_1.default, {
|
|
72
72
|
foreignKey: {
|
|
73
73
|
name: 'deletedBy',
|
|
74
74
|
allowNull: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
|
|
2
|
+
import { SCHOOL_SHIFT, WORKIN_DAY_STATUS } from '../../constants/app';
|
|
3
|
+
import { IWorkingShiftAttributes } from '../../interfaces/workingShiftInterface';
|
|
4
|
+
import { TWorkingShiftCreationAttributes } from '../../types/workingShiftType';
|
|
5
5
|
declare class WorkingShiftModel extends Model<IWorkingShiftAttributes, TWorkingShiftCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
status: WORKIN_DAY_STATUS;
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
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
13
|
class WorkingShiftModel extends sequelize_1.Model {
|
|
14
14
|
}
|
|
15
15
|
WorkingShiftModel.init({
|
|
@@ -32,7 +32,7 @@ WorkingShiftModel.init({
|
|
|
32
32
|
status: {
|
|
33
33
|
type: sequelize_1.DataTypes.STRING(30),
|
|
34
34
|
allowNull: false,
|
|
35
|
-
defaultValue:
|
|
35
|
+
defaultValue: app_1.WORKIN_DAY_STATUS.ACTIVE,
|
|
36
36
|
},
|
|
37
37
|
shiftType: {
|
|
38
38
|
type: sequelize_1.DataTypes.STRING(30),
|
|
@@ -57,15 +57,15 @@ WorkingShiftModel.init({
|
|
|
57
57
|
modelName: 'WorkingShiftModel',
|
|
58
58
|
tableName: 'working_shift_days',
|
|
59
59
|
timestamps: true,
|
|
60
|
-
sequelize:
|
|
60
|
+
sequelize: index_1.sequelize,
|
|
61
61
|
});
|
|
62
|
-
WorkingShiftModel.belongsTo(
|
|
63
|
-
|
|
64
|
-
WorkingShiftModel.belongsTo(
|
|
65
|
-
|
|
66
|
-
WorkingShiftModel.belongsTo(
|
|
67
|
-
|
|
68
|
-
WorkingShiftModel.belongsTo(
|
|
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
69
|
foreignKey: {
|
|
70
70
|
name: 'createdBy',
|
|
71
71
|
allowNull: true,
|
|
@@ -73,7 +73,7 @@ WorkingShiftModel.belongsTo(userModel_js_1.default, {
|
|
|
73
73
|
},
|
|
74
74
|
as: 'createdByUser',
|
|
75
75
|
});
|
|
76
|
-
WorkingShiftModel.belongsTo(
|
|
76
|
+
WorkingShiftModel.belongsTo(userModel_1.default, {
|
|
77
77
|
foreignKey: {
|
|
78
78
|
name: 'updatedBy',
|
|
79
79
|
allowNull: true,
|
|
@@ -81,7 +81,7 @@ WorkingShiftModel.belongsTo(userModel_js_1.default, {
|
|
|
81
81
|
},
|
|
82
82
|
as: 'updatedByUser',
|
|
83
83
|
});
|
|
84
|
-
WorkingShiftModel.belongsTo(
|
|
84
|
+
WorkingShiftModel.belongsTo(userModel_1.default, {
|
|
85
85
|
foreignKey: {
|
|
86
86
|
name: 'deletedBy',
|
|
87
87
|
allowNull: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
|
|
2
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
3
|
+
import { IMongooseCommonService } from '../Contracts/IMongooseCommonService';
|
|
4
4
|
import { PipelineStage } from 'mongoose';
|
|
5
5
|
export declare class MongooseCommonService<T extends Document> implements IMongooseCommonService<T> {
|
|
6
6
|
private model;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MongooseCommonService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const app_1 = require("../../constants/app");
|
|
5
5
|
class MongooseCommonService {
|
|
6
6
|
constructor(model) {
|
|
7
7
|
this.findAllWithPagination = async (filter, options = {}, populate) => {
|
|
@@ -15,10 +15,10 @@ class MongooseCommonService {
|
|
|
15
15
|
};
|
|
16
16
|
const { order, projection, ...restOptions } = options;
|
|
17
17
|
let { page, limit } = options;
|
|
18
|
-
const sort = convertOrderToSort(order ||
|
|
18
|
+
const sort = convertOrderToSort(order || app_1.PAGINATION_ORDER);
|
|
19
19
|
// Ensure page and limit are positive integers
|
|
20
|
-
page = Math.max(1, page ||
|
|
21
|
-
limit = Math.max(1, limit ||
|
|
20
|
+
page = Math.max(1, page || app_1.PAGINATION.PAGE);
|
|
21
|
+
limit = Math.max(1, limit || app_1.PAGINATION.LIMIT);
|
|
22
22
|
// Calculate offset
|
|
23
23
|
const skip = (page - 1) * limit;
|
|
24
24
|
// Count total records
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
|
|
2
|
+
import { ISequelizeCommonService } from '../Contracts/ISequelizeCommonService';
|
|
3
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
4
4
|
export default class SequelizeCommonService<T extends Model> implements ISequelizeCommonService<T> {
|
|
5
5
|
private model;
|
|
6
6
|
constructor(model: ModelStatic<T>);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const app_1 = require("../../constants/app");
|
|
4
4
|
class SequelizeCommonService {
|
|
5
5
|
constructor(model) {
|
|
6
6
|
this.findAll = (where, options) => {
|
|
7
7
|
try {
|
|
8
8
|
const finalOptions = {
|
|
9
9
|
...(options || {}),
|
|
10
|
-
order: options?.order ||
|
|
10
|
+
order: options?.order || app_1.PAGINATION_ORDER,
|
|
11
11
|
};
|
|
12
12
|
return this.model.findAll({ where, ...finalOptions });
|
|
13
13
|
}
|
|
@@ -19,8 +19,8 @@ class SequelizeCommonService {
|
|
|
19
19
|
try {
|
|
20
20
|
if (!options)
|
|
21
21
|
options = {};
|
|
22
|
-
const limit = options.limit ||
|
|
23
|
-
const currentPage = options.page ||
|
|
22
|
+
const limit = options.limit || app_1.PAGINATION.LIMIT;
|
|
23
|
+
const currentPage = options.page || app_1.PAGINATION.PAGE;
|
|
24
24
|
// Clean options for count()
|
|
25
25
|
const countOptions = { ...options };
|
|
26
26
|
// options.subQuery = false;
|
|
@@ -36,7 +36,7 @@ class SequelizeCommonService {
|
|
|
36
36
|
// Apply pagination + order for findAll
|
|
37
37
|
options.limit = limit;
|
|
38
38
|
options.offset = (currentPage - 1) * limit;
|
|
39
|
-
options.order = options.order ||
|
|
39
|
+
options.order = options.order || app_1.PAGINATION_ORDER;
|
|
40
40
|
const listOfRecords = await this.findAll(where, options);
|
|
41
41
|
const paginationOptions = {
|
|
42
42
|
limit,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterQuery, UpdateQuery, Document, QueryOptions, PopulateOptions, MongooseUpdateQueryOptions, UpdateWriteOpResult, ClientSession, CreateOptions } from 'mongoose';
|
|
2
|
-
import { TPaginationOptions } from '../../types/commonType
|
|
2
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
3
3
|
interface IReadService<T extends Document> {
|
|
4
4
|
findAll(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T[]>;
|
|
5
5
|
findOne(filter: FilterQuery<T>, options?: QueryOptions, populate?: PopulateOptions | PopulateOptions[]): Promise<T | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FindOptions, WhereOptions, UpdateOptions, BulkCreateOptions, DestroyOptions, CreateOptions, Identifier, Model, UpsertOptions, CountOptions } from 'sequelize';
|
|
2
|
-
import { TPaginationOptions } from '../../types/commonType
|
|
2
|
+
import { TPaginationOptions } from '../../types/commonType';
|
|
3
3
|
interface IReadService<T extends Model> {
|
|
4
4
|
findAll(where: WhereOptions<T['_attributes']>, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'][]>;
|
|
5
5
|
findOne(where: WhereOptions<T['_attributes']>, options?: FindOptions<T['_attributes']>): Promise<T['_attributes'] | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
|
-
import { IAcademicCalendarModelAttributes } from '../interfaces/academicCalendarInterface
|
|
2
|
+
import { IAcademicCalendarModelAttributes } from '../interfaces/academicCalendarInterface';
|
|
3
3
|
export type TAcademicCalendarModelCreationAttributes = Optional<IAcademicCalendarModelAttributes, 'id'>;
|
|
4
4
|
export interface TUpdateAcademicCalenderStatusParams {
|
|
5
5
|
instituteId?: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
|
-
import { IAccountHasReceiptDetailsInterfaceModelAttributes } from '../interfaces/accountHasReceiptDetailsInterface
|
|
3
|
-
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface
|
|
2
|
+
import { IAccountHasReceiptDetailsInterfaceModelAttributes } from '../interfaces/accountHasReceiptDetailsInterface';
|
|
3
|
+
import { IFileStorageAttributes } from '../interfaces/fileStorageInterface';
|
|
4
4
|
export type TAccountHasReceiptDetailsModelCreationAttributes = Optional<IAccountHasReceiptDetailsInterfaceModelAttributes, 'id'>;
|
|
5
5
|
export type TAccountHasReceiptDetailAttributesWithAssociations = IAccountHasReceiptDetailsInterfaceModelAttributes & {
|
|
6
6
|
accountHasReceiptDetailsProfileImage?: IFileStorageAttributes;
|