Integrate Notification SDK into Inquiry Service

- Updated the InquiryService to include a notification SDK for sending notifications upon inquiry creation, enhancing user engagement.
- Modified the NewInquiryService constructor to accept the notification SDK as a dependency, adhering to dependency injection principles.
- Refactored the Create method to send notifications with inquiry details, improving communication and response to inquiries.
- Cleaned up commented-out code related to duplicate inquiry checks for better readability and maintainability.
This commit is contained in:
n.nakhostin
2025-09-21 12:23:26 +03:30
parent 5906904caf
commit c22d98d4bb
4 changed files with 377 additions and 42 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ func main() {
tenderService := tender.NewTenderService(tenderRepository, companyService, logger)
feedbackService := feedback.NewFeedbackService(feedbackRepo, tenderService, logger)
tenderApprovalService := tender_approval.NewTenderApprovalService(tenderApprovalRepository, tenderService, logger)
inquiryService := inquiry.NewInquiryService(inquiryRepository, logger)
inquiryService := inquiry.NewInquiryService(inquiryRepository, notificationSDK, logger)
flagService := assets.NewFlagService(logger, conf.Assets.FlagsPath)
notificationService := notification.NewNotificationService(notificationSDK, userService, customerService, logger)
logger.Info("Services initialized successfully", map[string]interface{}{