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

const router = Router();

/**
 * [BIZ_ARB_01] & [UX_BI_05] 套利中心 API
 */

// 获取多维套利空间热力图
router.get('/heatmap', requireTraceContext, requirePermission('analytics:view'), ArbitrageController.getHeatmap);

// [CORE_AI_50] 多模态 AGI 视觉寻源
router.post('/visual-sourcing', requireTraceContext, requirePermission('order:write'), ArbitrageController.visualSourcing);

// 初始化数据库表
router.post('/init', requireTraceContext, requirePermission('admin:all'), ArbitrageController.init);

export default router;
