fix: 商品价格验证从required改为gte=0,允许0价格
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user