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/member model to new generic layout #4

Merged
merged 11 commits into from
Aug 28, 2020
Merged

Conversation

orthecreedence
Copy link
Member

Previously, company members could just be workers.

Now, companies can have three membership classes (oops!!): Company, User, Worker. In effect we've gone from a flat system that was going to be organized by a one-level-up regional container to a completely fluid system of exitable hierarchies of groups. In effect, the old regional system could be easily modeled by the new system, should participants choose to do so, but other setups are possible as well.

All tests passing, although admittedly the Company and User types have only been added to tests in places where Error::MemberMustBeWorker is implemented.

There were some other things in basisproject/tracker#99 like enforcing no circular links in companies or caching all members, but ultimately both of these are really only possible (or at least much more feasible) in the storage layer.

…ll a few trailing things related to the CompanyType junk. also adding Currency* access permissions and assigning them to the bank role
- adding member `class` enum (MemberClass) and adding Company, User,
Worker options to it, with occupation/compensation living under worker
(company/user are blank structs).
- adding Deletable trait which houses is_deleted() and implementing it
in basis_model!{} as part of the train instead of a direct struct impl.
- adding ActiveState trait, which provides is_active() (depends on
Deletable) and also implementing this in basis_model!{}.
- updating Agent trait to dependon Deletable (so all agents get
is_deletd())
- updating all places/tests where needed to allow this.

there's probably more but going to sign off for now.
@orthecreedence orthecreedence merged commit f91478c into master Aug 28, 2020
@orthecreedence orthecreedence deleted the tr-99 branch August 28, 2020 14:33
@orthecreedence orthecreedence restored the tr-99 branch August 28, 2020 14:33
@orthecreedence orthecreedence deleted the tr-99 branch September 5, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant