Refactor Feedback Service to Include Tender Information in Responses

- Updated the FeedbackService to include a new dependency on TenderService, allowing feedback responses to include associated tender details.
- Modified the ListFeedback method to return a new FeedbackListWithTenderResponse type, which includes feedback along with tender information.
- Enhanced the feedback entity and form structures to support the new response format, improving the API's capability to provide comprehensive feedback data.
- Adjusted the main application initialization to reflect the changes in the feedback service dependencies.
This commit is contained in:
n.nakhostin
2025-09-02 11:31:59 +03:30
parent c684a12155
commit 8f909618d8
5 changed files with 106 additions and 23 deletions
-7
View File
@@ -3,7 +3,6 @@ package feedback
import (
"time"
"tm/pkg/mongo"
"tm/pkg/response"
)
// FeedbackType represents the type of feedback
@@ -43,12 +42,6 @@ type FeedbackSearchCriteria struct {
Offset int `json:"offset,omitempty"`
}
// FeedbackListResponse represents a paginated list of feedback
type FeedbackListResponse struct {
Feedback []*FeedbackResponse `json:"feedback"`
Meta *response.Meta `json:"meta"`
}
// GetID returns the feedback ID
func (f *Feedback) GetID() string {
return f.ID.Hex()