app sbucategories
This commit is contained in:
@@ -21,11 +21,21 @@ type Productcount struct {
|
||||
Outofstock int `json:"outofstock"`
|
||||
}
|
||||
|
||||
// ProductCategoryUpdate is one row of a bulk re-filing: which product, and
|
||||
// which category it should sit in.
|
||||
// ProductCategoryUpdate is one row of a bulk re-filing: which product, which
|
||||
// category it sits in, and — the field that actually decides what a shopper
|
||||
// sees — which subcategory.
|
||||
//
|
||||
// Both are here because they do different jobs. GetProducts filters on
|
||||
// categoryid (the customer app asks for 2), while GetProductsBySubcategory
|
||||
// GROUPS on subcategoryid, so the aisle heading in the app comes from the
|
||||
// second and the first only decides whether the product is returned at all.
|
||||
// A caller re-filing products into aisles sends categoryid 2 unchanged and the
|
||||
// subcategory it worked out.
|
||||
type ProductCategoryUpdate struct {
|
||||
Productid int `json:"productid"`
|
||||
Categoryid int `json:"categoryid"`
|
||||
// Optional: 0 leaves whatever the product already has.
|
||||
Subcategoryid int `json:"subcategoryid"`
|
||||
}
|
||||
|
||||
type ProductCategory struct {
|
||||
|
||||
Reference in New Issue
Block a user