From 570e19d76c1a440ce3f29d4b43ac49adfead43ab Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 15 May 2024 19:43:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E6=8A=98=E6=89=A3?= =?UTF-8?q?=E5=8A=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/product/model.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/product/model.go b/model/product/model.go index cfa387d..3c9d327 100644 --- a/model/product/model.go +++ b/model/product/model.go @@ -35,12 +35,13 @@ type Product struct { Orderable bool `json:"orderable"` USPrice float64 `json:"usPrice"` + DiscPercent int `json:"discPercent" gorm:"index"` //折扣力度 CNYPrice float64 `json:"cnyPrice"` CalMark string `json:"calMark"` //计算价格的过程 DWPrice float64 `json:"dwPrice"` Freight float64 `json:"freight"` //运费 ExchangeRate float64 `json:"exchangeRate" gorm:"-"` //汇率 - Rate float64 `json:"rate"` //利润率 + Rate float64 `json:"rate" gorm:"index"` //利润率 PriceStatus PriceStatus `json:"priceStatus"` //价格状态 Remark string `json:"remark"` //备注 HistoryPrices []HistoryPrice `gorm:"foreignKey:Pid;references:Pid" json:"historyPrices"`