/**
 * [BE-ROUTE-016] 库存决策路由
 * 提供库存决策AI介入的RESTful API路由
 */

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

const router = Router();

router.post('/ai-decision', requireTraceContext, InventoryDecisionController.makeDecision);
router.post('/adjust', requireTraceContext, requirePermission('inventory:write'), InventoryDecisionController.adjustInventory);
router.post('/reserve', requireTraceContext, requirePermission('inventory:write'), InventoryDecisionController.reserveInventory);
router.post('/release', requireTraceContext, requirePermission('inventory:write'), InventoryDecisionController.releaseInventory);
router.get('/:id', requireTraceContext, InventoryDecisionController.getInventory);

export default router;
