const express = require('express');
const router = express.Router();
const approvalProcessController = require('../controllers/approvalProcessController');
const authMiddleware = require('../middleware/auth');

// 暂时注释掉认证中间件用于测试
// router.use(authMiddleware);

// 审批流程管理路由
router.get('/', approvalProcessController.getApprovalProcesses);
router.get('/:id', approvalProcessController.getApprovalProcessById);
router.post('/', approvalProcessController.createApprovalProcess);
router.put('/:id', approvalProcessController.updateApprovalProcess);
router.delete('/:id', approvalProcessController.deleteApprovalProcess);
router.post('/:id/process', approvalProcessController.processApproval);
router.patch('/:id/status', approvalProcessController.updateApprovalStatus);

module.exports = router;
