/*
Navicat MySQL Data Transfer

Source Server         : Superbee
Source Server Version : 50625
Source Host           : localhost:3306
Source Database       : garden

Target Server Type    : MYSQL
Target Server Version : 50625
File Encoding         : 65001

Date: 2017-03-27 17:09:48
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for gd_admin
-- ----------------------------
DROP TABLE IF EXISTS `gd_admin`;
CREATE TABLE `gd_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `last_ip` varchar(100) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `last_time` datetime DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gd_admin
-- ----------------------------
INSERT INTO `gd_admin` VALUES ('8', 'admin', '超级管理员', 'e10adc3949ba59abbe56e057f20f883e', '2017-02-24 15:55:47', '2017-03-21 15:05:52', '127.0.0.1', '13434123215', '2017-03-27 13:44:47', '临海村3号2-1');
INSERT INTO `gd_admin` VALUES ('9', 'li', '李三', 'e10adc3949ba59abbe56e057f20f883e', '2017-02-24 15:56:41', '2017-03-21 14:48:25', '127.0.0.1', '13578945616', '2017-03-21 14:47:53', '高兴村');
INSERT INTO `gd_admin` VALUES ('10', 'test', '测试管理员', 'e10adc3949ba59abbe56e057f20f883e', '2017-02-24 15:58:41', '2017-03-21 14:45:39', '192.168.1.41', null, '2017-03-21 14:45:39', null);
INSERT INTO `gd_admin` VALUES ('37', 'shit', '草拟吗', 'e10adc3949ba59abbe56e057f20f883e', '2017-02-28 15:27:47', '2017-03-21 17:35:54', '127.0.0.1', '13223236542', '2017-03-21 15:08:08', '32321');

-- ----------------------------
-- Table structure for gd_role
-- ----------------------------
DROP TABLE IF EXISTS `gd_role`;
CREATE TABLE `gd_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 1 启用 0 禁用',
  `rules` text,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gd_role
-- ----------------------------
INSERT INTO `gd_role` VALUES ('1', '超级管理员', '1', '1,2,7,3,4,5,8,6,9,10,13,11,14,12,15,16,17,18', '2017-03-21 14:52:07');
INSERT INTO `gd_role` VALUES ('2', '后台管理员', '1', '1,2,7,3,4,6,9,10,13,11,14,12', null);
INSERT INTO `gd_role` VALUES ('3', '一般管理员', '1', '1,2,7,3,4,6', null);

-- ----------------------------
-- Table structure for gd_role_rule
-- ----------------------------
DROP TABLE IF EXISTS `gd_role_rule`;
CREATE TABLE `gd_role_rule` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `aid` int(11) DEFAULT NULL,
  `rid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gd_role_rule
-- ----------------------------
INSERT INTO `gd_role_rule` VALUES ('9', '8', '1');
INSERT INTO `gd_role_rule` VALUES ('10', '9', '2');
INSERT INTO `gd_role_rule` VALUES ('11', '10', '3');
INSERT INTO `gd_role_rule` VALUES ('12', '37', '3');

-- ----------------------------
-- Table structure for gd_rule
-- ----------------------------
DROP TABLE IF EXISTS `gd_rule`;
CREATE TABLE `gd_rule` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT '0',
  `title` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1' COMMENT '状态：为1正常，为0禁用',
  `type` tinyint(4) DEFAULT '1',
  `condition` varchar(255) DEFAULT NULL COMMENT '规则表达式，为空表示存在就验证，不为空表示按照条件验证',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gd_rule
-- ----------------------------
INSERT INTO `gd_rule` VALUES ('1', '0', '管理员列表', '/user/index/index', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('2', '1', '编辑管理员', '/user/index/edit', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('3', '1', '重置密码', '/user/index/reset', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('4', '3', '修改密码', '/user/index/pass', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('5', '1', '分配角色', '/user/index/group', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('6', '1', '删除管理员', '/user/index/delete', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('7', '2', '保存管理员', '/user/index/save', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('8', '5', '保存角色', '/user/index/rule', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('9', '0', '角色列表', '/user/role/index', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('10', '9', '角色编辑', '/user/role/edit', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('11', '9', '权限分配', '/user/role/set', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('12', '9', '删除角色', '/user/role/delete', '1', '1', '', null);
INSERT INTO `gd_rule` VALUES ('13', '10', '保存角色', '/user/role/save', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('14', '11', '更新权限', '/user/role/update', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('15', '0', '权限列表', '/user/rule/index', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('16', '15', '更新权限', '/user/rule/save', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('17', '15', '编辑权限', '/user/rule/edit', '1', '1', null, null);
INSERT INTO `gd_rule` VALUES ('18', '15', '删除权限', '/user/rule/delete', '1', '1', null, null);

-- ----------------------------
-- Table structure for gd_user
-- ----------------------------
DROP TABLE IF EXISTS `gd_user`;
CREATE TABLE `gd_user` (
  `id` bigint(20) NOT NULL,
  `uid` varchar(255) NOT NULL DEFAULT '',
  `diamond` int(11) DEFAULT '0',
  `coin` int(11) DEFAULT '0',
  `short` varchar(12) DEFAULT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `last_ip` varchar(100) DEFAULT NULL,
  `registertime` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


-- ----------------------------
-- Table structure for gd_user_skill
-- ----------------------------
DROP TABLE IF EXISTS `gd_user_skill`;
CREATE TABLE `gd_user_skill` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  `skill_id` int(11) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

