// src/routes/investmentRoutes.js
const express = require('express');
const router = express.Router();
const investmentController = require('../controllers/investmentController');

// GET todos
router.get('/investments', investmentController.getAllInvestments);

// GET por ID
router.get('/investments/:id', investmentController.getInvestmentById);

// GET Rentability por ID
router.get('/investments/:id/rentability', investmentController.getRentabilityByInvestmentId);

// POST (create)
router.post('/investments', investmentController.createInvestment);

// PUT (update)
router.put('/investments/:id', investmentController.updateInvestment);

// DELETE
router.delete('/investments/:id', investmentController.deleteInvestment);

module.exports = router;
