+ThingMap

+OnxxThing
This commit is contained in:
gazebo
2019-12-04 10:57:31 +08:00
parent f69173bd2e
commit 2635fb035a
5 changed files with 128 additions and 76 deletions

View File

@@ -0,0 +1,26 @@
package model
const (
ThingTypeCategory = 1
ThingTypSkuName = 2
ThingTypeSku = 3
)
type ThingMap struct {
ModelIDCULD
ThingID int64 `orm:"column(thing_id)" json:"thingID"`
ThingType int8 `json:"thingType"`
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"`
SyncStatus int8 `orm:"default(2)"`
}
func (*ThingMap) TableUnique() [][]string {
return [][]string{
[]string{"ThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
[]string{"VendorThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
}
}