This will be the implementation issue for #72. Effectively, the old Basis system had a concept of private companies that would convert to in-network companies via an approval process. What we're going to do is rip out all private company gibberish and go with a purely in-network model.
For now we'll forego the approval process (tracked in #94) and create a permissionless system. We're getting rid of the idea of public companies, regions, etc: public companies are regular companies that tax members, regions are regular companies that group companies and resources together geographically. It's turtles all the way down.
[x] Rip out CompanyType. Every company is just a company now.
[x] Maybe (??) Update CompanyMember to just Member. Maybe this is silly, but it has come up a few times and I want to at least consider it.
[x] Would go for CompanyMemnerID as well
[ ] Update membership. CompanyMember can be either a user or another company.
Need to think about roles. If company A is member of company X, does this membership come with a role? Or do individuals all start with no role?
As an implementation detail, need to think about how membership links are stored. Do we only create them for direct members, then walk the tree to figure out who members are? Do we cache them in a members collection and update them when changes are made? If cachine, we need to be really careful because if A is member of B which is member of C and I'm a member of A, if I leave then A, B and C would need to update their cached member lists.
[x] only create them for direct members. fuck cache for now. however, need to make sure we don't have loops, ie Company A is member of Company B which is member of Company A. in other words, when new membership is created, need to pass in the whole tree and verify the hierarchy (oops!!) before allowing the transaction. (I think this must be enforced in the storage layer)
This will be the implementation issue for #72. Effectively, the old Basis system had a concept of private companies that would convert to in-network companies via an approval process. What we're going to do is rip out all private company gibberish and go with a purely in-network model.
For now we'll forego the approval process (tracked in #94) and create a permissionless system. We're getting rid of the idea of public companies, regions, etc: public companies are regular companies that tax members, regions are regular companies that group companies and resources together geographically. It's turtles all the way down.
CompanyType
. Every company is just a company now.CompanyMember
to justMember
. Maybe this is silly, but it has come up a few times and I want to at least consider it.CompanyMemnerID
as wellCompanyMember
can be either a user or another company.only create them for direct members. fuck cache for now. however, need to make sure we don't have loops, ie Company A is member of Company B which is member of Company A. in other words, when new membership is created, need to pass in the whole tree and verify the hierarchy (oops!!) before allowing the transaction.(I think this must be enforced in the storage layer)