Files
jx-callback/business/model/sync_map.go
苏尹岚 575b80d890 aa
2021-01-26 08:59:14 +08:00

35 lines
1013 B
Go

package model
const (
ThingTypeCategory = 1
ThingTypeSkuName = 2
ThingTypeSku = 3
ThingTypeStore = 4
ThingTypeUser = 5
ThingTypeOrder = 6
)
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);index" json:"vendorThingID"`
SyncStatus int8 `orm:"default(2)" json:"syncStatus"`
Remark string `orm:"size(255)" json:"remark"`
ThingName string `json:"thingName"`
ThingSeq int `json:"thingSeq"`
}
func (*ThingMap) TableUnique() [][]string {
return [][]string{
[]string{"ThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
// []string{"VendorThingID", "ThingType", "VendorID", "VendorOrgCode", "DeletedAt"},
}
}