加入ThingMap表示商品库的同步信息

This commit is contained in:
gazebo
2019-12-05 09:04:23 +08:00
parent 527659bf55
commit e742d88efd
4 changed files with 67 additions and 23 deletions

View File

@@ -14,13 +14,13 @@ type ThingMap struct {
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
VendorOrgCode string `orm:"size(32)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
VendorThingID string `orm:"size(32);column(vendor_thing_id)" json:"vendorThingID"`
VendorThingID string `orm:"size(32);column(vendor_thing_id);index" json:"vendorThingID"`
SyncStatus int8 `orm:"default(2)"`
}
func (*ThingMap) TableUnique() [][]string {
return [][]string{
[]string{"ThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
[]string{"VendorThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
// []string{"VendorThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
}
}