const express = require('express')
const router = express.Router()
const {
  getEpidemicRecords,
  getEpidemicRecordById,
  createEpidemicRecord,
  updateEpidemicRecord,
  deleteEpidemicRecord,
  batchDeleteEpidemicRecords
} = require('../controllers/EpidemicRecordController')
const auth = require('../middleware/auth')

// 获取防疫记录列表
router.get('/list', auth, getEpidemicRecords)

// 获取防疫记录详情
router.get('/detail/:id', auth, getEpidemicRecordById)

// 创建防疫记录
router.post('/create', auth, createEpidemicRecord)

// 更新防疫记录
router.put('/update/:id', auth, updateEpidemicRecord)

// 删除防疫记录
router.delete('/delete/:id', auth, deleteEpidemicRecord)

// 批量删除防疫记录
router.delete('/batch-delete', auth, batchDeleteEpidemicRecords)

module.exports = router
