From 7c91cdb4c9deaf8a4d92e24c8da26056ca9c5556 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 26 May 2026 10:09:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E4=BB=8Erequired=E6=94=B9=E4=B8=BAgte=3D0?= =?UTF-8?q?=EF=BC=8C=E5=85=81=E8=AE=B80=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/schemas/product.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/schemas/product.go b/backend/internal/schemas/product.go index cc92b5d..1a3b2b2 100644 --- a/backend/internal/schemas/product.go +++ b/backend/internal/schemas/product.go @@ -29,7 +29,7 @@ type UpdateCategoryRequest struct { type CreateProductRequest struct { Name string `json:"name" binding:"required"` Description string `json:"description"` - Price float64 `json:"price" binding:"required"` + Price float64 `json:"price" binding:"gte=0"` MinPurchase int `json:"min_purchase"` MaxPurchase *int `json:"max_purchase"` MinWeight *float64 `json:"min_weight"`