- GetSkuNames added.

This commit is contained in:
gazebo
2018-09-10 18:09:56 +08:00
parent 67655f57e0
commit 6ee4e43286
5 changed files with 198 additions and 31 deletions

View File

@@ -12,6 +12,11 @@ const (
SpecUnitML = 3
)
const (
SkuNameStatusNormal = 0
SkuNameStatusDontSale = 1
)
var (
SpecUnitNames = []string{
"g",
@@ -93,19 +98,19 @@ func (*SkuCategory) TableUnique() [][]string {
type SkuName struct {
ModelIDCUL
Prefix string `orm:"size(255)"`
Name string `orm:"size(255)"`
Comment string `orm:"size(255)"`
Prefix string `orm:"size(255)" json:"prefix"`
Name string `orm:"size(255)" json:"name"`
Comment string `orm:"size(255)" json:"comment"`
BrandID int `orm:"column(brand_id);default(0)"` // 此属性暂时没有使用
CategoryID int `orm:"column(category_id)"` // 标准类别
Status int
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // 此属性暂时没有使用
CategoryID int `orm:"column(category_id)" json:"categoryID"` // 标准类别
Status int `json:"status"`
IsGlobal int8 `orm:"default(1)"` // 是否是全部全国可见如果否的话可见性由SkuPlace决定
Unit string `orm:"size(8)"`
Price int // 单位为分标准价不为份的就为实际标准价为份的为每市斤价实际还要乘质量。todo 为份的确定必须有质量
Img string `orm:"size(255)"`
ElmImgHashCode string `orm:"size(64)"`
IsGlobal int8 `orm:"default(1)" json:"isGlobal"` // 是否是全部全国可见如果否的话可见性由SkuPlace决定
Unit string `orm:"size(8)" json:"unit"`
Price int `json:"price"` // 单位为分标准价不为份的就为实际标准价为份的为每市斤价实际还要乘质量。todo 为份的确定必须有质量
Img string `orm:"size(255)" json:"img"`
ElmImgHashCode string `orm:"size(64)" json:"-"`
}
// func (*SkuName) TableUnique() [][]string {