const express = require('express');
const invitationController = require('../controllers/invitationController');
const { authenticateUser } = require('../middleware/auth');

const router = express.Router();

/**
 * Invitation Routes
 */

/**
 * @route   POST /api/v1/invitations/generate
 * @desc    Generate invitation code for user
 * @access  Private
 */
router.post('/generate', authenticateUser, invitationController.generateInvitationCode);

/**
 * @route   GET /api/v1/invitations/stats
 * @desc    Get invitation statistics
 * @access  Private
 */
router.get('/stats', authenticateUser, invitationController.getInvitationStats);

/**
 * @route   GET /api/v1/invitations/records
 * @desc    Get invitation records
 * @access  Private
 */
router.get('/records', authenticateUser, invitationController.getInvitationRecords);

module.exports = router;
