Related to role and permission control data tables, role permission Control Data
This project requires the role to be divided into regions. Each role corresponds to one or more third-level cities. You can only view the business opportunities in the region when logging on to the background.
First, create an account table. The fields include account id, role id, Logon account, logon password, account name, status, number of Logon errors, and account user information.
Next, the role table: Role id, parent role id, role name, role level, status, remarks, and others. Associate regions and permissions
Then, the role area table is: Region id, role id, first-level city code (provincial), second-level city code (municipal), third-level city code, first-level city name, second-level city name, and third-level city name. The region managed by the role is saved.
The following table lists the permissions of a role: Permission id, role id, permission id, permission status, and others. Save the permissions of the corresponding role.
Finally, permission table: Permission id, parent permission id, permission name, corresponding permission value (unique permission value), permission type, and permission status. The permission table stores all menu items. When you click the menu, verify that the current logon administrator has this permission.
Of course, the database has a table to store all provinces, cities, counties, and streets in China.
Process: you must add a role before saving all menu items to the permission table to add an account --> and select a region and assign permissions when adding a role.