/**
 * [BE-ROUTE-017] 售后审核路由
 * 提供售后审核AI介入的RESTful API路由
 */

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

const router = Router();

router.post('/ai-decision', requireTraceContext, AfterSalesDecisionController.makeDecision);
router.post('/approve', requireTraceContext, requirePermission('after-sales:write'), AfterSalesDecisionController.approve);
router.post('/reject', requireTraceContext, requirePermission('after-sales:write'), AfterSalesDecisionController.reject);
router.post('/refund', requireTraceContext, requirePermission('after-sales:write'), AfterSalesDecisionController.refund);

export default router;
