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:
+67
-15
@@ -512,20 +512,6 @@ definitions:
|
||||
example: reset_token_here
|
||||
type: string
|
||||
type: object
|
||||
feedback.CompanyFeedbackStatsResponse:
|
||||
properties:
|
||||
company_id:
|
||||
type: string
|
||||
last_updated:
|
||||
description: Unix timestamp
|
||||
type: integer
|
||||
total_dislikes:
|
||||
type: integer
|
||||
total_feedback:
|
||||
type: integer
|
||||
total_likes:
|
||||
type: integer
|
||||
type: object
|
||||
feedback.FeedbackListResponse:
|
||||
properties:
|
||||
feedback:
|
||||
@@ -537,6 +523,8 @@ definitions:
|
||||
type: object
|
||||
feedback.FeedbackResponse:
|
||||
properties:
|
||||
company:
|
||||
$ref: '#/definitions/feedback.companyResponse'
|
||||
company_id:
|
||||
type: string
|
||||
created_at:
|
||||
@@ -548,6 +536,8 @@ definitions:
|
||||
id:
|
||||
type: string
|
||||
tender:
|
||||
$ref: '#/definitions/feedback.tenderResponse'
|
||||
tender_id:
|
||||
type: string
|
||||
updated_at:
|
||||
type: integer
|
||||
@@ -560,6 +550,21 @@ definitions:
|
||||
x-enum-varnames:
|
||||
- FeedbackTypeLike
|
||||
- FeedbackTypeDislike
|
||||
feedback.StatsResponse:
|
||||
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
|
||||
type: object
|
||||
feedback.ToggleFeedbackForm:
|
||||
properties:
|
||||
feedback_type:
|
||||
@@ -574,6 +579,53 @@ definitions:
|
||||
- feedback_type
|
||||
- tender_id
|
||||
type: object
|
||||
feedback.companyResponse:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
feedback.organizationResponse:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
feedback.tenderResponse:
|
||||
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
|
||||
type: object
|
||||
inquiry.CreateInquiryForm:
|
||||
properties:
|
||||
company_name:
|
||||
@@ -4508,7 +4560,7 @@ paths:
|
||||
- $ref: '#/definitions/response.APIResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/feedback.CompanyFeedbackStatsResponse'
|
||||
$ref: '#/definitions/feedback.StatsResponse'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad request - Missing company association
|
||||
|
||||
Reference in New Issue
Block a user