We want to add projects (as per opensafely-core/interactive.opensafely.org#435), but we also want to match the objects in job-server as closely as possible (to make a TBD merge of the code, and auditing easier, and because projects are attached to orgs).
This adds Org and OrgMembership models, mirroring the contents of User.organisation into those relationships, and adding orgs to the staff area.
I've left User.organisation alone for now because it's used on both User and RegistrationRequest models and we need to see how opensafely-core/job-server#2489 pans out.
We want to add projects (as per opensafely-core/interactive.opensafely.org#435), but we also want to match the objects in job-server as closely as possible (to make a TBD merge of the code, and auditing easier, and because projects are attached to orgs).
This adds Org and OrgMembership models, mirroring the contents of User.organisation into those relationships, and adding orgs to the staff area.
I've left User.organisation alone for now because it's used on both User and RegistrationRequest models and we need to see how opensafely-core/job-server#2489 pans out.