Refactor Feedback Module for Consistency and Clarity

- Updated feedback repository and service methods to use a consistent naming convention, changing `NewTenderRepository` and similar methods to `NewRepository`.
- Refactored feedback handler methods to improve clarity by renaming methods such as `ListFeedback` to `Search` and `GetFeedback` to `Get`.
- Enhanced feedback response structures to include detailed company and tender information, improving the clarity of feedback data returned to API consumers.
- Updated Swagger documentation to reflect changes in feedback response structures and endpoint paths, ensuring accurate representation of the API for consumers.
This commit is contained in:
n.nakhostin
2025-09-24 12:20:19 +03:30
parent cdf15c9d49
commit a342da193e
29 changed files with 666 additions and 702 deletions
+102 -22
View File
@@ -5020,7 +5020,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/feedback.CompanyFeedbackStatsResponse"
"$ref": "#/definitions/feedback.StatsResponse"
}
}
}
@@ -7669,27 +7669,6 @@
}
}
},
"feedback.CompanyFeedbackStatsResponse": {
"type": "object",
"properties": {
"company_id": {
"type": "string"
},
"last_updated": {
"description": "Unix timestamp",
"type": "integer"
},
"total_dislikes": {
"type": "integer"
},
"total_feedback": {
"type": "integer"
},
"total_likes": {
"type": "integer"
}
}
},
"feedback.FeedbackListResponse": {
"type": "object",
"properties": {
@@ -7707,6 +7686,9 @@
"feedback.FeedbackResponse": {
"type": "object",
"properties": {
"company": {
"$ref": "#/definitions/feedback.companyResponse"
},
"company_id": {
"type": "string"
},
@@ -7723,6 +7705,9 @@
"type": "string"
},
"tender": {
"$ref": "#/definitions/feedback.tenderResponse"
},
"tender_id": {
"type": "string"
},
"updated_at": {
@@ -7741,6 +7726,29 @@
"FeedbackTypeDislike"
]
},
"feedback.StatsResponse": {
"type": "object",
"properties": {
"company": {
"$ref": "#/definitions/feedback.companyResponse"
},
"company_id": {
"type": "string"
},
"last_updated": {
"type": "integer"
},
"total_dislikes": {
"type": "integer"
},
"total_feedback": {
"type": "integer"
},
"total_likes": {
"type": "integer"
}
}
},
"feedback.ToggleFeedbackForm": {
"type": "object",
"required": [
@@ -7764,6 +7772,78 @@
}
}
},
"feedback.companyResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"feedback.organizationResponse": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"feedback.tenderResponse": {
"type": "object",
"properties": {
"buyer_organization": {
"$ref": "#/definitions/feedback.organizationResponse"
},
"country_code": {
"type": "string"
},
"currency": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "string"
},
"duration_unit": {
"type": "string"
},
"estimated_value": {
"type": "number"
},
"id": {
"type": "string"
},
"notice_publication_id": {
"type": "string"
},
"procedure_code": {
"type": "string"
},
"procurement_type_code": {
"type": "string"
},
"publication_date": {
"type": "integer"
},
"status": {
"type": "string"
},
"submission_deadline": {
"type": "integer"
},
"tender_deadline": {
"type": "integer"
},
"title": {
"type": "string"
}
}
},
"inquiry.CreateInquiryForm": {
"type": "object",
"properties": {