權限表的建立

##1、新建三張表think_auth_group,think_auth_group_access,think_auth_rules

CREATE TABLE think_auth_group(

id ​​notint(11) not null Primary key auto_increment,

title char(100) NOT NULL, 

status tinyint(1) DEFAULT NULL, 

rules char(80) DEFAULT NULL, 

create_time int(11) DEFAULT NULL)

ENGINE=InnoDB DEFAULT CHARSET=utf8;

微信图片_20180307174754.png

##建立表`think_auth_group_access` (

##建立表`think_auth_group_access` (

`uid`smallint(5) unsigned NOT NULL,

 `group_id`smallint(5) unsigned NOT NULL,

 唯一鍵`uid_group_id`(`uid`,`group_id`) ,

  KEY `uid` (`uid`),

  KEY `group_id` (`group_id`)

) 引擎=INNODB 預設字元集=utf8;微信图片_20180307175024.png

建立表格think_auth_rules(

id ​​int(11) not null 主鍵auto_increment,

name varchar(100) NOT NULL,

title varchar(100) NOT NULL, 

##type tinyint(1) DEFAULT NULL, 

status tinyint(1) DEFAULT NULL, 

#condition char( 100) DEFAULT NULL ,

pid Smallint(5) 預設NULL,

sort tinyint(4) 預設NULL,

#create_time int(11) 預設NULL)

微信图片_20180307175109.png



##################################################。 ###ENGINE =InnoDB預設字元集=utf8;##########################################
繼續學習
||
<?php echo "权限表添加";
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!