import { Router } from 'express';
import * as stockController from '../controllers/stockController.js';

const router = Router();

router.get('/', stockController.getStockItems);
router.get('/:id', stockController.getStockItemById);
router.get('/:id/movements', stockController.getStockMovements);
router.get('/:id/logs', stockController.getStockAuditLogs);
router.post('/', stockController.createStockItem);
router.put('/:id', stockController.updateStockItem);
router.post('/:id/adjust', stockController.adjustStock);
router.post('/:id/consume', stockController.consumeStock);
router.delete('/:id', stockController.deleteStockItem);
router.put('/movements/:id', stockController.updateStockMovement);
router.delete('/movements/:id', stockController.deleteStockMovement);

export default router;