- 重构新京西活动,平台接口定为笼统的SyncAct,京平台支持添加,删除商品,暂不支持修改
This commit is contained in:
@@ -48,6 +48,13 @@ type ActMap struct {
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
}
|
||||
|
||||
func (*ActMap) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"ActID", "VendorID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
// 不建表
|
||||
type Act2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
@@ -66,32 +73,6 @@ type ActOrderRule struct {
|
||||
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
|
||||
|
||||
@@ -111,13 +92,14 @@ type ActStoreSku struct {
|
||||
|
||||
func (*ActStoreSku) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"ActID", "SkuID", "StoreID", "DeletedAt"},
|
||||
[]string{"ActID", "StoreID", "SkuID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type ActStoreSkuMap struct {
|
||||
ModelIDCULD
|
||||
|
||||
BindID int `orm:"column(bind_id)" json:"bindID"`
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
SkuID int `orm:"column(sku_id)" json:"skuID"`
|
||||
@@ -128,6 +110,19 @@ type ActStoreSkuMap struct {
|
||||
ActualActPrice int64 `orm:"" json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
|
||||
}
|
||||
|
||||
func (*ActStoreSkuMap) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"ActID", "BindID", "VendorID"},
|
||||
}
|
||||
}
|
||||
|
||||
func (*ActStoreSkuMap) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"ActID", "StoreID", "SkuID", "VendorID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
// 不建表
|
||||
type ActStoreSku2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user