Data Validation - Products
Opened this issue · 2 comments
erinkshaw commented
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
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
need to add a default value for a new item to the db