/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50528
Source Host : localhost:3306
Source Database : db_estate
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2017-11-16 16:23:27
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for es_activity
-- ----------------------------
DROP TABLE IF EXISTS `es_activity`;
CREATE TABLE `es_activity` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`community_code` varchar(50) NOT NULL COMMENT '所属小区编号,建议CM开头',
`title` varchar(255) NOT NULL COMMENT '活动标题',
`content` text COMMENT '活动内容',
`place` varchar(255) NOT NULL COMMENT '活动地点',
`begin_time` int(10) unsigned DEFAULT NULL COMMENT '活动开始时间',
`end_time` int(10) unsigned DEFAULT NULL COMMENT '活动截止时间',
`sponsor_unit` varchar(255) NOT NULL COMMENT '举办单位',
`status` tinyint(1) unsigned DEFAULT '0' COMMENT '状态 0 无效 1 有效',
`create_time` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
`update_time` int(10) unsigned DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='小区活动信息表';
-- ----------------------------
-- Table structure for es_admin
-- ----------------------------
DROP TABLE IF EXISTS `es_admin`;
CREATE TABLE `es_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(100) NOT NULL DEFAULT '' COMMENT '头像',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '电子邮箱',
`loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
`logintime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`token` varchar(59) NOT NULL DEFAULT '' COMMENT 'Session标识',
`status` varchar(30) NOT NULL DEFAULT 'normal' COMMENT '状态',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='管理员表';
-- ----------------------------
-- Records of es_admin
-- ----------------------------
INSERT INTO `es_admin` VALUES ('1', 'admin', '超级管理员', '30db7c7a6f88e33afa132e1a855af308', '13deb6', '/assets/img/avatar.png', 'admin@admin.com', '0', '1510816607', '1492186163', '1510816607', '5bcbfa80-340d-49b8-8dc6-75ec99671988', 'normal');
-- ----------------------------
-- Table structure for es_admin_log
-- ----------------------------
DROP TABLE IF EXISTS `es_admin_log`;
CREATE TABLE `es_admin_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
`username` varchar(30) NOT NULL DEFAULT '' COMMENT '管理员名字',
`url` varchar(100) NOT NULL DEFAULT '' COMMENT '操作页面',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '日志标题',
`content` text NOT NULL COMMENT '内容',
`ip` varchar(50) NOT NULL DEFAULT '' COMMENT 'IP',
`useragent` varchar(255) NOT NULL DEFAULT '' COMMENT 'User-Agent',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `name` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员日志表';
-- ----------------------------
-- Records of es_admin_log
-- ----------------------------
-- ----------------------------
-- Table structure for es_attachment
-- ----------------------------
DROP TABLE IF EXISTS `es_attachment`;
CREATE TABLE `es_attachment` (
`id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '物理路径',
`imagewidth` varchar(30) NOT NULL DEFAULT '' COMMENT '宽度',
`imageheight` varchar(30) NOT NULL DEFAULT '' COMMENT '宽度',
`imagetype` varchar(30) NOT NULL DEFAULT '' COMMENT '图片类型',
`imageframes` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '图片帧数',
`filesize` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
`mimetype` varchar(30) NOT NULL DEFAULT '' COMMENT 'mime类型',
`extparam` varchar(255) NOT NULL DEFAULT '' COMMENT '透传数据',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`uploadtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间',
`storage` enum('local','upyun','qiniu') NOT NULL DEFAULT 'local' COMMENT '存储位置',
`sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';
-- ----------------------------
-- Records of es_attachment
-- ----------------------------
INSERT INTO `es_attachment` VALUES ('1', '/assets/img/qrcode.png', '150', '150', 'png', '0', '21859', 'image/png', '', '1499681848', '1499681848', '1499681848', 'local', '17163603d0263e4838b9387ff2cd4877e8b018f6');
-- ----------------------------
-- Table structure for es_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `es_auth_group`;
CREATE TABLE `es_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) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分组表';
-- ----------------------------
-- Records of es_auth_group
-- ----------------------------
INSERT INTO `es_auth_group` VALUES ('1', '0', '超级管理员', '*', '1490883540', '149088354', 'normal');
INSERT INTO `es_auth_group` VALUES ('2', '1', '小区管理员', '1,9,10,13,14,15,16,17,40,41,42,43,44,45,46,582,583,585,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,5,581', '1490883540', '1510797711', 'normal');
INSERT INTO `es_auth_group` VALUES ('3', '2', '小区普通员工', '', '1509948028', '1509948028', 'normal');
INSERT INTO `es_auth_group` VALUES ('4', '2', '业主', '658,659,660,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682', '1510275700', '1510797745', 'normal');
-- ----------------------------
-- Table structure for es_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `es_auth_group_access`;
CREATE TABLE `es_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`),
KEY `uid` (`uid`),
KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限分组表';
-- ----------------------------
-- Records of es_auth_group_access
-- ----------------------------
INSERT INTO `es_auth_group_access` VALUES ('1', '1');
-- ----------------------------
-- Table structure for es_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `