const orderModel = require("./model/orderModel") module.exports.getOrderDao = async function (id) { if (id) { console.log(id, "idDAO") return await orderModel.findAll({ where: { userId: id } }) } return await orderModel.findAll() } module.exports.addOrderDao = async function (dishData) { await orderModel.create(dishData) return await orderModel.findAll() } // module.exports.updateOrderDao = async function (dishData) { // await orderModel.update(dishData, { // where: { // id: dishData.id // } // }) // return await orderModel.findAll() // } // module.exports.deleteOrderDao = async function (id) { // await orderModel.destroy({ // where: { // id // } // }) // return await orderModel.findAll() // }