Compuskills-Jerusalem / shuk-routing

Capstone project for the 2018 Mens Software Development Program at Compuskills. Provides a Waze (R) like experience for visitors to the Machane Yehuda market in Jerusalem, Israel.
0 stars 1 forks source link

Organize reqs for "suggested contributions" #22

Open ykopstein opened 6 years ago

ykopstein commented 6 years ago

Lots of discussion in #13 about how to implement suggested contributions. Organize it into actual reqs / user stories and assign as needed. You can also backlog as much as you need.

ShmielB commented 6 years ago

Going with the way that if it dose not exist it should be added to a "need to be added table" .

As a shopper in the shuk I can add a product to a store with its price / rating So that people can get up-to-date results

Requirements

  1. Contribute item button on the main page as in #3

  2. Contribute item page and all its requirements as in #3

    Added requirements to #3 before requirement 12 (update db)

  3. Query db to check if item dose / dose not exist in Commodities table

  4. Query db to check if stall dose / dose not exist in Stalls table

  5. If exist Send query to db adding the new info to the CommodityStall table with the CommodityID / StallID

  6. if not exist Before we add the new info to the CommodityStall table Add the product to the "Upcoming Commodity" table or the stall to "Upcoming Stalls" table And then add that UpcomingCommodityID / UpcomingStallID to the CommodityStall table .

About the CommodityID in the CommodityStall table probably needs to be nullable , and maybe we can make another column for Upcoming Commodity ID also be nullable and if the item exists the Commodity ID should be added if dose not exist the Upcoming Commodity ID should be added , latter we can check over the table and add to Commodities table as needed .

Classes & Methods Req. 3 CommodityStall Controller Class > Create method ( Post ) . Req. 4 CommodityStall Controller Class > Create method ( Post ) .

Architecture
CommodityStall Controller Class > Create method ( Post ) > instantiate CommodityStall Repository > Call Save method from repo > repo save method : if statment (if commodityID is null / is not null or StallID is null / is not null ) > send query to db .

hershyd commented 6 years ago

i think if the commodity does not exist in the commodities table, it should not even go in to the commodity stall table with the "upcoming commodity table commodityID" , as @ShmielB suggested, my suggestion is that we should make a "upcoming commodity stall table" and if the item does not exist in the commodities table, than the info should go in to the table called "upcoming commodity stall table. And latter we can check the table and add the commodity to the commodities table, and in the regular commodity stall table as needed .

ShmielB commented 6 years ago

After seeing what @hershyd suggested about having a separate table of "upcoming commodity stall" if the commodity dose not match a commodity from the commodities table , maybe we only need to create one table "upcoming commodity stall" for both for Commodities that are not in the db and for Stalls that are not in the db ,
But i think it would be better that we should make two separate tables of Upcoming Commodity Stall one for Commodities that are not in the db and for Stalls that are not in the db , like this we can work on upcoming commodities separate and on upcoming stalls separate .

Starting to work on it ( Req. 3 , 4 from above )