const express = require('express');
const router = express.Router();
const TableController = require('../controllers/tableController');

// Get all tables with filtering and pagination
router.get('/', TableController.getAllTables);

// Get table statistics
router.get('/stats', TableController.getTableStats);

// Get tables by status
router.get('/status/:status', TableController.getTablesByStatus);

// Get single table by ID
router.get('/:id', TableController.getTableById);

// Create new table
router.post('/', TableController.createTable);

// Update table
router.put('/:id', TableController.updateTable);

// Update table status only
router.patch('/:id/status', TableController.updateTableStatus);

// Delete table
router.delete('/:id', TableController.deleteTable);

module.exports = router;
