variants as a single product
This commit is contained in:
@@ -20,6 +20,7 @@ type ProductService interface {
|
||||
UpdateProductVariant(productid, variantid int) error
|
||||
AddProductVariant(v models.Productvariant) (models.Productvariant, error)
|
||||
RemoveProductVariant(tenantid, variantid int) error
|
||||
VariantChildIDs(tenantid int) (map[int]bool, error)
|
||||
CreateProductStock(stocks []models.Productstock) error
|
||||
CreateProduct(product models.Products) error
|
||||
UpdateProduct(product models.Products) error
|
||||
@@ -156,6 +157,12 @@ func (s *productService) RemoveProductVariant(tenantid, variantid int) error {
|
||||
return s.repo.RemoveProductVariant(tenantid, variantid)
|
||||
}
|
||||
|
||||
// VariantChildIDs lists the products that are a size of another, so a caller
|
||||
// that lists products for a SHOPPER can leave them out.
|
||||
func (s *productService) VariantChildIDs(tenantid int) (map[int]bool, error) {
|
||||
return s.repo.VariantChildIDs(tenantid)
|
||||
}
|
||||
|
||||
func (s *productService) UpdateProductStatus(productIDs []int, status string) error {
|
||||
return s.repo.UpdateProductStatus(productIDs, status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user