const express = require('express');
const router = express.Router();
const {
  createExpenseGroup,
  getExpenseGroups,
  getExpenseGroupById,
  updateExpenseGroup,
  deleteExpenseGroup
} = require('../controllers/expenseGroupController');

// Create a new expense group
router.post('/', createExpenseGroup);

// Get all expense groups for a company
router.get('/company/:companyId', getExpenseGroups);

// Get a single expense group by ID
router.get('/:id', getExpenseGroupById);

// Update an expense group by ID
router.put('/:id', updateExpenseGroup);

// Delete an expense group by ID
router.delete('/:id', deleteExpenseGroup);

module.exports = router;
