标签:
管理员表
CREATE TABLE cqh_privilege ( id mediumint unsigned not null auto_increment comment ‘id‘, pri_name varchar(30) not null comment ‘权限名称‘, module_name varchar(30) not null comment ‘对应的模块名‘, controller_name varchar(30) not null comment ‘对应的控制器名‘, action_name varchar(30) not null comment‘对应的方法名‘, parent_id mediumint unsigned not null default ‘0‘ comment ‘上级权限的id‘, primary key (id) )engine=MyISAM default charset=utf8 comment ‘权限‘;
权限表
CREATE TABLE cqh_privilege ( id mediumint unsigned not null auto_increment comment ‘id‘, pri_name varchar(30) not null comment ‘权限名称‘, module_name varchar(30) not null comment ‘对应的模块名‘, controller_name varchar(30) not null comment ‘对应的控制器名‘, action_name varchar(30) not null comment‘对应的方法名‘, parent_id mediumint unsigned not null default ‘0‘ comment ‘上级权限的id‘, primary key (id) )engine=MyISAM default charset=utf8 comment ‘权限‘;
角色表
CREATE TABLE cqh_role ( id mediumint unsigned not null auto_increment comment ‘id‘, role_name varchar(30) not null comment ‘角色名称‘, pri_id varchar(1500) not null default ‘‘ comment ‘权限的ID,如果有多个权限就用,隔开,如1,3,4‘, primary key (id) )engine=MyISAM default charset=utf8 comment ‘角色‘; INSERT INTO cqh_role VALUES(1,‘超级管理员‘,‘*‘);
标签:
原文地址:http://www.cnblogs.com/chenqionghe/p/4354006.html