How build structure for admin differents types of users

Hi! First, sorry for my english…

I show you my case.

I’m working in a social network site for salsa dancing. There are users(people) and another 3 types of users related to companies. I mean there are 4 tables. Users(dancers), Academies(to learn), Pubs(to dance) and Shops(buy shoes and clothes).

Ok, every table has differents fields and differents funcionalities. For exaple an Academy can create Events, but Shops don’t. Shops can upload products but Pubs don’t, etc. One email for login it can be in users tables and academies table, but only once in one table, etc. For this reason I split it in 4 tables.

My question is, how is the best way to structure the differents admins for each table?

For example for administrate comments on a shop, where "Admin" is a module. Or, Or,

I don’t know if the best option is create a generic “admin” module, create an module for each table, put a “admin” funcion into controller, maybe create a admin module and especific submodules…

I need some help,

Thank you!

Maybe nested modules are the best solution, what do you think?

Main module "Admin", subdomules "Academies", "Shops"…


Any advice?

After reading fast your post, it seems it’s just a user table that you need, related with a roles table. Then in the application you have to manage rules according to the roles. Take a look to the ACL part of the Yii documentation.