From 2b6e25f979840dece8d767a6fdc9874bf0995d53 Mon Sep 17 00:00:00 2001 From: Mazyar Date: Sun, 21 Jun 2026 15:24:19 +0330 Subject: [PATCH] Update rank field type in tender and onboarding response structures - Changed the `Rank` field type from `string` to `int` in the `RecommendedTenderResponse` struct within the `company` domain for better data representation. - Updated the `Rank` field type from `string` to `int` in the `TenderResponse` struct within the `tender` domain to ensure consistency in ranking data. - Modified the `Rank` field type from `string` to `int` in the `RecommendedTender` struct within the AI summarizer package to align with the updated data structure. This update enhances the data integrity and consistency across the tender management system by standardizing the rank representation as an integer. --- internal/company/form.go | 2 +- internal/tender/form.go | 2 +- pkg/ai_summarizer/entities.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/company/form.go b/internal/company/form.go index 2cd4c58..874de64 100644 --- a/internal/company/form.go +++ b/internal/company/form.go @@ -192,7 +192,7 @@ type OnboardingResponse struct { // RecommendedTenderResponse is one ranked tender recommendation from the AI service. type RecommendedTenderResponse struct { - Rank string `json:"rank"` + Rank int `json:"rank"` TenderID string `json:"tender_id"` Analysis string `json:"analysis"` } diff --git a/internal/tender/form.go b/internal/tender/form.go index 8826009..0e3dd45 100644 --- a/internal/tender/form.go +++ b/internal/tender/form.go @@ -234,7 +234,7 @@ type TenderResponse struct { OverallSummary string `json:"overall_summary,omitempty"` Language string `json:"language,omitempty"` - Rank string `json:"rank,omitempty"` + Rank int `json:"rank,omitempty"` Analysis string `json:"analysis,omitempty"` } diff --git a/pkg/ai_summarizer/entities.go b/pkg/ai_summarizer/entities.go index eb9176e..2fa3eb3 100644 --- a/pkg/ai_summarizer/entities.go +++ b/pkg/ai_summarizer/entities.go @@ -266,7 +266,7 @@ type RecommendRequest struct { // RecommendedTender is one ranked tender from POST /recommend. type RecommendedTender struct { - Rank string `json:"rank"` + Rank int `json:"rank"` TenderID string `json:"tender_id"` Analysis string `json:"analysis"` }