增加商品额外前缀

This commit is contained in:
苏尹岚
2019-12-17 17:34:51 +08:00
parent b2994f13cd
commit 9fdae12a66
10 changed files with 146 additions and 19 deletions

View File

@@ -1,5 +1,7 @@
package model
import "time"
const (
SkuCategoryNormal = 0
SkuCategorySpecial = 1
@@ -166,8 +168,12 @@ func (*SkuCategory) TableIndex() [][]string {
type SkuName struct {
ModelIDCULD
Prefix string `orm:"size(255)" json:"prefix"`
Name string `orm:"size(255);index" json:"name"`
Prefix string `orm:"size(255)" json:"prefix"`
Name string `orm:"size(255);index" json:"name"`
ExPrefix string `orm:"size(255)" json:"exPrefix"`
ExPrefixBegin time.Time `orm:"type(datetime);null" json:"exPrefixBegin"`
ExPrefixEnd time.Time `orm:"type(datetime);null" json:"exPrefixEnd"`
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo此属性暂时没有使用且有问题应该是不同平台都有一个brandid
CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别
@@ -255,9 +261,9 @@ type SkuWithVendor struct {
type SkuNameExt struct {
SkuName
Skus []*SkuWithVendor `orm:"-" json:"skus"`
SkusStr string `json:"-"`
Places []int `orm:"-" json:"places"`
PlacesStr string `json:"-"`
Skus []*SkuWithVendor `orm:"-" json:"skus"`
SkusStr string `json:"-"`
FullName string `json:"fullName"`
Places []int `orm:"-" json:"places"`
PlacesStr string `json:"-"`
}