From d23b51252e8a4c945e2033779eadab0acced01e7 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Fri, 13 Aug 2021 13:57:43 +0800 Subject: [PATCH] a --- business/model/act.go | 33 ++++++++++++++++++++++----------- globals/beegodb/beegodb.go | 1 + 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/business/model/act.go b/business/model/act.go index f05eef705..ff26262a6 100644 --- a/business/model/act.go +++ b/business/model/act.go @@ -262,15 +262,26 @@ func (*StoreSkuAct) TableUnique() [][]string { type ActMtwmVendor struct { ModelIDCUL - StoreID int `orm:"column(store_id)" json:"store_id"` - SkuID int `orm:"column(sku_id);index" json:"sku_id"` - VendorStoreID string `orm:"column(vendor_store_id)" json:"vendor_store_id"` - - ActPercentage int `json:"actPercentage"` // 直降活动百分比 - SyncStatus int8 `orm:"default(2)" json:"syncStatus"` - // ActID int `orm:"column(act_id);index" json:"actID"` - VendorActID string `orm:"column(vendor_act_id);size(48);index" json:"vendorActID"` - HintActID int `orm:"column(hint_act_id);size(48);index" json:"hintActID"` - VendorActPrice int64 `json:"vendorActPrice"` // 保存数据用,实际的活动价 - Remark string `orm:"column(remark);size(1024)" json:"remark"` + StoreID int `orm:"column(store_id)" json:"storeID"` + SkuID int `orm:"column(sku_id);index" json:"skuID"` + VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"` + BeginAt time.Time `json:"beginAt"` //活动时间 + EndAt time.Time `json:"endAt"` + SkuName string `json:"skuName"` //商品名 + OriginPrice float64 `json:"originPrice"` + ActPrice float64 `json:"actPrice"` + DiscountCoefficient float64 `json:"discountCoefficient"` //折扣系数 + Status int `json:"status"` //活动当前的状态,参考值:0-已过期;1-已生效;2-待生效 + ItemID string `orm:"column(item_id)" json:"itemID"` + OrderLimit int `json:"orderLimit"` //每单限购 + DayLimit int `json:"dayLimit"` //当日活动库存 + Period string `json:"period"` //生效时段 + WeeksTime string `json:"weeksTime"` //生效活动周期 + SettingType int `json:"settingType"` //活动开展类型,参考值:0-按折扣系数开展活动;1-按折扣价格开展活动。 +} + +func (*ActMtwmVendor) TableIndex() [][]string { + return [][]string{ + []string{"StoreID", "SkuID", "DeletedAt"}, + } } diff --git a/globals/beegodb/beegodb.go b/globals/beegodb/beegodb.go index 08b947f13..f737ba00e 100644 --- a/globals/beegodb/beegodb.go +++ b/globals/beegodb/beegodb.go @@ -79,6 +79,7 @@ func Init() { if globals.IsStoreSkuAct { orm.RegisterModel(&model.StoreSkuAct{}) } + orm.RegisterModel(&model.ActMtwmVendor{}) orm.RegisterModel(&model.NewConfig{})