Open kaihendry opened 5 years ago
Sounds good to me!
a user cannot be in multiple accounts
This is actually important and I am 100% OK with that ---> if a person wants to be linked to multiple accounts, then that person will have to create different users and link each of these users to a maximum of 1 account.
After chatting with @nbiton about this, the tact is that we will only create the "billing Entity" or "team" (aka Account) once a user "upgrades", e.g. http://case.unee-t.com/upgrade i.e. begins paying.
Hence we basically implement billing (with Stripe) first and account management later.
The video billing dept shows how several users can hang off one Customer as Stripe defines it. You might want to watch https://media.dev.unee-t.com/2018-10-12/ubilling.mp4 first to get a better idea of the integration.
Following on from https://github.com/unee-t/frontend/issues/511 & this tweet I think we need an Account construct, just like Github has with Organisations. This is a dependency for billing to work properly.
I guess this would be implemented as a superset which db.users belong to.
For sake of simplicity, may I propose: