const express = require('express');
const router = express.Router();
const {createPaymentHistory,getAllPaymentHistory,
    getPaymentHistoryById ,
    updatePaymentHistory,
    deletePaymentHistory 
}= require('../controllers/PaymentHistoryController'); // Path to your controller file

// Create a new payment history
router.post('/', createPaymentHistory);

// Get all payment history entries (with optional query for customerId)
router.get('/', getAllPaymentHistory);

// Get a single payment history entry by ID
router.get('/:id',  getPaymentHistoryById);

// Update a payment history entry
router.put('/:id',   updatePaymentHistory);

// Delete a payment history entry
router.delete('/:id',  deletePaymentHistory);

module.exports = router;