Role Permission Table

Source: Internet
Author: User

/******rbac******/

drop table if exists p39_privilege;
CREATE TABLE P39_privilege
(
ID mediumint unsigned NOT null auto_increment comment ' Id ',
Pri_name varchar (+) NOT null comment ' permission name ',
Moudle_name varchar (+) NOT null default ' comment ' Module name ',
Controller_name varchar (+) NOT null default ' comment ' controller name ',
Action_name varchar (+) NOT null default ' comment ' method name ',
parent_id mediumint unsigned NOT null default ' 0 ' comment ' ancestor permission id ',
Primary KEY (ID)
) Engine=innodb default Charset=utf8 comment ' permission table ';

drop table if exists p39_role_pri;
CREATE TABLE P39_role_pri
(
pri_id mediumint unsigned not NULL comment ' permission ID ',
role_id mediumint unsigned not NULL comment ' role ID ',
Key pri_id (pri_id),
Key role_id (role_id)
) Engine=innodb default Charset=utf8 comment ' role permission table ';


drop table if exists p39_role;
CREATE TABLE P39_role
(
ID mediumint unsigned NOT null auto_increment comment ' Id ',
Role_name varchar (+) NOT null comment ' role name ',
Primary KEY (ID)
Engine=innodb default Charset=utf8 comment ' role table ';


drop table if exists p39_admin_role;
CREATE TABLE P39_admin_role
(
admin_id mediumint unsigned NOT NULL comment ' administrator ID ',
role_id mediumint unsigned not NULL comment ' role ID ',
Key admin_id (admin_id),
Key role_id (role_id)
) Engine=innodb default Charset=utf8 comment ' Administrator role table ';

drop table if exists p39_admin;
CREATE TABLE P39_admin
(
ID mediumint unsigned NOT null auto_increment comment ' Id ',
Username varchar (+) NOT null comment ' user name ',
Password char (+) NOT null comment ' password ',
Primary KEY (ID)
) Engine=innodb default Charset=utf8 comment ' Administrator table ';

Insert into P39_admin (Id,username,password) VALUES (1, ' root ', ' 21232f297a57a5a743894a0e4a801fc3 ');

Role Permission Table

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.