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

// GET /withdraws
router.get('/withdraw', withdrawController.getAllWithdraws);

// GET /withdraws/:id
router.get('/withdraw/:id', withdrawController.getWithdrawById);

// GET /withdraws/investment/:id
router.get('/withdraw/investment/:id', withdrawController.getWithdrawByInvestmentId);

// POST /withdraws
router.post('/withdraw', withdrawController.createWithdraw);

// PUT /withdraws/:id
router.put('/withdraw/:id', withdrawController.updateWithdraw);

// DELETE /withdraws/:id
router.delete('/withdraw/:id', withdrawController.deleteWithdraw);

module.exports = router;
