/**
 * [BE-ROUTE-013] AI批量操作建议路由
 * 提供AI批量操作建议的RESTful API路由
 * AI注意: 所有AI批量操作建议路由必须通过此文件注册
 */

import { Router, Request, Response, NextFunction } from 'express';
import { AIBatchController } from '../controllers/AIBatchController';
import { requireTraceContext } from '../../core/guards/trace-context.guard';
import { requirePermission } from '../../core/guards/rbac.guard';

const router = Router();

router.get('/batch-suggestions', requireTraceContext, AIBatchController.getSuggestions);
router.get('/batch-suggestions/stats', requireTraceContext, AIBatchController.getStats);
router.get('/batch-suggestions/:id', requireTraceContext, AIBatchController.getSuggestionById);
router.post('/batch-suggestions/:id/approve', requireTraceContext, requirePermission('batch:write'), AIBatchController.approveSuggestion);
router.post('/batch-suggestions/:id/reject', requireTraceContext, requirePermission('batch:write'), AIBatchController.rejectSuggestion);
router.post('/batch/analyze', requireTraceContext, AIBatchController.analyze);

export default router;
