Add AI procedure reference formatting and parsing functions with unit tests
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Introduced `FormatAIProcedureRef` and `ParseAIProcedureRef` functions in the `tender` domain for handling AI service tender references. - Added unit tests for these functions in `ai_reference_test.go` to ensure correct parsing and formatting behavior. - Updated the `TenderResponse` struct to include a new `ProcedureRef` field for improved data representation. - Enhanced the `GetByProcedureReference` method in the repository to retrieve tenders based on the new procedure reference format. - Modified the `Recommend` method in the service layer to utilize the new procedure reference handling, improving the recommendation process. This update enhances the handling of AI procedure references, ensuring better data integrity and usability in the tender management system.
This commit is contained in:
@@ -288,7 +288,7 @@ func (h *TenderHandler) GetPublicTenders(c echo.Context) error {
|
||||
|
||||
// RecommendTenders returns AI-ranked tender recommendations for the authenticated customer's company
|
||||
// @Summary Get recommended tenders
|
||||
// @Description Retrieve tenders ranked by opp-code overlap with the authenticated customer's company via the AI recommendation service
|
||||
// @Description Retrieve AI-ranked tenders with full tender details. AI tender_id values use PROC_{contract_folder_id}/{notice_publication_id}; each item includes rank, analysis, procedure_ref, and the standard tender fields.
|
||||
// @Tags Tenders
|
||||
// @Produce json
|
||||
// @Param limit query int false "Number of items per page (default: 10, max: 100)"
|
||||
|
||||
Reference in New Issue
Block a user