fix: 修复商品克重保存问题
- schema添加Weight字段 - Create和Update处理中添加Weight字段支持 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ type CreateProductRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
Price float64 `json:"price" binding:"gte=0"`
|
||||
Weight float64 `json:"weight"`
|
||||
MinPurchase int `json:"min_purchase"`
|
||||
MaxPurchase *int `json:"max_purchase"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
@@ -49,6 +50,7 @@ type UpdateProductRequest struct {
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
Price *float64 `json:"price"`
|
||||
Weight *float64 `json:"weight"`
|
||||
MinPurchase *int `json:"min_purchase"`
|
||||
MaxPurchase *int `json:"max_purchase"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
|
||||
Reference in New Issue
Block a user