Data Validations - Orders
Opened this issue · 1 comments
erinkshaw commented
Orders must belong to a user OR guest session
Orders must contain line items that capture the price, current product ID and quantity
If a user completes an order, that order should keep the price of the item at the time when they checked out even if the price of the product later changes
Implementation:
Create orders schema in sequelize
A new order request creates a new order instance in our db, which will include user or guest information
<How to associate accessories with orders?>
lean257 commented
Outstanding:
- Order must belong to a guest session - need to do this on the frontend - to always show order in cart in the current session of browser
- Orders must contain line items...: front end
- save history of price: look into redux-state-history https://www.npmjs.com/package/redux-state-history