Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema/API Design comments Parshana Sekhon #12

Open
Parshana007 opened this issue Nov 13, 2023 · 0 comments
Open

Schema/API Design comments Parshana Sekhon #12

Parshana007 opened this issue Nov 13, 2023 · 0 comments

Comments

@Parshana007
Copy link

Better Formatted Here: https://docs.google.com/document/d/1IDZithGogGBDjVl0LMlwllmq8nxXRsTdvXQ0FUo1FuI/edit?usp=sharing

Schema (Overall double check bc there are a lot of differences b/w code and schema)
Business
Coupons
Followers
Want to make a foreign key reference to user_id to connect a user to a follower?
Review
Route
Rather than using the name activities maybe add mention it as things you did at the route. Just because when I read activities I would be like I walked.
Difficulty could have a dropdown of specific numbers to choose from.
There is a user_id used but there is no foreign key reference I think this would be good to add in.
Would it be better to have the location be like a city and then coordinate to be more specific about the exact location, or like the start of the route?
User_id
User_coupon_ledger
There is a user_id used but there is no foreign key reference I think this would be good to add in.
I would change the name of the column to not be changed but maybe like count it to represent they have bought one coupon.
Building on this can they only buy one at a time or would it be better for them to be able to request as many coupons as they want to buy at the same time?
User_peepcoin_ledger
There is a user_id used but there is no foreign key reference I think this would be good to add in.
User_test
API Spec
1.1
How does this connect to a user_id with a follower? Maybe have a username of the friend requested and a user_id to connect the friend and the user.
1.2 and 1.3 they have the same path might be good to differentiate which is for what by adding more to the path.
1.3
Where are you notified of an accepting or denying of a friend? It might be good to have that as a column in the follower's table to have a status of accepted or denied, potentially a boolean.
2.1
Says the date added is a string, the user is a string, the difficulty is a string, in the schema date is a time, the difficulty is an int, and user_id is an int. [same in 2.2 and 2.3]
is the idea to take in multiple routes at the same time and then add them all at the same time. This might be better not as an array but only adds one route at a time and returns success for one at a time.
2.2
It says a route is deported but takes in an array and returns an array of reported routes.
2.3
For the popularity index and five-star review to put int in quotes right now, it is a comment so it’s red.
2.4
It says it takes in a user’s friend but the request body takes in a list of usernames.
3.1
The description quotes are jumbled same as above with quotes needed but is a red comment right now.
A similar improvement suggestion of changing from an array to only taking in one review at a time.
4.2
Potentially put a comment on what transaction details would include. Maybe include the number of peepcoins that are deduced.
General
Your code uses /users as the route but the API spec uses /socials.
You have 3 endpoints for the user social network in API spec but 4 endpoints in the code.
API Spec mentions that rating is a scale but not on the schema.
In the schema there are tables for business but not mentioned in the API spec.
For Api Spec, potentially including the user_id to connect the coins to add to the user. Also mentioning how coins are calculated.
For a business that gets created good to return their ID so that they know what to put for when the coupon is hard to tell what to put for business_id. Maybe include your business ID and name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant