개인과제
CRUD
create
const createdProduct = await Products.create({
productName,
productComments,
productQuantity,
price,
createdId: decodedJwt.userId,
});
read
(전체)
const productList = await Products.findAll();
(상세)
const productDetail = await Products.findOne({
where: {
productId: productId,
},
});
update 미구현
delete
productDetail.destroy();