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

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

// 养牛学院资讯管理路由
router.get('/', cattleAcademyController.getCattleAcademyList);
router.get('/:id', cattleAcademyController.getCattleAcademyById);
router.post('/', cattleAcademyController.createCattleAcademy);
router.put('/:id', cattleAcademyController.updateCattleAcademy);
router.delete('/:id', cattleAcademyController.deleteCattleAcademy);
router.patch('/:id/status', cattleAcademyController.toggleCattleAcademyStatus);
router.patch('/sort', cattleAcademyController.updateSort);

module.exports = router;
