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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user