const router = require('express').Router();
const ctrl = require('../controllers/reportController');
const { authenticate } = require('../middleware/auth');
const { authorizeMinRole } = require('../middleware/rbac');

router.use(authenticate);
router.get('/dashboard', ctrl.dashboard);
router.get('/sales', authorizeMinRole('admin'), ctrl.salesReport);
router.get('/profit-loss', authorizeMinRole('admin'), ctrl.profitLoss);

module.exports = router;
