area1707 / grace-shopper

3 stars 0 forks source link

Data Validation - Products #25

Open erinkshaw opened 7 years ago

erinkshaw commented 7 years ago

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

Implementation: -Set up sequelize schemas to include: title, description, price, inventory, category is ENUM value -Set photo URLs in product schema

alicec15 commented 7 years ago

the update inventory has to happen in the routes, we wrote the join table such that each order is associated with accessory IDs, and we can use the accessory ids to update the inventory in our express backend route.

erinkshaw commented 6 years ago

need to add a default value for a new item to the db