/**
 * [BE-ROUTE-015] 智能定价建议路由
 * 提供智能定价建议的RESTful API路由
 * AI注意: 所有智能定价建议路由必须通过此文件注册
 */

import { Router } from 'express';
import { SmartPricingController } from '../controllers/SmartPricingController';
import { requireTraceContext } from '../../core/guards/trace-context.guard';
import { requirePermission } from '../../core/guards/rbac.guard';

const router = Router();

router.post('/recommend', requireTraceContext, SmartPricingController.generateRecommendation);
router.post('/simulate', requireTraceContext, SmartPricingController.simulate);
router.post('/apply', requireTraceContext, requirePermission('pricing:write'), SmartPricingController.applyRecommendation);
router.get('/recommendations', requireTraceContext, SmartPricingController.getActiveRecommendations);
router.post('/batch', requireTraceContext, requirePermission('pricing:write'), SmartPricingController.batchGenerate);
router.get('/history', requireTraceContext, SmartPricingController.getPriceHistory);

export default router;
