角色权限表

/******RBAC******/

drop table if exists p39_privilege;
create table p39_privilege
(
id mediumint unsigned not null auto_increment comment 'Id',
pri_name varchar(30) not null comment '权限名称',
moudle_name varchar(30) not null default '' comment '模块名称',
controller_name varchar(30) not null default '' comment '控制器名称',
action_name varchar(30) not null default '' comment '方法名称',
parent_id mediumint unsigned not null default '0' comment '上级权限Id',
primary key (id)
)engine=InnoDB default charset=utf8 comment '权限表';

 

drop table if exists p39_role_pri;
create table p39_role_pri
(
pri_id mediumint unsigned not null comment '权限Id',
role_id mediumint unsigned not null comment '角色Id',
key pri_id(pri_id),
key role_id(role_id)
)engine=InnoDB default charset=utf8 comment '角色权限表';


drop table if exists p39_role;
create table p39_role
(
id mediumint unsigned not null auto_increment comment 'Id',
role_name varchar(30) not null comment '角色名称',
primary key (id)
)engine=InnoDB default charset=utf8 comment '角色表';


drop table if exists p39_admin_role;
create table p39_admin_role
(
admin_id mediumint unsigned not null comment '管理员Id',
role_id mediumint unsigned not null comment '角色Id',
key admin_id(admin_id),
key role_id(role_id)
)engine=InnoDB default charset=utf8 comment '管理员角色表';

 

 

drop table if exists p39_admin;
create table p39_admin
(
id mediumint unsigned not null auto_increment comment 'Id',
username varchar(30) not null comment '用户名',
password char(32) not null comment '密码',
primary key (id)
)engine=InnoDB default charset=utf8 comment '管理员表';

insert into p39_admin(id,username,password) values(1,'root',' 21232f297a57a5a743894a0e4a801fc3');

转载于:https://www.cnblogs.com/gooderic/p/5671694.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值