const express = require('express');
const router = express.Router();
const productController = require('../controllers/product.controller');
const { route } = require('./contract.routes');

router.get('/', productController.getproductsdisplay);
router.get('/productcategory', productController.getcategoryproducts);
router.get('/producttype', productController.gettypeproduct);
router.get('/suppliers',productController.getsuppliers);
router.get('/gdiscardproducts',productController.getdiscardproduct);
router.get('/reportinventory',productController.reportInventory);
router.get('/stockadjusment',productController.getstockadjusments);
router.get('/gethousekeeper',productController.getHouseKeeper);
router.get('/getproducts',productController.getproducts);
router.get('/getconsumptionstockreport',productController.getConsumptionStockReport);

router.post('/newsupplier',productController.newsupplier);
router.post('/newproduct',productController.newproduct);
router.post('/stockadjusmentset',productController.setstockadjusments);
router.post('/newconsumptionstock',productController.newConsumptionStock);
router.post('/disableSupplier',productController.disabledSupplier);

router.put('/update_product/:id',productController.updateproduct);
router.put('/discardproduct/:id',productController.discardProduct);
router.put('/product/:id',productController.getproduct);
router.put('updatesupplier/:id',productController.updateSupplier);
module.exports = router;