## 數據庫
#### auth_rule表:
~~~
CREATE TABLE `hui_auth_rule` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('menu','file') NOT NULL DEFAULT 'file' COMMENT 'menu為菜單,file為權限節點',
`pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '規則名稱',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '規則名稱',
`icon` varchar(50) NOT NULL DEFAULT '' COMMENT '圖標',
`condition` varchar(255) NOT NULL DEFAULT '' COMMENT '條件',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '備注',
`ismenu` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否為菜單',
`createtime` int(10) DEFAULT NULL COMMENT '創建時間',
`updatetime` int(10) DEFAULT NULL COMMENT '更新時間',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '權重',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '狀態',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `name` (`name`) USING BTREE,
KEY `pid` (`pid`) USING BTREE,
KEY `weigh` (`weigh`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='節點表';
~~~
寫入數據:
~~~
INSERT INTO `hui_auth_rule` VALUES (1, 'file', 0, 'general', '常規管理', 'icon-settings', '', '', 1, 1497429920, 1497430169, 1, 'normal');
INSERT INTO `hui_auth_rule` VALUES (2, 'file', 0, 'auth', '權限管理', 'icon-group', '', '', 1, 1497429920, 1577703004, 2, 'normal');
INSERT INTO `hui_auth_rule` VALUES (3, 'file', 2, 'auth/admin', '管理員管理', 'icon-friendfill', '', 'Admin tips', 1, 1497429920, 1577703009, 1, 'normal');
INSERT INTO `hui_auth_rule` VALUES (4, 'file', 1, 'auth/adminlog', '管理員日志', 'icon-subscription_light\r\n', '', 'Admin log tips', 1, 1497429920, 1497430307, 99, 'normal');
INSERT INTO `hui_auth_rule` VALUES (5, 'file', 2, 'auth/group', '角色組', 'icon-group_fill_light', '', 'Group tips', 1, 1497429920, 1577703013, 2, 'normal');
INSERT INTO `hui_auth_rule` VALUES (6, 'file', 2, 'auth/rule', '菜單規則', 'icon-sort', '', 'Rule tips', 1, 1497429920, 1497430581, 3, 'normal');
INSERT INTO `hui_auth_rule` VALUES (7, 'file', 6, 'auth/rule_switch_field', '更改狀態', 'icon-round_text_fill', '', '', 0, NULL, 1577703022, 0, 'normal');
INSERT INTO `hui_auth_rule` VALUES (8, 'file', 6, 'auth/rule_order', '排序', 'icon-round_text_fill', '', '', 0, 1577603451, 1577703026, 2, 'normal');
INSERT INTO `hui_auth_rule` VALUES (9, 'file', 6, 'auth/rule_add', '添加菜單規則', 'icon-round_text_fill', '', '', 0, 1577610841, 1577777054, 3, 'normal');
INSERT INTO `hui_auth_rule` VALUES (10, 'file', 6, 'auth/rule_edit', '修改菜單規則', 'icon-round_text_fill', '', '', 0, 1577756921, 1577777063, 4, 'normal');
INSERT INTO `hui_auth_rule` VALUES (11, 'file', 6, 'rule/rule_delete', '刪除菜單規則', 'icon-round_text_fill', '', '', 0, 1577756963, 1577777069, 5, 'normal');
INSERT INTO `hui_auth_rule` VALUES (12, 'file', 5, 'auth/group_add', '添加角色組', 'icon-round_text_fill', '', '', 0, 1577777043, 1577777085, 1, 'normal');
INSERT INTO `hui_auth_rule` VALUES (13, 'file', 5, 'auth/group_edit', '修改角色組', 'icon-round_text_fill', '', '', 0, 1577777099, NULL, 2, 'normal');
INSERT INTO `hui_auth_rule` VALUES (14, 'file', 5, 'auth/group_delete', '刪除角色組', 'icon-round_text_fill', '', '', 0, 1577777115, NULL, 3, 'normal');
~~~
****
## auth_group_access表:
~~~
CREATE TABLE `hui_auth_group_access` (
`uid` int(10) unsigned NOT NULL COMMENT '會員ID',
`group_id` int(10) unsigned NOT NULL COMMENT '級別ID',
UNIQUE KEY `uid_group_id` (`uid`,`group_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='權限分組表';
~~~
## auth_group表:
~~~
CREATE TABLE `hui_auth_group` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父組別',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '組名',
`rules` text NOT NULL COMMENT '規則ID',
`createtime` int(10) DEFAULT NULL COMMENT '創建時間',
`updatetime` int(10) DEFAULT NULL COMMENT '更新時間',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '狀態',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='分組表';
~~~
寫入數據
~~~
INSERT INTO `1055tp5_test`.`hui_auth_group`(`id`, `pid`, `name`, `rules`, `createtime`, `updatetime`, `status`) VALUES (1, 0, '超級管理員', '*', 1490883540, 149088354, 'normal');
INSERT INTO `1055tp5_test`.`hui_auth_group`(`id`, `pid`, `name`, `rules`, `createtime`, `updatetime`, `status`) VALUES (2, 1, '項目總監', '1,4,2,3,5,12,13', 1490883540, 1577868110, 'normal');
~~~
## admin表:
~~~
CREATE TABLE `hui_admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(20) NOT NULL DEFAULT '' COMMENT '用戶名',
`nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵稱',
`password` varchar(32) NOT NULL DEFAULT '' COMMENT '密碼',
`salt` varchar(30) NOT NULL DEFAULT '' COMMENT '密碼鹽',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '頭像',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '電子郵箱',
`loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失敗次數',
`logintime` int(10) DEFAULT NULL COMMENT '登錄時間',
`loginip` varchar(50) DEFAULT NULL COMMENT '登錄IP',
`createtime` int(10) DEFAULT NULL COMMENT '創建時間',
`updatetime` int(10) DEFAULT NULL COMMENT '更新時間',
`token` varchar(59) NOT NULL DEFAULT '' COMMENT 'Session標識',
`status` varchar(30) NOT NULL DEFAULT 'normal' COMMENT '狀態',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='管理員表';
~~~
寫入數據:
~~~
INSERT INTO `1055tp5_test`.`hui_admin`(`id`, `username`, `nickname`, `password`, `salt`, `avatar`, `email`, `loginfailure`, `logintime`, `loginip`, `createtime`, `updatetime`, `token`, `status`) VALUES (1, 'admin', 'Admin', 'fffe69302908dafc83cecc5686608ac7', 'zsmQ5v', '/assets/img/avatar.png', 'admin@fastadmin.net', 0, 1577328226, '127.0.0.1', 1492186163, 1577328226, '62465acf-babd-44d8-96a1-51535702f218', 'normal');
~~~
- thinkphp
- thinkphp筆記
- 后臺登陸退出
- config配置
- 隱藏后臺模塊
- 單獨調用騰訊云行為驗證碼
- api接口跨域問題
- api接口創建案例代碼
- 使用gateway worker
- 使用swoole代碼筆記
- 使用隊列 think-queue筆記
- 后臺布局
- MySQL
- 1、關于lnmp mysql的一個坑
- 2、mysql實現group by后取各分組的最新一條
- 其他
- 搞笑的注釋代碼
- 分頁類
- nodejs 打包網址為exe
- 免費天氣預報API接口
- Ajax
- 簡單的ajax分頁1
- 通用ajax-post提交
- 引用的類庫文件
- Auth.php
- Auth.php權限控制對應的數據庫表結構
- Layui.php
- Pinyin.php
- Random.php
- Tree.php
- Tree2.php
- Js-Jq
- Git的使用
- 3、bootstrap-datetimepicker實現兩個時間范圍輸入
- CentOS安裝SSR做梯子
- Python爬蟲
- 1、安裝Gerapy
- 2、安裝Scrapy
- 3、Scrapy使用
- 4、Scrapy框架,爬取網站返回json數據(spider源碼)
- 0、Python pip更換國內源(一句命令換源)
- 服務器運維
- 1、寶塔使用webhook更新服務器代碼
- 2、搭建內網穿透
- 3、數據庫主從同步
- 4、數據庫復制
- hui-Shop問題
- 1、前端模板的注意事項
- 2、模板標簽