const express = require("express");
const SubCatagory = require("../controllers/subcatagory");
const router = express.Router();

router.post("/addnew", SubCatagory.postNew);

router.get("/GetAllSubCatagory", SubCatagory.GetAllSubCatagory);
router.get("/GetAllSubCatagorybySearch/:data", SubCatagory.GetAllSubCatagorybySearch);

router.get("/GetAllSubCatagoryBrand/:brandid", SubCatagory.GetAllSubCatagoryBrand);
router.get("/GetAllSubCatagoryBrandName/:brandName", SubCatagory.GetAllSubCatagoryBrandName);
router.get("/getSingle/:model", SubCatagory.getSingle);

router.put("/updateSubcatagorySequence", SubCatagory.updateSubcatagorySequence);
router.patch("/AddSubCatagory", SubCatagory.AddSubCat);
router.patch("/UpdateSubCatagory/:id", SubCatagory.UpdateSubCatagory);
router.delete("/DeleteSubcatagory/:id", SubCatagory.DeleteSinglProduct);


module.exports = router;      