/*角色表 -- id -- 用户名 -- 密码 -- 工作组 A,B,C... */ DROP TABLE IF EXISTS role_acl; CREATE TABLE role_acl ( id int(11) NOT NULL auto_increment, username varchar(30) NOT NULL, password varchar(20) NOT NULL, work_group char(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=gbk; /*工作组 -- id -- 工作组 A,B,C... -- 文字描述 */ DROP TABLE IF EXISTS group_acl; CREATE TABLE group_acl ( id int(11) NOT NULL auto_increment, work_group char(1) NOT NULL, group_desc varchar(60) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=gbk; /* 角色 资源 动作 映射表 -- id -- 工作组 A,B,C... -- 资源代码 */ DROP TABLE IF EXISTS mapped_acl; CREATE TABLE mapped_acl ( id int(11) NOT NULL auto_increment, work_group varchar(1) NOT NULL, resource varchar(20) NOT NULL, action varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=gbk;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn