I'm developing a building management system in WP multisite, and can't figure out how to create proper relations between blocks/apartments/owners and/or tenants. This is the the structure:
- Create building block
- Create apartment and assign it's block
- Assign owner to apartment
- Assign tenant(s) to same apartment (if there are any)
I'm using Custom Post Type UI for apartments and Advanced Custom Fields. The site will have payment options, booking, helpdesk (all of these are plugins). Users will be created manually, and during creation, they should be assigned to their previously created apartment custom post, so when they log in, they can see only information related to their apartment, and not others.
So, how should I create the relationship between blocks, apartments and users?