Schema
Closed this issue · 0 comments
pvulakh commented
Great job on these! A couple of tweaks to make:
users
table:
- remove the
username
column since users aren't asked for a username upon signup - add
portfolio_value
so that you won't need to sum up all the transactions of a user to calculate this every time
watchlists
table:
- this table represents which stocks a user's watching, so we can remove the
watchlists-companies
joins table and just add a foreign key ofcompany_id
to thewatchlists
table. Let me know if you have questions on this!
transactions
table:
- need to indicate whether a given
transaction
is a buy or a sell. You can add a column of typebool
(orstring
that containstrue
/false
) that indicates that, or just have negativeprice
s indicate buys, positiveprice
s indicate sells. Up to you :)