/**
 * 绑定信息路由
 * @file binding.js
 * @description 处理耳标与牛只档案绑定的相关路由
 */

const express = require('express');
const router = express.Router();
const bindingController = require('../controllers/bindingController');
const { verifyToken } = require('../middleware/auth');

// 获取耳标绑定信息
router.get('/info/:cid', verifyToken, bindingController.getBindingInfo);

// 获取绑定状态统计
router.get('/stats', verifyToken, bindingController.getBindingStats);

// 手动绑定耳标与牛只档案
router.post('/bind', verifyToken, bindingController.bindCattle);

// 解绑耳标与牛只档案
router.delete('/unbind/:cid', verifyToken, bindingController.unbindCattle);

module.exports = router;
