import express from 'express';
import {
  createStockTransaction,
  getAllStockTransactions,
  getStockTransactionById,
  updateStockTransaction,
  deleteStockTransaction,
  getStockReport,
} from '../controllers/stockTransactionController.js';
import { authenticate } from '../middleware/auth.js';

const router = express.Router();

router.post('/create', authenticate, createStockTransaction);
router.get('/all', authenticate, getAllStockTransactions);
router.get('/report', authenticate, getStockReport);
router.get('/:id', authenticate, getStockTransactionById);
router.put('/:id', authenticate, updateStockTransaction);
router.delete('/:id', authenticate, deleteStockTransaction);

export default router;
