zoukankan      html  css  js  c++  java
  • ThinkPHP权限认证表设计

    -- ----------------------------
    -- 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', 'Home/index', '列表', '1', 'Home', '');
    INSERT INTO `think_auth_rule` VALUES ('2', 'Home/add', '添加', '1', 'Home', '');
    INSERT INTO `think_auth_rule` VALUES ('3', 'Home/edit', '编辑', '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');
     
     
  • 相关阅读:
    BZOJ-1034: [ZJOI2008]泡泡堂BNB (田忌赛马贪心)
    BZOJ-2190: [SDOI2008]仪仗队 (欧拉函数)
    BZOJ-1864: [Zjoi2006]三色二叉树 (julao都说简单的树形DP)
    BZOJ-2657: [Zjoi2012]旅游(journey) (树形DP求最长链)
    BZOJ-2241: [SDOI2011]打地鼠 (模拟+枚举)
    BZOJ-1207: [HNOI2004]打鼹鼠 (LIS类似DP)
    BZOJ-1821: [JSOI2010]Group 部落划分 Group (二分+并查集)
    BZOJ-1218: [HNOI2003]激光炸弹 (前缀和+模拟)
    [SinGuLaRiTy] ZKW线段树
    [SinGuLaRiTy] 字节大小
  • 原文地址:https://www.cnblogs.com/mudebao/p/6950660.html
Copyright © 2011-2022 走看看