feat product包含CalculateProcess

This commit is contained in:
timerzz 2024-06-15 19:44:54 +08:00
parent 3490bc7e57
commit 585b23cbfb

View File

@ -18,6 +18,7 @@ type Website int
const (
WebSite_US_Coach_Outlet Website = iota + 1
WebSite_CN_Coach_Outlet
WebSite_CN_Coach
)
@ -54,8 +55,9 @@ type Product struct {
PriceStatus PriceStatus `json:"priceStatus"` //价格状态
Remark string `json:"remark"` //备注
HistoryPrices []HistoryPrice `gorm:"foreignKey:Pid;references:Pid" json:"historyPrices"`
DWHistoryPrices []DWHistoryPrice `gorm:"foreignKey:Pid;references:Pid" json:"dwHistoryPrices"`
HistoryPrices []HistoryPrice `gorm:"foreignKey:Pid;references:Pid" json:"historyPrices"`
DWHistoryPrices []DWHistoryPrice `gorm:"foreignKey:Pid;references:Pid" json:"dwHistoryPrices"`
CalculateProcess []CalculateProcess `gorm:"foreignKey:Pid;references:Pid" json:"calculateProcess"`
}
func (p *Product) TableName() string {
@ -65,7 +67,6 @@ func (p *Product) TableName() string {
func (p *Product) Env() map[string]any {
return map[string]any{
"originalPrice": p.OriginalPrice,
"dwPrice": p.DWPrice,
"freight": p.Freight,
"exchangeRate": p.ExchangeRate,
}