ebaek/MerryMoney

Schema

Closed this issue · 0 comments

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 of company_id to the watchlists 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 type bool (or string that contains true/false) that indicates that, or just have negative prices indicate buys, positive prices indicate sells. Up to you :)