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

// 添加表单日志
router.post('/add', verifyToken, (req, res) => FormLogController.addFormLog(req, res))

// 获取表单日志列表
router.get('/list', verifyToken, (req, res) => FormLogController.getFormLogs(req, res))

// 获取日志详情
router.get('/detail/:id', verifyToken, (req, res) => FormLogController.getFormLogDetail(req, res))

// 删除日志
router.delete('/delete/:id', verifyToken, (req, res) => FormLogController.deleteFormLog(req, res))

// 批量删除日志
router.delete('/batch-delete', verifyToken, (req, res) => FormLogController.batchDeleteFormLogs(req, res))

// 获取日志统计信息
router.get('/stats', verifyToken, (req, res) => FormLogController.getFormLogStats(req, res))

module.exports = router
