const Router = require('koa-router')
const orderController = require('../controllers/orders')

const router = new Router()

// 获取订单列表
router.get('/', orderController.getOrders)

// 获取订单详情
router.get('/:id', orderController.getOrderById)

// 创建订单
router.post('/', orderController.createOrder)

// 更新订单状态
router.put('/:id', orderController.updateOrder)

module.exports = router.routes()
