This commit is contained in:
suyl
2021-09-02 18:09:34 +08:00
parent d81b84f71a
commit c75699bdeb
2 changed files with 17 additions and 1 deletions

View File

@@ -972,3 +972,19 @@ func (v *StoreMapAudit) TableIndex() [][]string {
[]string{"StoreID", "VendorStoreID"},
}
}
type BrandCategoryMap struct {
ModelIDCULD
BrandID int `orm:"column(brand_id)" json:"brandID"`
CategoryID int `orm:"column(category_id)" json:"categoryID"` // 这个是指对应的sku_category
BrandCategoryName string `orm:"size(255)" json:"name"` // 门店类别单独的名字
BrandCategorySeq int `orm:"default(0)" json:"storeCategorySeq"` // 门店类别单独的序号
Level int `json:"level"` // 门店类别单独的等级
ParentID int `orm:"column(parent_id)" json:"parentID"` //门店类别父ID和sku_category一致
}
func (*BrandCategoryMap) TableUnique() [][]string {
return [][]string{
[]string{"BrandID", "CategoryID", "DeletedAt"},
}
}

View File

@@ -46,7 +46,7 @@ func Init() {
orm.RegisterModel(&model.SkuExinfoMap{})
orm.RegisterModel(&model.StorePushClient{})
orm.RegisterModel(&model.StoreAudit{})
orm.RegisterModel(&model.Brand{})
orm.RegisterModel(&model.Brand{}, &model.BrandCategoryMap{})
orm.RegisterModel(&model.BrandStore{})
orm.RegisterModel(&model.BrandBill{}, &model.BrandOrder{}, &model.BrandUser{})