From 9d1f42a7f7285811f1a41d625b0f719a2991a2b9 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期一, 05 二月 2024 16:18:35 +0800
Subject: [PATCH] 产品添加字段

---
 model/product.go  |    2 ++
 api/v1/product.go |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/api/v1/product.go b/api/v1/product.go
index ee678df..a58e4a2 100644
--- a/api/v1/product.go
+++ b/api/v1/product.go
@@ -95,6 +95,8 @@
 		productList[k].Amount = decimal.NewFromFloat(1)
 		productList[k].Total = productList[k].Price.Mul(productList[k].Amount).Round(2)
 		productList[k].Unit = v.Unit
+		productList[k].Type = v.Type
+		productList[k].Specs = v.Specs
 	}
 
 	ctx.OkWithDetailed(response.ListResponse{
diff --git a/model/product.go b/model/product.go
index a656777..fa92985 100644
--- a/model/product.go
+++ b/model/product.go
@@ -19,6 +19,8 @@
 		Cost       string          `json:"cost" gorm:"column:cost;type:varchar(255);comment:浜у搧鎴愭湰"`
 		Profit     string          `json:"profit" gorm:"column:profit;type:varchar(255);comment:姣涘埄"`
 		Margin     string          `json:"margin" gorm:"column:margin;type:varchar(255);comment:姣涘埄鐜�"`
+		Specs      string          `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
+		Type       string          `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
 		gorm.Model `json:"-"`
 	}
 

--
Gitblit v1.8.0