Thinkphp Authority authentication table Design

Source: Internet
Author: User

-- ---------------------------- -- Table structure for think_auth_group -- ---------------------------- DROP TABLE IF EXISTS `think_auth_group`; CREATE TABLE `think_auth_group` (   `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,   `title` char (100) NOT NULL DEFAULT ‘‘ ,   `status` tinyint(1) NOT NULL DEFAULT ‘1‘ ,   `rules` char (80) NOT NULL DEFAULT ‘‘ ,   PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT= ‘用户组表‘ ;  -- ---------------------------- -- Records of think_auth_group -- ---------------------------- INSERT INTO `think_auth_group` VALUES ( ‘1‘ , ‘管理组‘ , ‘1‘ , ‘1,2‘ );  -- ---------------------------- -- Table structure for think_auth_group_access -- ---------------------------- DROP TABLE IF EXISTS `think_auth_group_access`; CREATE TABLE `think_auth_group_access` (   `uid` mediumint(8) unsigned NOT NULL COMMENT ‘用户id‘ ,   `group_id` mediumint(8) unsigned NOT NULL COMMENT ‘用户组id‘ ,   UNIQUE KEY `uid_group_id` (`uid`,`group_id`),   KEY `uid` (`uid`),   KEY `group_id` (`group_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT= ‘用户组明细表‘ ;  -- ---------------------------- -- Records of think_auth_group_access -- ---------------------------- INSERT INTO `think_auth_group_access` VALUES ( ‘1‘ , ‘1‘ ); INSERT INTO `think_auth_group_access` VALUES ( ‘1‘ , ‘2‘ );  -- ---------------------------- -- Table structure for think_auth_rule -- ---------------------------- DROP TABLE IF EXISTS `think_auth_rule`; CREATE TABLE `think_auth_rule` (   `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,   ` name ` char (80) NOT NULL DEFAULT ‘‘ COMMENT ‘规则唯一标识‘ ,   `title` char (20) NOT NULL DEFAULT ‘‘ COMMENT ‘规则中文名称‘ ,   `status` tinyint(1) NOT NULL DEFAULT ‘1‘ COMMENT ‘状态:为1正常,为0禁用‘ ,   `type` char (80) NOT NULL ,   `condition` char (100) NOT NULL DEFAULT ‘‘ COMMENT ‘规则表达式,为空表示存在就验证,不为空表示按照条件验证‘ ,   PRIMARY KEY (`id`),   UNIQUE KEY ` name ` (` name `) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT= ‘规则表‘ ;  -- ---------------------------- -- Records of think_auth_rule -- ---------------------------- insert into ' think_auth_rule ' values ( ' 1 ' , Code class= "SQL string" > ' Home/index ' ' list ' Code class= "SQL Plain", ' 1 ' ' Home ' " insert into ' think_auth_rule ' values ( ' 2 ' , Code class= "SQL string" > ' Home/add ' ' Add ' Code class= "SQL Plain", ' 1 ' ' Home ' " insert into ' think_auth_rule ' values ( ' 3 ' , Code class= "SQL string" > ' Home/edit ' ' edit ' Code class= "SQL Plain", ' 1 ' ' Home ' " INSERT INTO `think_auth_rule` VALUES ( ‘4‘ , ‘Home/delete‘ , ‘删除‘ , ‘1‘ , ‘Home‘ , ‘‘ );   DROP TABLE IF EXISTS `think_user`; CREATE TABLE `think_user` (   `id` int (11) NOT NULL ,   `username` varchar (30) DEFAULT NULL ,   ` password ` varchar (32) DEFAULT NULL ,   `age` tinyint(2) DEFAULT NULL ,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- ---------------------------- -- Records of think_user -- ---------------------------- INSERT INTO `think_user` VALUES ( ‘1‘ , ‘admin‘ , ‘21232f297a57a5a743894a0e4a801fc3‘ , ‘25‘ );

Thinkphp Authority authentication table Design

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.