import { Router } from 'express';
import { dataAbstractionController } from '../controllers/DataAbstractionController';

const router = Router();

// 获取优先级数据
router.get('/prioritized-data/:actionType/:taskId', dataAbstractionController.getPrioritizedData);

// 获取动作数据
router.get('/action-data/:actionType/:taskId', dataAbstractionController.getActionData);

// 手动触发数据同步
router.post('/sync/:dataSource', dataAbstractionController.triggerSync);

// 获取同步状态
router.get('/sync-status', dataAbstractionController.getSyncStatus);

// 清理过期数据
router.delete('/cleanup-expired', dataAbstractionController.cleanupExpiredData);

// 获取动作数据统计
router.get('/stats', dataAbstractionController.getActionDataStats);

// 清除缓存
router.delete('/clear-cache', dataAbstractionController.clearCache);

export default router;
