@kipicore/dbcore 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/fix-import-extensions.js +12 -7
- package/dist/scripts/generate-index.js +12 -7
- package/dist/src/configs/aws.js +9 -6
- package/dist/src/configs/env.js +56 -17
- package/dist/src/configs/postgresConfig.js +1 -1
- package/dist/src/constants/app.js +318 -312
- package/dist/src/constants/defaultModelAttributes.js +12 -9
- package/dist/src/constants/errorMessages.js +219 -214
- package/dist/src/constants/httpStatusCode.js +5 -2
- package/dist/src/constants/successMessages.js +223 -217
- package/dist/src/db/mongodb.js +10 -3
- package/dist/src/db/postgres.js +5 -2
- package/dist/src/db/psql/index.js +1 -1
- package/dist/src/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.js +0 -1
- package/dist/src/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.js +0 -1
- package/dist/src/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.js +0 -1
- package/dist/src/db/psql/migrations/20250108092439-update-batch-model-fields.js +0 -1
- package/dist/src/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.js +0 -1
- package/dist/src/db/psql/migrations/20250211071743-add-action-user-has-histroy.js +0 -1
- package/dist/src/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.js +0 -1
- package/dist/src/db/psql/migrations/20250214072626-add-middlename-user.js +0 -1
- package/dist/src/db/psql/migrations/20250224085333-add-apptype-in-user.js +0 -1
- package/dist/src/db/psql/migrations/20250226053006-add-brouchure-in-institute.js +0 -1
- package/dist/src/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.js +0 -1
- package/dist/src/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.js +0 -1
- package/dist/src/db/psql/migrations/20250306053557-add-shifyId-in-batch.js +0 -1
- package/dist/src/db/psql/migrations/20250311044606-add-institued-in-school-data-clm-subtype.js +0 -1
- package/dist/src/db/psql/migrations/20250402090653-add-user-area.js +0 -1
- package/dist/src/db/psql/migrations/20250407094125-update-type-in-typeManagement.js +0 -1
- package/dist/src/db/psql/migrations/20250409105229-add-user-type-in-role.js +0 -1
- package/dist/src/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.js +0 -1
- package/dist/src/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.js +0 -1
- package/dist/src/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.js +0 -1
- package/dist/src/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.js +0 -1
- package/dist/src/db/psql/migrations/20250422114032-add-account.js +0 -1
- package/dist/src/db/psql/migrations/20250423051841-add-master-leave-clm.js +0 -1
- package/dist/src/db/psql/migrations/20250423064522-update-calender-enum.js +0 -1
- package/dist/src/db/psql/migrations/20250423093827-update-institued-district.js +0 -1
- package/dist/src/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.js +0 -1
- package/dist/src/db/psql/migrations/20250424053841-update-fee-history-key.js +1 -1
- package/dist/src/db/psql/migrations/20250426070309-update-banner-clm-userType.js +0 -1
- package/dist/src/db/psql/migrations/20250505035157-update-fee-collection-clm-add.js +0 -1
- package/dist/src/db/psql/migrations/20250505082924-update-banner-clm.js +0 -1
- package/dist/src/db/psql/migrations/20250505094616-about-as-clm-in-institued.js +0 -1
- package/dist/src/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.js +0 -1
- package/dist/src/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.js +0 -1
- package/dist/src/db/psql/migrations/20250513061037-add-techer-clm-batch.js +0 -1
- package/dist/src/db/psql/migrations/20250514101801-add-slotId-workingShif.js +0 -1
- package/dist/src/db/psql/migrations/20250516062917-add-globalId-clm-user-model.js +0 -1
- package/dist/src/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.js +0 -1
- package/dist/src/db/psql/migrations/20250520061231-add-institued_mobile_person_data.js +0 -1
- package/dist/src/db/psql/migrations/20250522044729-add-institued_update_add_2.js +0 -1
- package/dist/src/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.js +0 -1
- package/dist/src/db/psql/migrations/20250526093322-add-appType_clm_in_module.js +0 -1
- package/dist/src/db/psql/migrations/20250526094030-add-appType_clm_in_action.js +0 -1
- package/dist/src/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.js +0 -1
- package/dist/src/db/psql/migrations/20250527065001-add-app-type-in-role-model.js +0 -1
- package/dist/src/db/psql/migrations/20250528045906-add-module-type-to-notifications.js +0 -1
- package/dist/src/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.js +0 -1
- package/dist/src/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.js +0 -1
- package/dist/src/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.js +0 -1
- package/dist/src/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.js +0 -1
- package/dist/src/db/psql/migrations/20250604121051-update-mobile-number-opstion.js +0 -1
- package/dist/src/db/psql/migrations/20250617064159-update-type-management-jun-17.js +0 -1
- package/dist/src/db/psql/migrations/20250627065013-is-institute-default-added-type-managemente.js +0 -1
- package/dist/src/db/psql/migrations/20250701095321-add-clm-institute-pdfId.js +0 -1
- package/dist/src/db/psql/migrations/20250704102117-add-clm-isDefult-in-typeManagemet.js +0 -1
- package/dist/src/db/psql/migrations/20250715103324-add-academic-calendar-id-to-batches.js +0 -1
- package/dist/src/db/psql/migrations/20250715121047-remove-batch-id-from-academic-calendars.js +0 -1
- package/dist/src/db/psql/migrations/20250716131731-rename-user-id-to-primary-user-id.js +0 -1
- package/dist/src/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.js +0 -1
- package/dist/src/db/psql/migrations/20250718121251-add-clm-classroom-typeid.js +0 -1
- package/dist/src/db/psql/migrations/20250721065317-add-instituteId-fileSize-to-fileStorage.js +0 -1
- package/dist/src/db/psql/migrations/20250721100004-add-shift-slot-id-to-lectures.js +0 -1
- package/dist/src/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.js +0 -1
- package/dist/src/db/psql/migrations/20250722071836-add-title-to-floor-management.js +0 -1
- package/dist/src/db/psql/migrations/20250723150111-add-clm-batch-slotId.js +0 -1
- package/dist/src/db/psql/migrations/20250724062458-update_classRoom_number_clm_to_string.js +0 -1
- package/dist/src/db/psql/migrations/20250725132424-add-unique-index-on-instituteId-name-type.js +0 -1
- package/dist/src/db/psql/migrations/20250730104844-update-unique-key-assessment-type.js +0 -1
- package/dist/src/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.js +0 -1
- package/dist/src/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.js +0 -1
- package/dist/src/db/psql/migrations/20250805115805-add-descriptions-to-lectures.js +0 -1
- package/dist/src/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.js +0 -1
- package/dist/src/db/psql/migrations/20250808101515-add-sequence-to-institute_entities.js +0 -1
- package/dist/src/db/psql/migrations/20250812080521-add-title-and-descriptions-to-batch-subject-project-assessments.js +0 -1
- package/dist/src/db/psql/migrations/20250820092836-add-sequence-number-to-institute-entities.js +0 -1
- package/dist/src/db/psql/migrations/20250829103203-remove-syllabus-composit-index.js +0 -1
- package/dist/src/db/psql/migrations/20250905132024-add-uuid-to-users.js +0 -1
- package/dist/src/db/psql/migrations/20250908054025-userHasOffer_model_update.js +0 -1
- package/dist/src/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.js +0 -1
- package/dist/src/db/psql/migrations/20250909061117-add-instituteId-isDefault-to-entityGroup.js +0 -1
- package/dist/src/db/psql/migrations/20250911060106-change-wallet-history-columns-to-float.js +0 -1
- package/dist/src/db/psql/migrations/20250911060245-change-coin-to-float-in-wallets.js +0 -1
- package/dist/src/db/psql/migrations/20250917135646-change-storageInBytes-to-float.js +0 -1
- package/dist/src/db/psql/seeders/20240809100759-add-countries-states-cities.js +1 -1
- package/dist/src/db/psql/seeders/20250101122757-add-default-permissions-modules.js +0 -1
- package/dist/src/db/psql/seeders/Data/AcademicCalendarModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/AdministrativeStaffModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/AnnouncementsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/AssetsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/AttendanceModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/BannerModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/BatchModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/BoardModule .js +1 -1
- package/dist/src/db/psql/seeders/Data/BookAssessmentsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/CategoriesModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/ClassroomModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/DivisionModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/EventModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/ExamsAndResultsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/FacilityModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/FeeAndDiscountModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/FeedBackModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/FileModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/GenerateIdModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/HolidayModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/HomeworkModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/IndexModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/InquiryModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/InstituteModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/InventoryModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/JobApplyModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/LectureModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/ParentModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/PayoutModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/PdcChequesModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/PhotosGalleryModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/PlannerModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/ProjectAssessmentsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/ReplaceTeacherModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/RoleModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/RollNumberModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/SchoolFeeModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/SchoolModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/SchoolRegistration.js +1 -1
- package/dist/src/db/psql/seeders/Data/SettingsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/StaffTimingModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/StudentModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/SubjectModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/SyllabusManagementModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/TeacherModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/TestimonialsModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/TimetableModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/To-doModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/TypeManagementModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/UserModule.js +1 -1
- package/dist/src/db/psql/seeders/Data/appType.js +1 -1
- package/dist/src/helpers/s3Uploader.js +25 -17
- package/dist/src/helpers/utils.js +148 -69
- package/dist/src/index.js +431 -415
- package/dist/src/interfaces/academicCalendarInterface.js +2 -1
- package/dist/src/interfaces/accountHasReceiptDetailsInterface.js +2 -1
- package/dist/src/interfaces/announcementInterface.js +2 -1
- package/dist/src/interfaces/approvalRequestInterface.js +2 -1
- package/dist/src/interfaces/areaInterface.js +2 -1
- package/dist/src/interfaces/attendanceInterface.js +2 -1
- package/dist/src/interfaces/bankAccountDetailsInterface.js +2 -1
- package/dist/src/interfaces/bannerInterface.js +2 -1
- package/dist/src/interfaces/batchInterface.js +2 -1
- package/dist/src/interfaces/batchSubjectBookAssessmentInterface.js +2 -1
- package/dist/src/interfaces/batchSubjectProjectAssessmentInterface.js +2 -1
- package/dist/src/interfaces/blogInterface.js +2 -1
- package/dist/src/interfaces/bookAssessmentDateInterface.js +2 -1
- package/dist/src/interfaces/careerInterface.js +2 -1
- package/dist/src/interfaces/categoriesInterface.js +2 -1
- package/dist/src/interfaces/certificatesHistoryInterface.js +2 -1
- package/dist/src/interfaces/certificatesManagementInterface.js +2 -1
- package/dist/src/interfaces/cityInterface.js +2 -1
- package/dist/src/interfaces/classRoomInterface.js +2 -1
- package/dist/src/interfaces/cloudStorageInterface.js +2 -1
- package/dist/src/interfaces/coinPurchaseOfferInterface.js +2 -1
- package/dist/src/interfaces/columnInterface.js +2 -1
- package/dist/src/interfaces/commanInterface.js +2 -1
- package/dist/src/interfaces/contactFeedBackInterface.js +2 -1
- package/dist/src/interfaces/countryInterface.js +2 -1
- package/dist/src/interfaces/courseHasVisitorsInterface.js +2 -1
- package/dist/src/interfaces/courseInterface.js +2 -1
- package/dist/src/interfaces/dailyBookInterface.js +2 -1
- package/dist/src/interfaces/dashboardManagementInterface.js +2 -1
- package/dist/src/interfaces/driverInterface.js +2 -1
- package/dist/src/interfaces/entityGroupInterface.js +2 -1
- package/dist/src/interfaces/eventInterface.js +2 -1
- package/dist/src/interfaces/examGroupInterface.js +2 -1
- package/dist/src/interfaces/examHasAnswerSheetInterface.js +2 -1
- package/dist/src/interfaces/examInterface.js +2 -1
- package/dist/src/interfaces/facilityInterface.js +2 -1
- package/dist/src/interfaces/featureActionInterface.js +2 -1
- package/dist/src/interfaces/feeHistoryDetailsInterface.js +2 -1
- package/dist/src/interfaces/feeHistoryInterface.js +2 -1
- package/dist/src/interfaces/feeReminderInterface.js +2 -1
- package/dist/src/interfaces/feeReminderSettingInterface.js +2 -1
- package/dist/src/interfaces/feeReminderTypeInterface.js +2 -1
- package/dist/src/interfaces/feeTypeHasTermsInterface.js +2 -1
- package/dist/src/interfaces/feeTypeInterface.js +2 -1
- package/dist/src/interfaces/feedBackInterface.js +2 -1
- package/dist/src/interfaces/feesCollectionInterface.js +2 -1
- package/dist/src/interfaces/fileStorageInterface.js +2 -1
- package/dist/src/interfaces/floorManagementInterface.js +2 -1
- package/dist/src/interfaces/generateIdCardInterface.js +2 -1
- package/dist/src/interfaces/greetingsInterface.js +2 -1
- package/dist/src/interfaces/holidayInterface.js +2 -1
- package/dist/src/interfaces/homeworkInterface.js +2 -1
- package/dist/src/interfaces/informationSupportInterface.js +2 -1
- package/dist/src/interfaces/inquiryInterface.js +2 -1
- package/dist/src/interfaces/instituteEntityInterface.js +2 -1
- package/dist/src/interfaces/instituteEntityTypeInterface.js +2 -1
- package/dist/src/interfaces/instituteInterface.js +2 -1
- package/dist/src/interfaces/instituteSubscriptionPlanInterface.js +2 -1
- package/dist/src/interfaces/inventoryHistoryInterface.js +2 -1
- package/dist/src/interfaces/inventoryInterface.js +2 -1
- package/dist/src/interfaces/invoiceInterface.js +2 -1
- package/dist/src/interfaces/jobApplyInterface.js +2 -1
- package/dist/src/interfaces/lectureHistoryInterface.js +2 -1
- package/dist/src/interfaces/lectureInterface.js +2 -1
- package/dist/src/interfaces/masterLeaveInterface.js +2 -1
- package/dist/src/interfaces/moduleFeatureInterface.js +2 -1
- package/dist/src/interfaces/moduleInterface.js +2 -1
- package/dist/src/interfaces/offersInterface.js +2 -1
- package/dist/src/interfaces/paymentTermsInterface.js +2 -1
- package/dist/src/interfaces/pdcChequeInterface.js +2 -1
- package/dist/src/interfaces/pdcHistoryInterface.js +2 -1
- package/dist/src/interfaces/photosGalleryInterface.js +2 -1
- package/dist/src/interfaces/pincodeInterface.js +2 -1
- package/dist/src/interfaces/plannerInterface.js +2 -1
- package/dist/src/interfaces/productInterface.js +2 -1
- package/dist/src/interfaces/projectAssessmentOptionInterface.js +2 -1
- package/dist/src/interfaces/replaceTeacherInterface.js +2 -1
- package/dist/src/interfaces/roleInterface.js +2 -1
- package/dist/src/interfaces/rulesRegulationInterface.js +2 -1
- package/dist/src/interfaces/schoolFeeCollectionInterface.js +2 -1
- package/dist/src/interfaces/schoolFeeInterface.js +2 -1
- package/dist/src/interfaces/schoolOfferInterface.js +2 -1
- package/dist/src/interfaces/sendNotificationInerface.js +2 -1
- package/dist/src/interfaces/slotInterface.js +2 -1
- package/dist/src/interfaces/stateInterface.js +2 -1
- package/dist/src/interfaces/subCategoriesInterface.js +2 -1
- package/dist/src/interfaces/subjectHasFeeInterface.js +2 -1
- package/dist/src/interfaces/subjectHasPayFeeHistoryInterface.js +2 -1
- package/dist/src/interfaces/subjectIndexInterface.js +2 -1
- package/dist/src/interfaces/subscriptionPlanInterface.js +2 -1
- package/dist/src/interfaces/syllabusInterface.js +2 -1
- package/dist/src/interfaces/taskManagementInterface.js +2 -1
- package/dist/src/interfaces/testimonialInterface.js +2 -1
- package/dist/src/interfaces/toDoInterface.js +2 -1
- package/dist/src/interfaces/tokenInterface.js +2 -1
- package/dist/src/interfaces/tripInterface.js +2 -1
- package/dist/src/interfaces/typeManagementInterface.js +2 -1
- package/dist/src/interfaces/uniqueNumberCounterInterface.js +2 -1
- package/dist/src/interfaces/userBookAssessmentInterface.js +2 -1
- package/dist/src/interfaces/userDetailsInterface.js +2 -1
- package/dist/src/interfaces/userFeeTypeByAccountInterface.js +2 -1
- package/dist/src/interfaces/userFeeTypeInterface.js +2 -1
- package/dist/src/interfaces/userHasAnnouncementInterface.js +2 -1
- package/dist/src/interfaces/userHasBatchInterface.js +2 -1
- package/dist/src/interfaces/userHasCourseInterface.js +2 -1
- package/dist/src/interfaces/userHasDeviceInterface.js +2 -1
- package/dist/src/interfaces/userHasFeeTermsInterface.js +2 -1
- package/dist/src/interfaces/userHasFileInterface.js +2 -1
- package/dist/src/interfaces/userHasHomeWorkInterface.js +2 -1
- package/dist/src/interfaces/userHasInventoryHistoryInterface.js +2 -1
- package/dist/src/interfaces/userHasInventoryInterface.js +2 -1
- package/dist/src/interfaces/userHasLeaveHistoryInterface.js +2 -1
- package/dist/src/interfaces/userHasLeaveInterface.js +2 -1
- package/dist/src/interfaces/userHasOfferInterface.js +2 -1
- package/dist/src/interfaces/userHasParentInterface.js +2 -1
- package/dist/src/interfaces/userHasRoleInterface.js +2 -1
- package/dist/src/interfaces/userHasRollNumberInterface.js +2 -1
- package/dist/src/interfaces/userHasStorageInterface.js +2 -1
- package/dist/src/interfaces/userHasSubjectFeeInterface.js +2 -1
- package/dist/src/interfaces/userInstituteMetaInterface.js +2 -1
- package/dist/src/interfaces/userInterface.js +2 -1
- package/dist/src/interfaces/userLeaveRequestInterface.js +2 -1
- package/dist/src/interfaces/userMetaInterface.js +2 -1
- package/dist/src/interfaces/userPayoutDetailsInterface.js +2 -1
- package/dist/src/interfaces/userPayoutHistoryInterface.js +2 -1
- package/dist/src/interfaces/userPayoutInterface.js +2 -1
- package/dist/src/interfaces/userProjectAssessmentOptionInterface.js +2 -1
- package/dist/src/interfaces/userRequiredStepsInterface.js +2 -1
- package/dist/src/interfaces/userSchoolMetaInterface.js +2 -1
- package/dist/src/interfaces/vehicleInterface.js +2 -1
- package/dist/src/interfaces/vendorManagementInterface.js +2 -1
- package/dist/src/interfaces/videoAnalystInterface.js +2 -1
- package/dist/src/interfaces/walletHistoryInterface.js +2 -1
- package/dist/src/interfaces/walletInterface.js +2 -1
- package/dist/src/interfaces/walletTransactionInterface.js +2 -1
- package/dist/src/interfaces/workingDayInterface.js +2 -1
- package/dist/src/interfaces/workingShiftInterface.js +2 -1
- package/dist/src/models/mongodb/approvalRequestModel.js +43 -8
- package/dist/src/models/mongodb/attendanceModel.js +68 -30
- package/dist/src/models/mongodb/blogModel.js +46 -11
- package/dist/src/models/mongodb/careerModel.js +42 -7
- package/dist/src/models/mongodb/certificatesHistoryModel.js +39 -4
- package/dist/src/models/mongodb/certificatesManagementModel.js +42 -7
- package/dist/src/models/mongodb/columnModel.js +45 -10
- package/dist/src/models/mongodb/dailyBookModel.js +39 -4
- package/dist/src/models/mongodb/dashboardManagementModel.js +46 -11
- package/dist/src/models/mongodb/eventModel.js +58 -20
- package/dist/src/models/mongodb/examGroupModel.js +69 -31
- package/dist/src/models/mongodb/examHasAnswerSheetModel.js +56 -18
- package/dist/src/models/mongodb/examModel.js +76 -38
- package/dist/src/models/mongodb/feeReminderTypeModel.js +42 -7
- package/dist/src/models/mongodb/feedBackModel.js +43 -8
- package/dist/src/models/mongodb/generateIdCardModel.js +39 -4
- package/dist/src/models/mongodb/holidayModel.js +58 -20
- package/dist/src/models/mongodb/index.js +16 -11
- package/dist/src/models/mongodb/informationSupportModel.js +42 -7
- package/dist/src/models/mongodb/inquiryModel.js +67 -29
- package/dist/src/models/mongodb/invoiceModel.js +48 -13
- package/dist/src/models/mongodb/jobApplyModel.js +49 -14
- package/dist/src/models/mongodb/photosGalleryModel.js +46 -11
- package/dist/src/models/mongodb/plannerModel.js +45 -10
- package/dist/src/models/mongodb/plugin/addDefaultAttributesPlugin.js +4 -1
- package/dist/src/models/mongodb/plugin/transformIdInQueryPlugin.js +3 -1
- package/dist/src/models/mongodb/plugin/transformIdInResponsePlugin.js +8 -3
- package/dist/src/models/mongodb/replaceTeacherModel.js +46 -11
- package/dist/src/models/mongodb/schoolFeeModel.js +56 -18
- package/dist/src/models/mongodb/subjectIndexModel.js +152 -114
- package/dist/src/models/mongodb/subscriptionPlanModel.js +49 -14
- package/dist/src/models/mongodb/taskManagementModel.js +58 -20
- package/dist/src/models/mongodb/uniqueNumberCounterModel.js +42 -7
- package/dist/src/models/mongodb/userDetailsModel.js +68 -32
- package/dist/src/models/mongodb/userDoc.js +6 -3
- package/dist/src/models/mongodb/userInstituteMetaModel.js +54 -19
- package/dist/src/models/mongodb/userSchoolMetaModel.js +46 -41
- package/dist/src/models/mongodb/videoAnalystModel.js +40 -5
- package/dist/src/models/mongodb/walletTransactionModel.js +56 -21
- package/dist/src/models/psql/SubCategoriesModel.js +28 -23
- package/dist/src/models/psql/academicCalendarModel.js +26 -21
- package/dist/src/models/psql/accountHasReceiptDetailsModel.js +38 -33
- package/dist/src/models/psql/announcementModel.js +58 -53
- package/dist/src/models/psql/areaModel.js +17 -12
- package/dist/src/models/psql/bankAccountDetailsModel.js +35 -30
- package/dist/src/models/psql/bannerModel.js +40 -35
- package/dist/src/models/psql/batchModel.js +53 -48
- package/dist/src/models/psql/batchSubjectBookAssessmentModel.js +35 -30
- package/dist/src/models/psql/batchSubjectProjectAssessmentModel.js +35 -30
- package/dist/src/models/psql/bookAssessmentDateModel.js +25 -20
- package/dist/src/models/psql/categoriesModel.js +24 -19
- package/dist/src/models/psql/cityModel.js +21 -16
- package/dist/src/models/psql/classRoomModel.js +36 -31
- package/dist/src/models/psql/cloudStorageModel.js +30 -25
- package/dist/src/models/psql/coinPurchaseOfferModel.js +31 -26
- package/dist/src/models/psql/contactFeedBackModel.js +34 -29
- package/dist/src/models/psql/countryModel.js +13 -11
- package/dist/src/models/psql/courseHasVisitorsModel.js +22 -17
- package/dist/src/models/psql/courseModel.js +41 -36
- package/dist/src/models/psql/driverModel.js +51 -46
- package/dist/src/models/psql/entityGroupModel.js +29 -24
- package/dist/src/models/psql/facilityModel.js +34 -29
- package/dist/src/models/psql/featureActionModel.js +28 -23
- package/dist/src/models/psql/feeHistoryDetailsModel.js +45 -40
- package/dist/src/models/psql/feeHistoryModel.js +78 -73
- package/dist/src/models/psql/feeReminderModel.js +63 -58
- package/dist/src/models/psql/feeReminderSettingModel.js +27 -22
- package/dist/src/models/psql/feeTypeHasTermsModel.js +31 -26
- package/dist/src/models/psql/feeTypeModel.js +42 -37
- package/dist/src/models/psql/feesCollectionModel.js +55 -50
- package/dist/src/models/psql/fileStorageModel.js +26 -21
- package/dist/src/models/psql/floorManagementModel.js +25 -20
- package/dist/src/models/psql/greetingsModel.js +34 -29
- package/dist/src/models/psql/homeWorkModel.js +36 -31
- package/dist/src/models/psql/index.js +48 -7
- package/dist/src/models/psql/instituteEntityModel.js +34 -29
- package/dist/src/models/psql/instituteEntityTypeModel.js +25 -20
- package/dist/src/models/psql/instituteModel.js +70 -65
- package/dist/src/models/psql/instituteSubscriptionPlanModel.js +42 -37
- package/dist/src/models/psql/inventoryHistoryModel.js +42 -37
- package/dist/src/models/psql/inventoryModel.js +36 -31
- package/dist/src/models/psql/lectureHistoryModel.js +62 -57
- package/dist/src/models/psql/lectureModel.js +117 -112
- package/dist/src/models/psql/masterLeaveModel.js +41 -36
- package/dist/src/models/psql/moduleFeatureModel.js +29 -24
- package/dist/src/models/psql/moduleModel.js +30 -25
- package/dist/src/models/psql/offerModel.js +39 -34
- package/dist/src/models/psql/paymentTermsModel.js +35 -30
- package/dist/src/models/psql/pdcChequeModel.js +40 -35
- package/dist/src/models/psql/pdcHistoryModel.js +44 -39
- package/dist/src/models/psql/pincodeModel.js +28 -23
- package/dist/src/models/psql/productModel.js +32 -27
- package/dist/src/models/psql/projectAssessmentOptionModel.js +23 -18
- package/dist/src/models/psql/roleModel.js +26 -21
- package/dist/src/models/psql/rulesRegulationModel.js +23 -18
- package/dist/src/models/psql/schoolFeeCollectionModel.js +34 -29
- package/dist/src/models/psql/schoolOfferModel.js +43 -38
- package/dist/src/models/psql/sendNotificationModel.js +32 -27
- package/dist/src/models/psql/slotModel.js +27 -22
- package/dist/src/models/psql/stateModel.js +18 -13
- package/dist/src/models/psql/subjectHasFeeModel.js +25 -20
- package/dist/src/models/psql/subjectHasPayFeeHistoryModel.js +32 -27
- package/dist/src/models/psql/syllabusModel.js +31 -26
- package/dist/src/models/psql/testimonialModel.js +52 -47
- package/dist/src/models/psql/toDoModel.js +35 -30
- package/dist/src/models/psql/tokenModel.js +12 -10
- package/dist/src/models/psql/tripModel.js +34 -29
- package/dist/src/models/psql/typeManagementModel.js +32 -27
- package/dist/src/models/psql/userBookAssessmentModel.js +34 -29
- package/dist/src/models/psql/userFeeTypeByAccountModel.js +41 -36
- package/dist/src/models/psql/userFeeTypeModel.js +44 -39
- package/dist/src/models/psql/userHasAnnouncementModel.js +31 -26
- package/dist/src/models/psql/userHasBatchModel.js +24 -19
- package/dist/src/models/psql/userHasCourseModel.js +35 -30
- package/dist/src/models/psql/userHasDeviceModel.js +26 -21
- package/dist/src/models/psql/userHasFeeTermsModel.js +45 -40
- package/dist/src/models/psql/userHasFileModel.js +29 -24
- package/dist/src/models/psql/userHasHomeWorkModel.js +36 -31
- package/dist/src/models/psql/userHasInventoryHistoryModel.js +41 -36
- package/dist/src/models/psql/userHasInventoryModel.js +45 -40
- package/dist/src/models/psql/userHasLeaveHistoryModel.js +41 -36
- package/dist/src/models/psql/userHasLeaveModel.js +34 -29
- package/dist/src/models/psql/userHasOfferModel.js +36 -31
- package/dist/src/models/psql/userHasParentModel.js +31 -26
- package/dist/src/models/psql/userHasRoleModel.js +27 -22
- package/dist/src/models/psql/userHasRollNumberModel.js +28 -23
- package/dist/src/models/psql/userHasStorageModel.js +27 -22
- package/dist/src/models/psql/userHasSubjectFeeModel.js +27 -22
- package/dist/src/models/psql/userLeaveRequestModel.js +43 -38
- package/dist/src/models/psql/userModel.js +94 -89
- package/dist/src/models/psql/userPayoutDetailsModel.js +41 -36
- package/dist/src/models/psql/userPayoutHistoryModel.js +40 -35
- package/dist/src/models/psql/userPayoutModel.js +63 -58
- package/dist/src/models/psql/userProjectAssessmentOptionModel.js +31 -26
- package/dist/src/models/psql/userRequiredStepsModel.js +22 -17
- package/dist/src/models/psql/vehicleModel.js +30 -25
- package/dist/src/models/psql/vendorManagementModel.js +44 -39
- package/dist/src/models/psql/walletHistoryModel.js +34 -28
- package/dist/src/models/psql/walletModel.js +25 -20
- package/dist/src/models/psql/workingDayModel.js +24 -19
- package/dist/src/models/psql/workingShiftModel.js +34 -29
- package/dist/src/services/Concrete/mongooseCommonService.js +9 -5
- package/dist/src/services/Concrete/sequelizeCommanService.js +9 -6
- package/dist/src/services/Contracts/IMongooseCommonService.js +2 -1
- package/dist/src/services/Contracts/ISequelizeCommonService.js +2 -1
- package/dist/src/types/academicCalendarType.js +2 -1
- package/dist/src/types/accountHasReceiptDetailsType.js +2 -1
- package/dist/src/types/announcementType.js +2 -1
- package/dist/src/types/approveRequestType.js +2 -1
- package/dist/src/types/areaType.js +2 -1
- package/dist/src/types/attendanceType.js +2 -1
- package/dist/src/types/bankAccountDetailsType.js +2 -1
- package/dist/src/types/bannerType.js +2 -1
- package/dist/src/types/batchSubjectBookAssessmentType.js +2 -1
- package/dist/src/types/batchSubjectProjectAssessmentType.js +2 -1
- package/dist/src/types/batchType.js +2 -1
- package/dist/src/types/blogType.js +2 -1
- package/dist/src/types/bookAssessmentDateType.js +2 -1
- package/dist/src/types/careerType.js +2 -1
- package/dist/src/types/categoriesType.js +2 -1
- package/dist/src/types/certificatesHistoryType.js +2 -1
- package/dist/src/types/certificatesManagementType.js +2 -1
- package/dist/src/types/classRoomType.js +2 -1
- package/dist/src/types/cloudStorageType.js +2 -1
- package/dist/src/types/coinPurchaseOfferType.js +2 -1
- package/dist/src/types/commonType.js +2 -1
- package/dist/src/types/contactFeedBackType.js +2 -1
- package/dist/src/types/courseHasVisitorsType.js +2 -1
- package/dist/src/types/courseType.js +2 -1
- package/dist/src/types/dailyBookType.js +2 -1
- package/dist/src/types/dashboardManagementType.js +2 -1
- package/dist/src/types/driverType.js +2 -1
- package/dist/src/types/entityGroupType.js +2 -1
- package/dist/src/types/eventType.js +2 -1
- package/dist/src/types/examGroupType.js +2 -1
- package/dist/src/types/examHasAnswerSheetType.js +2 -1
- package/dist/src/types/examType.js +2 -1
- package/dist/src/types/facilityType.js +2 -1
- package/dist/src/types/featureActionType.js +2 -1
- package/dist/src/types/feeHistoryDetailsType.js +2 -1
- package/dist/src/types/feeHistoryType.js +2 -1
- package/dist/src/types/feeReminderSettingType.js +2 -1
- package/dist/src/types/feeReminderType.js +2 -1
- package/dist/src/types/feeReminderTypeType.js +2 -1
- package/dist/src/types/feeTypeHasTermsType.js +2 -1
- package/dist/src/types/feeTypeType.js +2 -1
- package/dist/src/types/feedBackType.js +2 -1
- package/dist/src/types/feesCollectionType.js +2 -1
- package/dist/src/types/fileStorageType.js +2 -1
- package/dist/src/types/floormanagementType.js +2 -1
- package/dist/src/types/generateIdCardType.js +2 -1
- package/dist/src/types/greetingsType.js +2 -1
- package/dist/src/types/holidayType.js +2 -1
- package/dist/src/types/homeWorkType.js +2 -1
- package/dist/src/types/informationSupportType.js +2 -1
- package/dist/src/types/inquiryType.js +2 -1
- package/dist/src/types/instituteEntityType.js +2 -1
- package/dist/src/types/instituteEntityTypeType.js +2 -1
- package/dist/src/types/instituteSubscriptionPlanType.js +2 -1
- package/dist/src/types/instituteType.js +2 -1
- package/dist/src/types/inventoryHistoryType.js +2 -1
- package/dist/src/types/inventoryType.js +2 -1
- package/dist/src/types/jobApply.js +2 -1
- package/dist/src/types/lectureHistoryType.js +2 -1
- package/dist/src/types/lectureType.js +2 -1
- package/dist/src/types/masterLeaveType.js +2 -1
- package/dist/src/types/moduleFeatureType.js +2 -1
- package/dist/src/types/moduleType.js +2 -1
- package/dist/src/types/offerType.js +2 -1
- package/dist/src/types/paymentTermsType.js +2 -1
- package/dist/src/types/pdcChequeType.js +2 -1
- package/dist/src/types/pdcHistoryType.js +2 -1
- package/dist/src/types/photosGalleryType.js +2 -1
- package/dist/src/types/plannerType.js +2 -1
- package/dist/src/types/productType.js +2 -1
- package/dist/src/types/projectAssessmentOptionType.js +2 -1
- package/dist/src/types/roleType.js +2 -1
- package/dist/src/types/rulesRegulationType.js +2 -1
- package/dist/src/types/schoolFeeCollectionType.js +2 -1
- package/dist/src/types/schoolFeeType.js +2 -1
- package/dist/src/types/schoolOfferType.js +2 -1
- package/dist/src/types/sendNotificationType.js +2 -1
- package/dist/src/types/slotType.js +2 -1
- package/dist/src/types/subCategoryType.js +2 -1
- package/dist/src/types/subjectHasFeeType.js +2 -1
- package/dist/src/types/subjectHasPayFeeHistoryType.js +2 -1
- package/dist/src/types/subjectIndexType.js +2 -1
- package/dist/src/types/subscriptionPlanType.js +2 -1
- package/dist/src/types/syllabusType.js +2 -1
- package/dist/src/types/taskManagementType.js +2 -1
- package/dist/src/types/testimonialType.js +2 -1
- package/dist/src/types/toDoType.js +2 -1
- package/dist/src/types/tripType.js +2 -1
- package/dist/src/types/typeManagementType.js +2 -1
- package/dist/src/types/uniqueNumberCounterType.js +2 -1
- package/dist/src/types/userBookAssessmentType.js +2 -1
- package/dist/src/types/userDetailsType.js +2 -1
- package/dist/src/types/userFeeTypeByAccountType.js +2 -1
- package/dist/src/types/userFeeTypeType.js +2 -1
- package/dist/src/types/userHasAnnouncementType.js +2 -1
- package/dist/src/types/userHasBatchType.js +2 -1
- package/dist/src/types/userHasCourseType.js +2 -1
- package/dist/src/types/userHasDeviceType.js +2 -1
- package/dist/src/types/userHasFeeTermsType.js +2 -1
- package/dist/src/types/userHasFileType.js +2 -1
- package/dist/src/types/userHasHomeWorkType.js +2 -1
- package/dist/src/types/userHasInventoryHistoryType.js +2 -1
- package/dist/src/types/userHasInventoryType.js +2 -1
- package/dist/src/types/userHasLeaveHistoryType.js +2 -1
- package/dist/src/types/userHasLeaveType.js +2 -1
- package/dist/src/types/userHasOffer.js +2 -1
- package/dist/src/types/userHasParentType.js +2 -1
- package/dist/src/types/userHasRoleType.js +2 -1
- package/dist/src/types/userHasRollNumberType.js +2 -1
- package/dist/src/types/userHasStorageType.js +2 -1
- package/dist/src/types/userHasSubjectFeeType.js +2 -1
- package/dist/src/types/userInstituteMetaType.js +2 -1
- package/dist/src/types/userLeaveRequestType.js +2 -1
- package/dist/src/types/userMetaType.js +2 -1
- package/dist/src/types/userPayoutDetailsType.js +2 -1
- package/dist/src/types/userPayoutHistoryType.js +2 -1
- package/dist/src/types/userPayoutType.js +2 -1
- package/dist/src/types/userProjectAssessmentOptionType.js +2 -1
- package/dist/src/types/userRequiredStepsType.js +2 -1
- package/dist/src/types/userSchoolMetaType.js +2 -1
- package/dist/src/types/userType.js +2 -1
- package/dist/src/types/vehicleType.js +2 -1
- package/dist/src/types/vendorType.js +2 -1
- package/dist/src/types/videoAnalystType.js +2 -1
- package/dist/src/types/walletHistoryType.js +2 -1
- package/dist/src/types/walletTransactionType.js +2 -1
- package/dist/src/types/walletType.js +2 -1
- package/dist/src/types/workingDayType.js +2 -1
- package/dist/src/types/workingShiftType.js +2 -1
- package/package.json +1 -1
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
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 mongoose_1 = require("mongoose");
|
|
7
|
+
const app_js_1 = require("../../constants/app.js");
|
|
8
|
+
const errorMessages_js_1 = require("../../constants/errorMessages.js");
|
|
9
|
+
const countryModel_js_1 = __importDefault(require("../psql/countryModel.js"));
|
|
10
|
+
const cityModel_js_1 = __importDefault(require("../psql/cityModel.js"));
|
|
11
|
+
const stateModel_js_1 = __importDefault(require("../psql/stateModel.js"));
|
|
12
|
+
const instituteModel_js_1 = __importDefault(require("../psql/instituteModel.js"));
|
|
13
|
+
const hscSscSchema = new mongoose_1.Schema({
|
|
9
14
|
centerCode: {
|
|
10
15
|
type: String,
|
|
11
16
|
required: false,
|
|
@@ -23,28 +28,28 @@ const hscSscSchema = new Schema({
|
|
|
23
28
|
required: false,
|
|
24
29
|
},
|
|
25
30
|
}, { _id: false });
|
|
26
|
-
const coInfrastructureSchema = new Schema({
|
|
31
|
+
const coInfrastructureSchema = new mongoose_1.Schema({
|
|
27
32
|
// id: {
|
|
28
33
|
// type: String,
|
|
29
34
|
// required: true,
|
|
30
35
|
// },
|
|
31
36
|
hostel: {
|
|
32
37
|
type: String,
|
|
33
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
38
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
34
39
|
required: false,
|
|
35
40
|
},
|
|
36
41
|
canteen: {
|
|
37
42
|
type: String,
|
|
38
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
43
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
39
44
|
required: false,
|
|
40
45
|
},
|
|
41
46
|
transport: {
|
|
42
47
|
type: String,
|
|
43
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
48
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
44
49
|
required: false,
|
|
45
50
|
},
|
|
46
51
|
}, { _id: false });
|
|
47
|
-
const schoolInformationSchema = new Schema({
|
|
52
|
+
const schoolInformationSchema = new mongoose_1.Schema({
|
|
48
53
|
description: {
|
|
49
54
|
type: String,
|
|
50
55
|
required: false,
|
|
@@ -123,7 +128,7 @@ const schoolInformationSchema = new Schema({
|
|
|
123
128
|
required: false,
|
|
124
129
|
},
|
|
125
130
|
}, { _id: false });
|
|
126
|
-
const trustInformationSchema = new Schema({
|
|
131
|
+
const trustInformationSchema = new mongoose_1.Schema({
|
|
127
132
|
// id: {
|
|
128
133
|
// type: String,
|
|
129
134
|
// required: true,
|
|
@@ -134,12 +139,12 @@ const trustInformationSchema = new Schema({
|
|
|
134
139
|
},
|
|
135
140
|
trustType: {
|
|
136
141
|
type: String,
|
|
137
|
-
enum: Object.values(TRUST_TYPE),
|
|
142
|
+
enum: Object.values(app_js_1.TRUST_TYPE),
|
|
138
143
|
required: false,
|
|
139
144
|
},
|
|
140
145
|
trustRegisteredUnder: {
|
|
141
146
|
type: String,
|
|
142
|
-
enum: Object.values(TRUST_REGISTERED_UNDER),
|
|
147
|
+
enum: Object.values(app_js_1.TRUST_REGISTERED_UNDER),
|
|
143
148
|
required: false,
|
|
144
149
|
},
|
|
145
150
|
trustName: {
|
|
@@ -193,7 +198,7 @@ const trustInformationSchema = new Schema({
|
|
|
193
198
|
required: false,
|
|
194
199
|
},
|
|
195
200
|
}, { _id: false });
|
|
196
|
-
const correspondentInformationSchema = new Schema({
|
|
201
|
+
const correspondentInformationSchema = new mongoose_1.Schema({
|
|
197
202
|
// correspondentId: {
|
|
198
203
|
// type: String,
|
|
199
204
|
// required: false,
|
|
@@ -209,7 +214,7 @@ const correspondentInformationSchema = new Schema({
|
|
|
209
214
|
},
|
|
210
215
|
trustType: {
|
|
211
216
|
type: String,
|
|
212
|
-
enum: Object.values(TRUST_TYPE),
|
|
217
|
+
enum: Object.values(app_js_1.TRUST_TYPE),
|
|
213
218
|
required: false,
|
|
214
219
|
},
|
|
215
220
|
address1: {
|
|
@@ -267,15 +272,15 @@ const correspondentInformationSchema = new Schema({
|
|
|
267
272
|
required: false,
|
|
268
273
|
},
|
|
269
274
|
}, { _id: false });
|
|
270
|
-
const trustiesInformationSchema = new Schema({
|
|
275
|
+
const trustiesInformationSchema = new mongoose_1.Schema({
|
|
271
276
|
// correspondentId: {
|
|
272
277
|
// type: String,
|
|
273
278
|
// required: false,
|
|
274
279
|
// },
|
|
275
280
|
isCorrespondent: {
|
|
276
281
|
type: String,
|
|
277
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
278
|
-
default: BOOLEAN_STATUS.NO,
|
|
282
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
283
|
+
default: app_js_1.BOOLEAN_STATUS.NO,
|
|
279
284
|
required: false,
|
|
280
285
|
},
|
|
281
286
|
authorizedPerson: {
|
|
@@ -284,7 +289,7 @@ const trustiesInformationSchema = new Schema({
|
|
|
284
289
|
},
|
|
285
290
|
designationOfPerson: {
|
|
286
291
|
type: String,
|
|
287
|
-
enum: Object.values(DESIGNATION_OF_PERSON),
|
|
292
|
+
enum: Object.values(app_js_1.DESIGNATION_OF_PERSON),
|
|
288
293
|
required: false,
|
|
289
294
|
},
|
|
290
295
|
address1: {
|
|
@@ -342,14 +347,14 @@ const trustiesInformationSchema = new Schema({
|
|
|
342
347
|
required: false,
|
|
343
348
|
},
|
|
344
349
|
}, { _id: false });
|
|
345
|
-
const buildingInformationSchema = new Schema({
|
|
350
|
+
const buildingInformationSchema = new mongoose_1.Schema({
|
|
346
351
|
// id: {
|
|
347
352
|
// type: String,
|
|
348
353
|
// required: true,
|
|
349
354
|
// },
|
|
350
355
|
buildingStatus: {
|
|
351
356
|
type: String,
|
|
352
|
-
enum: Object.values(PROPERTY_STATUS),
|
|
357
|
+
enum: Object.values(app_js_1.PROPERTY_STATUS),
|
|
353
358
|
required: false,
|
|
354
359
|
},
|
|
355
360
|
buildingOwnerName: {
|
|
@@ -358,12 +363,12 @@ const buildingInformationSchema = new Schema({
|
|
|
358
363
|
},
|
|
359
364
|
compoundedWall: {
|
|
360
365
|
type: String,
|
|
361
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
366
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
362
367
|
required: false,
|
|
363
368
|
},
|
|
364
369
|
playGroundStatus: {
|
|
365
370
|
type: String,
|
|
366
|
-
enum: Object.values(PROPERTY_STATUS),
|
|
371
|
+
enum: Object.values(app_js_1.PROPERTY_STATUS),
|
|
367
372
|
required: false,
|
|
368
373
|
},
|
|
369
374
|
playGroundOwnerName: {
|
|
@@ -376,12 +381,12 @@ const buildingInformationSchema = new Schema({
|
|
|
376
381
|
},
|
|
377
382
|
buildingPlanOfSchoolSanctioned: {
|
|
378
383
|
type: String,
|
|
379
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
384
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
380
385
|
required: false,
|
|
381
386
|
},
|
|
382
387
|
permissionTaken: {
|
|
383
388
|
type: String,
|
|
384
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
389
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
385
390
|
required: false,
|
|
386
391
|
},
|
|
387
392
|
tpNumber: {
|
|
@@ -401,7 +406,7 @@ const buildingInformationSchema = new Schema({
|
|
|
401
406
|
required: false,
|
|
402
407
|
},
|
|
403
408
|
}, { _id: false });
|
|
404
|
-
const userSchoolMetaModelSchema = new Schema({
|
|
409
|
+
const userSchoolMetaModelSchema = new mongoose_1.Schema({
|
|
405
410
|
instituteId: {
|
|
406
411
|
type: String,
|
|
407
412
|
required: true,
|
|
@@ -413,8 +418,8 @@ const userSchoolMetaModelSchema = new Schema({
|
|
|
413
418
|
},
|
|
414
419
|
isSubmitted: {
|
|
415
420
|
type: String,
|
|
416
|
-
enum: Object.values(BOOLEAN_STATUS),
|
|
417
|
-
default: BOOLEAN_STATUS.NO,
|
|
421
|
+
enum: Object.values(app_js_1.BOOLEAN_STATUS),
|
|
422
|
+
default: app_js_1.BOOLEAN_STATUS.NO,
|
|
418
423
|
required: false,
|
|
419
424
|
},
|
|
420
425
|
schoolInformation: {
|
|
@@ -457,9 +462,9 @@ userSchoolMetaModelSchema.pre("save", async function (next) {
|
|
|
457
462
|
await Promise.all([
|
|
458
463
|
(async () => {
|
|
459
464
|
if (userSchoolMeta.instituteId) {
|
|
460
|
-
const institute = await
|
|
465
|
+
const institute = await instituteModel_js_1.default.findByPk(userSchoolMeta.instituteId);
|
|
461
466
|
if (!institute) {
|
|
462
|
-
throw new Error(INSTITUTE_ERROR_MESSAGES.NOT_FOUND);
|
|
467
|
+
throw new Error(errorMessages_js_1.INSTITUTE_ERROR_MESSAGES.NOT_FOUND);
|
|
463
468
|
}
|
|
464
469
|
}
|
|
465
470
|
})(),
|
|
@@ -477,17 +482,17 @@ userSchoolMetaModelSchema.pre("save", async function (next) {
|
|
|
477
482
|
if (userSchoolMeta.correspondentInformation?.length) {
|
|
478
483
|
await Promise.all(userSchoolMeta.correspondentInformation.map(async (correspondent) => {
|
|
479
484
|
if (correspondent.city) {
|
|
480
|
-
const cityExists = await
|
|
485
|
+
const cityExists = await cityModel_js_1.default.findByPk(correspondent.city);
|
|
481
486
|
if (!cityExists)
|
|
482
487
|
throw new Error("City not found");
|
|
483
488
|
}
|
|
484
489
|
if (correspondent.state) {
|
|
485
|
-
const stateExists = await
|
|
490
|
+
const stateExists = await stateModel_js_1.default.findByPk(correspondent.state);
|
|
486
491
|
if (!stateExists)
|
|
487
492
|
throw new Error("State not found");
|
|
488
493
|
}
|
|
489
494
|
if (correspondent.country) {
|
|
490
|
-
const countryExists = await
|
|
495
|
+
const countryExists = await countryModel_js_1.default.findByPk(correspondent.country);
|
|
491
496
|
if (!countryExists)
|
|
492
497
|
throw new Error("Country not found");
|
|
493
498
|
}
|
|
@@ -498,17 +503,17 @@ userSchoolMetaModelSchema.pre("save", async function (next) {
|
|
|
498
503
|
if (userSchoolMeta.trustInformation?.length) {
|
|
499
504
|
await Promise.all(userSchoolMeta.trustInformation.map(async (trust) => {
|
|
500
505
|
if (trust.city) {
|
|
501
|
-
const cityExists = await
|
|
506
|
+
const cityExists = await cityModel_js_1.default.findByPk(trust.city);
|
|
502
507
|
if (!cityExists)
|
|
503
508
|
throw new Error("City not found");
|
|
504
509
|
}
|
|
505
510
|
if (trust.state) {
|
|
506
|
-
const stateExists = await
|
|
511
|
+
const stateExists = await stateModel_js_1.default.findByPk(trust.state);
|
|
507
512
|
if (!stateExists)
|
|
508
513
|
throw new Error("State not found");
|
|
509
514
|
}
|
|
510
515
|
if (trust.country) {
|
|
511
|
-
const countryExists = await
|
|
516
|
+
const countryExists = await countryModel_js_1.default.findByPk(trust.country);
|
|
512
517
|
if (!countryExists)
|
|
513
518
|
throw new Error("Country not found");
|
|
514
519
|
}
|
|
@@ -543,5 +548,5 @@ userSchoolMetaModelSchema.pre("save", async function (next) {
|
|
|
543
548
|
// );
|
|
544
549
|
// }
|
|
545
550
|
// }
|
|
546
|
-
const UserSchoolMetaModel = model("UserSchoolMeta", userSchoolMetaModelSchema);
|
|
547
|
-
|
|
551
|
+
const UserSchoolMetaModel = (0, mongoose_1.model)("UserSchoolMeta", userSchoolMetaModelSchema);
|
|
552
|
+
exports.default = UserSchoolMetaModel;
|
|
@@ -1,12 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
+
const GeoLocationSchema = new mongoose_1.Schema({
|
|
3
38
|
country: { type: String, required: false },
|
|
4
39
|
region: { type: String, required: false },
|
|
5
40
|
city: { type: String, required: false },
|
|
6
41
|
latitude: { type: Number, required: false },
|
|
7
42
|
longitude: { type: Number, required: false },
|
|
8
43
|
}, { _id: false });
|
|
9
|
-
const VideoAnalystSchema = new Schema({
|
|
44
|
+
const VideoAnalystSchema = new mongoose_1.Schema({
|
|
10
45
|
id: { type: String, required: false },
|
|
11
46
|
appName: { type: String, required: false },
|
|
12
47
|
randomNumber: { type: Number, required: false },
|
|
@@ -41,5 +76,5 @@ const VideoAnalystSchema = new Schema({
|
|
|
41
76
|
timestamps: false,
|
|
42
77
|
versionKey: false,
|
|
43
78
|
});
|
|
44
|
-
const VideoAnalystModel =
|
|
45
|
-
|
|
79
|
+
const VideoAnalystModel = mongoose_1.default.model('video_analyst', VideoAnalystSchema);
|
|
80
|
+
exports.default = VideoAnalystModel;
|
|
@@ -1,9 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
+
const app_js_1 = require("../../constants/app.js");
|
|
38
|
+
const utils_js_1 = require("../../helpers/utils.js");
|
|
39
|
+
const date_fns_1 = require("date-fns");
|
|
5
40
|
// --- Sub-schema for users in transaction ---
|
|
6
|
-
const walletTransactionUsersSchema = new Schema({
|
|
41
|
+
const walletTransactionUsersSchema = new mongoose_1.Schema({
|
|
7
42
|
userId: {
|
|
8
43
|
type: String,
|
|
9
44
|
required: true,
|
|
@@ -14,12 +49,12 @@ const walletTransactionUsersSchema = new Schema({
|
|
|
14
49
|
},
|
|
15
50
|
type: {
|
|
16
51
|
type: String,
|
|
17
|
-
enum: Object.values(WALLET_TRANSACTION_USERS_TYPE),
|
|
52
|
+
enum: Object.values(app_js_1.WALLET_TRANSACTION_USERS_TYPE),
|
|
18
53
|
required: true,
|
|
19
54
|
},
|
|
20
55
|
action: {
|
|
21
56
|
type: String,
|
|
22
|
-
enum: Object.values(WALLET_HISTORY_ACTION),
|
|
57
|
+
enum: Object.values(app_js_1.WALLET_HISTORY_ACTION),
|
|
23
58
|
required: true,
|
|
24
59
|
},
|
|
25
60
|
walletHistoryId: {
|
|
@@ -27,18 +62,18 @@ const walletTransactionUsersSchema = new Schema({
|
|
|
27
62
|
required: true,
|
|
28
63
|
},
|
|
29
64
|
userDetails: {
|
|
30
|
-
type: Schema.Types.Mixed,
|
|
65
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
31
66
|
default: {},
|
|
32
67
|
required: false,
|
|
33
68
|
},
|
|
34
69
|
}, { _id: false });
|
|
35
70
|
// --- Wallet Transaction Schema ---
|
|
36
|
-
const walletTransactionSchema = new Schema({
|
|
71
|
+
const walletTransactionSchema = new mongoose_1.Schema({
|
|
37
72
|
tId: {
|
|
38
73
|
type: String,
|
|
39
74
|
required: true,
|
|
40
75
|
unique: true,
|
|
41
|
-
default: () => generateUuidToNumber(),
|
|
76
|
+
default: () => (0, utils_js_1.generateUuidToNumber)(),
|
|
42
77
|
},
|
|
43
78
|
ptId: {
|
|
44
79
|
type: String,
|
|
@@ -51,7 +86,7 @@ const walletTransactionSchema = new Schema({
|
|
|
51
86
|
},
|
|
52
87
|
type: {
|
|
53
88
|
type: String,
|
|
54
|
-
enum: Object.values(WALLET_HISTORY_TYPE),
|
|
89
|
+
enum: Object.values(app_js_1.WALLET_HISTORY_TYPE),
|
|
55
90
|
required: true,
|
|
56
91
|
},
|
|
57
92
|
// userType: {
|
|
@@ -69,21 +104,21 @@ const walletTransactionSchema = new Schema({
|
|
|
69
104
|
},
|
|
70
105
|
itemType: {
|
|
71
106
|
type: String,
|
|
72
|
-
enum: Object.values(WALLET_HISTORY_ITEM_TYPE),
|
|
107
|
+
enum: Object.values(app_js_1.WALLET_HISTORY_ITEM_TYPE),
|
|
73
108
|
required: true,
|
|
74
109
|
},
|
|
75
110
|
item: {
|
|
76
|
-
type: Schema.Types.Mixed,
|
|
111
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
77
112
|
required: false,
|
|
78
113
|
},
|
|
79
114
|
status: {
|
|
80
115
|
type: String,
|
|
81
|
-
enum: Object.values(WALLET_HISTORY_STATUS),
|
|
82
|
-
default: WALLET_HISTORY_STATUS.PENDING,
|
|
116
|
+
enum: Object.values(app_js_1.WALLET_HISTORY_STATUS),
|
|
117
|
+
default: app_js_1.WALLET_HISTORY_STATUS.PENDING,
|
|
83
118
|
required: true,
|
|
84
119
|
},
|
|
85
120
|
orderDetails: {
|
|
86
|
-
type: Schema.Types.Mixed,
|
|
121
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
87
122
|
default: {},
|
|
88
123
|
required: false,
|
|
89
124
|
},
|
|
@@ -93,7 +128,7 @@ const walletTransactionSchema = new Schema({
|
|
|
93
128
|
},
|
|
94
129
|
validDate: {
|
|
95
130
|
type: Date,
|
|
96
|
-
default: addMinutes(new Date(), WALLET_TRANSACTION_VALID_DATE_IN_MINUTES),
|
|
131
|
+
default: (0, date_fns_1.addMinutes)(new Date(), app_js_1.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES),
|
|
97
132
|
required: false,
|
|
98
133
|
},
|
|
99
134
|
isOtpVerified: {
|
|
@@ -107,9 +142,9 @@ const walletTransactionSchema = new Schema({
|
|
|
107
142
|
},
|
|
108
143
|
paymentGateWayType: {
|
|
109
144
|
type: String,
|
|
110
|
-
enum: Object.values(PAYMENT_GATEWAY_TYPES),
|
|
145
|
+
enum: Object.values(app_js_1.PAYMENT_GATEWAY_TYPES),
|
|
111
146
|
required: false,
|
|
112
|
-
default: PAYMENT_GATEWAY_TYPES.COIN,
|
|
147
|
+
default: app_js_1.PAYMENT_GATEWAY_TYPES.COIN,
|
|
113
148
|
},
|
|
114
149
|
token: {
|
|
115
150
|
type: String,
|
|
@@ -124,5 +159,5 @@ const walletTransactionSchema = new Schema({
|
|
|
124
159
|
versionKey: false,
|
|
125
160
|
});
|
|
126
161
|
// --- Model ---
|
|
127
|
-
const WalletTransactionModel =
|
|
128
|
-
|
|
162
|
+
const WalletTransactionModel = mongoose_1.default.model('wallet_transactions', walletTransactionSchema);
|
|
163
|
+
exports.default = WalletTransactionModel;
|
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 app_js_1 = require("../../constants/app.js");
|
|
8
|
+
const instituteModel_js_1 = __importDefault(require("./instituteModel.js"));
|
|
9
|
+
const index_js_1 = require("./index.js");
|
|
10
|
+
const userModel_js_1 = __importDefault(require("./userModel.js"));
|
|
11
|
+
const categoriesModel_js_1 = __importDefault(require("./categoriesModel.js"));
|
|
12
|
+
class SubCategoriesModel extends sequelize_1.Model {
|
|
8
13
|
}
|
|
9
14
|
SubCategoriesModel.init({
|
|
10
15
|
id: {
|
|
11
|
-
type: DataTypes.UUID,
|
|
12
|
-
defaultValue: DataTypes.UUIDV4,
|
|
16
|
+
type: sequelize_1.DataTypes.UUID,
|
|
17
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
13
18
|
allowNull: false,
|
|
14
19
|
primaryKey: true,
|
|
15
20
|
},
|
|
16
21
|
name: {
|
|
17
|
-
type: DataTypes.STRING,
|
|
22
|
+
type: sequelize_1.DataTypes.STRING,
|
|
18
23
|
allowNull: true,
|
|
19
24
|
},
|
|
20
25
|
categoryId: {
|
|
21
|
-
type: DataTypes.UUID,
|
|
26
|
+
type: sequelize_1.DataTypes.UUID,
|
|
22
27
|
field: 'category_id',
|
|
23
28
|
allowNull: true,
|
|
24
29
|
},
|
|
25
30
|
instituteId: {
|
|
26
|
-
type: DataTypes.UUID,
|
|
31
|
+
type: sequelize_1.DataTypes.UUID,
|
|
27
32
|
field: 'institute_id',
|
|
28
33
|
allowNull: true,
|
|
29
34
|
},
|
|
30
35
|
status: {
|
|
31
|
-
type: DataTypes.STRING(30),
|
|
36
|
+
type: sequelize_1.DataTypes.STRING(30),
|
|
32
37
|
allowNull: true,
|
|
33
|
-
defaultValue: COMMAN_STATUS.ACTIVE,
|
|
38
|
+
defaultValue: app_js_1.COMMAN_STATUS.ACTIVE,
|
|
34
39
|
},
|
|
35
40
|
}, {
|
|
36
41
|
modelName: 'SubCategoriesModel',
|
|
37
42
|
tableName: 'sub_categories',
|
|
38
43
|
timestamps: true,
|
|
39
|
-
sequelize,
|
|
44
|
+
sequelize: index_js_1.sequelize,
|
|
40
45
|
});
|
|
41
|
-
SubCategoriesModel.belongsTo(
|
|
46
|
+
SubCategoriesModel.belongsTo(userModel_js_1.default, {
|
|
42
47
|
foreignKey: {
|
|
43
48
|
name: 'createdBy',
|
|
44
49
|
allowNull: true,
|
|
@@ -46,7 +51,7 @@ SubCategoriesModel.belongsTo(UserModel, {
|
|
|
46
51
|
},
|
|
47
52
|
as: 'createdByUser',
|
|
48
53
|
});
|
|
49
|
-
SubCategoriesModel.belongsTo(
|
|
54
|
+
SubCategoriesModel.belongsTo(userModel_js_1.default, {
|
|
50
55
|
foreignKey: {
|
|
51
56
|
name: 'updatedBy',
|
|
52
57
|
allowNull: true,
|
|
@@ -54,7 +59,7 @@ SubCategoriesModel.belongsTo(UserModel, {
|
|
|
54
59
|
},
|
|
55
60
|
as: 'updatedByUser',
|
|
56
61
|
});
|
|
57
|
-
SubCategoriesModel.belongsTo(
|
|
62
|
+
SubCategoriesModel.belongsTo(userModel_js_1.default, {
|
|
58
63
|
foreignKey: {
|
|
59
64
|
name: 'deletedBy',
|
|
60
65
|
allowNull: true,
|
|
@@ -62,7 +67,7 @@ SubCategoriesModel.belongsTo(UserModel, {
|
|
|
62
67
|
},
|
|
63
68
|
as: 'deletedByUser',
|
|
64
69
|
});
|
|
65
|
-
SubCategoriesModel.belongsTo(
|
|
70
|
+
SubCategoriesModel.belongsTo(instituteModel_js_1.default, {
|
|
66
71
|
foreignKey: {
|
|
67
72
|
name: 'instituteId',
|
|
68
73
|
field: 'institute_id',
|
|
@@ -70,7 +75,7 @@ SubCategoriesModel.belongsTo(InstituteModel, {
|
|
|
70
75
|
},
|
|
71
76
|
as: 'instituteSubCategory',
|
|
72
77
|
});
|
|
73
|
-
|
|
78
|
+
instituteModel_js_1.default.hasMany(SubCategoriesModel, {
|
|
74
79
|
foreignKey: {
|
|
75
80
|
name: 'instituteId',
|
|
76
81
|
field: 'institute_id',
|
|
@@ -78,7 +83,7 @@ InstituteModel.hasMany(SubCategoriesModel, {
|
|
|
78
83
|
},
|
|
79
84
|
as: 'categoriesInstitute',
|
|
80
85
|
});
|
|
81
|
-
SubCategoriesModel.belongsTo(
|
|
86
|
+
SubCategoriesModel.belongsTo(categoriesModel_js_1.default, {
|
|
82
87
|
foreignKey: {
|
|
83
88
|
name: 'categoryId',
|
|
84
89
|
field: 'category_id',
|
|
@@ -86,7 +91,7 @@ SubCategoriesModel.belongsTo(CategoriesModel, {
|
|
|
86
91
|
},
|
|
87
92
|
as: 'categories',
|
|
88
93
|
});
|
|
89
|
-
|
|
94
|
+
categoriesModel_js_1.default.hasMany(SubCategoriesModel, {
|
|
90
95
|
foreignKey: {
|
|
91
96
|
name: 'categoryId',
|
|
92
97
|
field: 'category_id',
|
|
@@ -94,4 +99,4 @@ CategoriesModel.hasMany(SubCategoriesModel, {
|
|
|
94
99
|
},
|
|
95
100
|
as: 'subCategoryOfCategory',
|
|
96
101
|
});
|
|
97
|
-
|
|
102
|
+
exports.default = SubCategoriesModel;
|