2026-03-02 12:36:41 +00:00
|
|
|
const express = require('express');
|
|
|
|
|
const router = express.Router();
|
|
|
|
|
const waterBillController = require('../controllers/waterBillController');
|
|
|
|
|
|
2026-03-04 07:39:06 +00:00
|
|
|
// 获取所有水费记录(分页)
|
2026-03-02 12:36:41 +00:00
|
|
|
router.get('/', waterBillController.getAllWaterBills);
|
|
|
|
|
|
2026-03-04 07:39:06 +00:00
|
|
|
// 获取所有水费记录(不分页)
|
|
|
|
|
router.get('/list', waterBillController.listWaterBills);
|
|
|
|
|
|
2026-03-02 12:36:41 +00:00
|
|
|
// 获取单个水费记录
|
|
|
|
|
router.get('/:id', waterBillController.getWaterBillById);
|
|
|
|
|
|
|
|
|
|
// 创建水费记录
|
|
|
|
|
router.post('/', waterBillController.createWaterBill);
|
|
|
|
|
|
|
|
|
|
// 更新水费记录
|
|
|
|
|
router.put('/:id', waterBillController.updateWaterBill);
|
|
|
|
|
|
|
|
|
|
// 删除水费记录
|
|
|
|
|
router.delete('/:id', waterBillController.deleteWaterBill);
|
|
|
|
|
|
|
|
|
|
module.exports = router;
|