- 营销活动API临时版本
This commit is contained in:
129
business/model/act.go
Normal file
129
business/model/act.go
Normal file
@@ -0,0 +1,129 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
ActSkuDirectDown = 1
|
||||
ActSkuSecKill = 2
|
||||
|
||||
ActOrderBegin = 10
|
||||
ActOrderMoneyOff = 11
|
||||
ActOrderMoneyOffCoupon = 12
|
||||
ActOrderReduceFreight = 13
|
||||
ActOrderReduceFreightCoupon = 14
|
||||
)
|
||||
|
||||
type Act struct {
|
||||
ModelIDCULD
|
||||
|
||||
Name string `orm:"size(64)" json:"name"`
|
||||
Advertising string `orm:"size(255)" json:"advertising"`
|
||||
Type int `json:"type"`
|
||||
Status int `json:"status"`
|
||||
LimitDevice int `json:"limitDevice"`
|
||||
LimitPin int `json:"limitPin"`
|
||||
LimitDaily int `json:"limitDaily"`
|
||||
LimitCount int `json:"limitCount"`
|
||||
Source string `orm:"size(255)" json:"source"`
|
||||
CreateType int `json:"createType"`
|
||||
PricePercentage int `json:"pricePercentage"` // 单品级活动才有效
|
||||
BeginAt time.Time `orm:"type(datetime);index;null" json:"beginAt"`
|
||||
EndAt time.Time `orm:"type(datetime);index;null" json:"endAt"`
|
||||
}
|
||||
|
||||
type ActMap struct {
|
||||
ModelIDCULD
|
||||
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
}
|
||||
|
||||
type Act2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
Act
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
}
|
||||
|
||||
type ActOrderRule struct {
|
||||
ModelIDCULD
|
||||
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
SalePrice int64 `orm:"" json:"salePrice"` // 满的价格
|
||||
DeductPrice int64 `orm:"" json:"deductPrice"` // 减的价格
|
||||
}
|
||||
|
||||
// type ActStore struct {
|
||||
// ModelIDCULD
|
||||
|
||||
// ActID int `orm:"column(act_id)" json:"actID"`
|
||||
// StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
// }
|
||||
|
||||
type ActStoreMap struct {
|
||||
ModelIDCULD
|
||||
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
}
|
||||
|
||||
type ActStore2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
ActStoreMap
|
||||
|
||||
VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"`
|
||||
}
|
||||
|
||||
type ActStoreSku struct {
|
||||
ModelIDCULD
|
||||
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
SkuID int `orm:"column(sku_id)" json:"skuID"`
|
||||
|
||||
// LocalStatus int // 这个状态是多个平台的
|
||||
// RemoteStatus int // 这个状态是多个平台的
|
||||
OriginalPrice int64 `orm:"" json:"originalPrice"` // 单品级活动用,创建活动时商品的原始京西价
|
||||
PricePercentage int `orm:"" json:"pricePercentage"` // 单品级活动用,SKU级的价格比例,非0覆盖Act中的PricePercentage
|
||||
ActPrice int64 `orm:"" json:"actPrice"` // 单品级活动用,SKU级指定的价格,非0覆盖CustomPricePercentage与Act中的PricePercentage
|
||||
|
||||
Stock int `orm:"" json:"stock"` // 订单级活动用
|
||||
}
|
||||
|
||||
type ActStoreSkuMap struct {
|
||||
ModelIDCULD
|
||||
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
SkuID int `orm:"column(sku_id)" json:"skuID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
ActualActPrice int64 `orm:"" json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
|
||||
}
|
||||
|
||||
type ActStoreSku2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
ActStoreSku
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
ActualActPrice int64 `orm:"" json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
|
||||
|
||||
VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"`
|
||||
VendorSkuID string `orm:"column(vendor_sku_id)" json:"vendorSkuID"`
|
||||
}
|
||||
Reference in New Issue
Block a user