获取某个商品平台价,商品名前缀

This commit is contained in:
苏尹岚
2019-12-19 18:40:46 +08:00
parent a3c236d281
commit dad7a5a926
17 changed files with 293 additions and 68 deletions

View File

@@ -170,10 +170,10 @@ type SkuName struct {
Prefix string `orm:"size(255)" json:"prefix"`
Name string `orm:"size(255);index" json:"name"`
ExPrefix string `orm:"size(255)" json:"exPrefix"`
ExPrefix string `orm:"size(255);index" json:"exPrefix"`
ExPrefixBegin time.Time `orm:"type(datetime);null" json:"exPrefixBegin"`
ExPrefixEnd time.Time `orm:"type(datetime);null" json:"exPrefixEnd"`
ExPrefixBegin *time.Time `orm:"null" json:"exPrefixBegin"`
ExPrefixEnd *time.Time `orm:"null" json:"exPrefixEnd"`
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo此属性暂时没有使用且有问题应该是不同平台都有一个brandid
CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别
@@ -209,6 +209,12 @@ func (*SkuName) TableUnique() [][]string {
}
}
func (*SkuName) TableIndex() [][]string {
return [][]string{
[]string{"ExPrefix", "ExPrefixBegin", "ExPrefixEnd"},
}
}
type Sku struct {
ModelIDCULD
@@ -234,8 +240,8 @@ type SkuAndName struct {
Prefix string
IsSpu int
ExPrefix string
ExPrefixBegin time.Time
ExPrefixEnd time.Time
ExPrefixBegin *time.Time
ExPrefixEnd *time.Time
}
func (*Sku) TableUnique() [][]string {