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

Convert company model/transactions to new generic layout #99

Closed
4 of 5 tasks
orthecreedence opened this issue Aug 17, 2020 · 0 comments
Closed
4 of 5 tasks

Convert company model/transactions to new generic layout #99

orthecreedence opened this issue Aug 17, 2020 · 0 comments
Assignees
Labels
project:core type:feature Well-thought out features with implementation details
Milestone

Comments

@orthecreedence
Copy link
Member

orthecreedence commented Aug 17, 2020

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.

  • Rip out CompanyType. Every company is just a company now.
  • 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.
    • 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.
      • 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:core type:feature Well-thought out features with implementation details
Projects
None yet
Development

No branches or pull requests

1 participant