GS-AlphaForceMega / graceshopper

e-commerce web application
MIT License
0 stars 0 forks source link

Models finished first routes and models #9

Closed bassgt95 closed 6 years ago

bassgt95 commented 6 years ago

Assignee Tasks

Guidelines

Please add a description of this Pull Request's motivation, scope, outstanding issues or potential alternatives, reasoning behind the current solution, and any other relevant information for posterity.


Your PR Notes Here

NickMaslov commented 6 years ago

...you may use sessionStorage, localStorage, cookies or JWT for Cart (user story) We do not need use a database table!

NickMaslov commented 6 years ago

Data Validations

As you work on your data models, please consider the types of data that you will receive, what you want to make required and how you will propagate those errors to the user.

Products Must have title, description, price, and inventory quantity Must belong to at least one category If there is no photo, there must be a placeholder photo used

Users Users must have a valid email address Users email must be unique

Order Orders must belong to a user OR guest session (authenticated vs unauthenticated) 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

Reviews All reviews must belong to a product All reviews must belong to a user All reviews must be at least X characters

NickMaslov commented 6 years ago

!!!!WE TOTALLY FORGOT ABOUT REVIEW!!!!