Refactor Tender Management API Endpoints and Update Documentation

- Renamed and restructured tender-related API endpoints for improved clarity and consistency, including changing the route from `/admin/tenders` to `/admin/v1/companies` and updating the associated methods.
- Introduced a new SearchForm structure for listing tenders with advanced filtering capabilities, enhancing the API's search functionality.
- Updated the service and repository layers to align with the new endpoint structure, ensuring proper handling of tender data.
- Enhanced Swagger and YAML documentation to reflect the changes in endpoint structure, including detailed descriptions and examples for the new search functionality.
- Improved error handling and response structures to provide clearer feedback to API consumers, ensuring a more robust and user-friendly experience.
This commit is contained in:
n.nakhostin
2025-09-08 14:20:50 +03:30
parent 3b265e567d
commit 3911180486
11 changed files with 1216 additions and 1382 deletions
-21
View File
@@ -119,27 +119,6 @@ const (
TenderSourceBulkImport TenderSource = "bulk_import"
)
// TenderSearchCriteria represents search criteria for tenders
type TenderSearchCriteria struct {
Query string `json:"query,omitempty"`
NoticeType string `json:"notice_type,omitempty"`
ProcurementType string `json:"procurement_type,omitempty"`
CountryCodes []string `json:"country_codes,omitempty"`
RegionCodes []string `json:"region_codes,omitempty"`
Classifications []string `json:"classifications,omitempty"`
MinEstimatedValue *float64 `json:"min_estimated_value,omitempty"`
MaxEstimatedValue *float64 `json:"max_estimated_value,omitempty"`
Currency string `json:"currency,omitempty"`
DeadlineFrom *int64 `json:"deadline_from,omitempty"`
DeadlineTo *int64 `json:"deadline_to,omitempty"`
PublicationDateFrom *int64 `json:"publication_date_from,omitempty"`
PublicationDateTo *int64 `json:"publication_date_to,omitempty"`
Status []TenderStatus `json:"status,omitempty"`
Source []TenderSource `json:"source,omitempty"`
BuyerOrganizationID string `json:"buyer_organization_id,omitempty"`
Languages []string `json:"languages,omitempty"`
}
// TenderStatistics represents tender statistics
type TenderStatistics struct {
TotalTenders int64 `json:"total_tenders"`