From 9fc9b211bf77521968cc265ba5dd7325a1b3aef2 Mon Sep 17 00:00:00 2001 From: Tiago Yamamoto Date: Mon, 22 Dec 2025 15:38:56 -0300 Subject: [PATCH] fix(backend): add db tags to TopProduct struct for sqlx mapping --- backend/internal/domain/models.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/internal/domain/models.go b/backend/internal/domain/models.go index 93b6c4b..e92f1db 100644 --- a/backend/internal/domain/models.go +++ b/backend/internal/domain/models.go @@ -332,10 +332,10 @@ type CompanyRating struct { // TopProduct aggregates seller performance per SKU. type TopProduct struct { - ProductID uuid.UUID `json:"product_id"` - Name string `json:"name"` - TotalQuantity int64 `json:"total_quantity"` - RevenueCents int64 `json:"revenue_cents"` + ProductID uuid.UUID `db:"product_id" json:"product_id"` + Name string `db:"name" json:"name"` + TotalQuantity int64 `db:"total_quantity" json:"total_quantity"` + RevenueCents int64 `db:"revenue_cents" json:"revenue_cents"` } // SellerDashboard summarizes commercial metrics for sellers.