/*
Navicat MySQL Data Transfer

Source Server         : 192.168.5.104
Source Server Version : 80016
Source Host           : 192.168.5.104:3306
Source Database       : wxkf

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

Date: 2019-06-28 10:18:19
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名',
  `password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码',
  `user_nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
  `status` int(2) NOT NULL DEFAULT '0' COMMENT '当前账号的状态',
  `user_type` varchar(2) DEFAULT NULL,
  `create_time` varchar(30) DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(30) DEFAULT NULL COMMENT '更新时间',
  `code_time` varchar(40) DEFAULT '0' COMMENT '分享吗时间',
  `authority` varchar(20) DEFAULT NULL COMMENT '身份',
  `openid` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '管理员', '0', '0', '1550738794', null, '12', null, null);

-- ----------------------------
-- Table structure for group
-- ----------------------------
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(50) DEFAULT NULL COMMENT '分组的名称',
  `addtime` varchar(30) DEFAULT '' COMMENT '添加时间',
  `region` varchar(50) DEFAULT NULL COMMENT '所有区域',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of group
-- ----------------------------
INSERT INTO `group` VALUES ('1', '第一组', '1561530454', '1');
INSERT INTO `group` VALUES ('2', '第二组', '1561530461', '2');

-- ----------------------------
-- Table structure for login
-- ----------------------------
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(100) DEFAULT NULL,
  `uid` int(11) DEFAULT NULL,
  `openid` varchar(100) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of login
-- ----------------------------

-- ----------------------------
-- Table structure for region
-- ----------------------------
DROP TABLE IF EXISTS `region`;
CREATE TABLE `region` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(64) NOT NULL DEFAULT '',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of region
-- ----------------------------
INSERT INTO `region` VALUES ('1', '龙华', '1561530211', '1');
INSERT INTO `region` VALUES ('2', '龙岗', '1561530221', '1');

-- ----------------------------
-- Table structure for repair_order
-- ----------------------------
DROP TABLE IF EXISTS `repair_order`;
CREATE TABLE `repair_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `order_id` varchar(30) NOT NULL DEFAULT '' COMMENT '订单id',
  `type` varchar(100) DEFAULT NULL COMMENT '订单类别',
  `linkman` varchar(100) DEFAULT NULL COMMENT '联系人',
  `linktel` varchar(100) DEFAULT NULL COMMENT '联系电话',
  `repuser` varchar(100) DEFAULT NULL COMMENT '维修人',
  `status` int(2) NOT NULL DEFAULT '0' COMMENT '订单的状态(0接单中,1处理中，2完成)',
  `group` varchar(25) DEFAULT NULL COMMENT '小区信息',
  `address` varchar(100) DEFAULT NULL COMMENT '地址信息',
  `title` varchar(255) DEFAULT NULL COMMENT '问题的简单描述',
  `content` varchar(255) DEFAULT NULL COMMENT '问题的详细描述',
  `message` varchar(255) DEFAULT NULL COMMENT '备注',
  `grade` varchar(5) DEFAULT NULL COMMENT '订单的等级',
  `create_time` varchar(25) DEFAULT NULL COMMENT '订单创建时间',
  `update_time` varchar(25) DEFAULT NULL COMMENT '订单更新时间',
  `openid` varchar(100) NOT NULL DEFAULT '' COMMENT '提交订单的用户微信标识符',
  `repuser_message` varchar(255) DEFAULT NULL COMMENT '管理者对订单的评论',
  `linkman_message` varchar(255) DEFAULT NULL COMMENT '报修者对订单的评论',
  `handle` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of repair_order
-- ----------------------------
INSERT INTO `repair_order` VALUES ('1', '2019062897511021', '', '测试', '测试', 'oUj1u1XQ5KUQZgBrRLfqGyrrw73E', '1', '1', '测试', '测试', '测试', '测试', '0', '1561687162', '1561687288', 'oUj1u1WD9jkWnK4wKzGz1-SM4xME', null, null, null);
INSERT INTO `repair_order` VALUES ('2', '2019062857985710', '', '哈哈', '哈哈', 'oUj1u1XQ5KUQZgBrRLfqGyrrw73E', '1', '1', '哈哈', '哈哈', '哈哈', '哈哈', '0', '1561687353', '1561687429', 'oUj1u1XQ5KUQZgBrRLfqGyrrw73E', null, null, null);

-- ----------------------------
-- Table structure for share
-- ----------------------------
DROP TABLE IF EXISTS `share`;
CREATE TABLE `share` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `author` varchar(40) DEFAULT NULL COMMENT '分享者',
  `url` varchar(100) DEFAULT NULL COMMENT '分享地址',
  `code` varchar(10) DEFAULT NULL COMMENT '邀请码',
  `addtime` varchar(20) DEFAULT NULL COMMENT '生成时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of share
-- ----------------------------

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
  `openid` varchar(255) DEFAULT NULL COMMENT '微信中唯一的标识符',
  `headimgurl` varchar(255) DEFAULT NULL COMMENT '头像',
  `telephone` varchar(30) DEFAULT '' COMMENT '注册的手机号码',
  `username` varchar(255) DEFAULT '' COMMENT '注册的姓名',
  `group` varchar(30) DEFAULT '' COMMENT '分组信息(所属的片区)',
  `area` varchar(50) DEFAULT NULL COMMENT '所属的小区',
  `address` varchar(255) DEFAULT '' COMMENT '地址信息',
  `addtime` varchar(255) DEFAULT '' COMMENT '添加时间',
  `identity` varchar(255) DEFAULT '0' COMMENT '身份选择（0报修 1维修 2协管者）',
  `is_register` int(10) NOT NULL DEFAULT '0' COMMENT '是否注册过(0未注册 1注册)',
  `is_check` int(10) NOT NULL DEFAULT '0' COMMENT '是否审核(0 未审核  1 审核)',
  `region` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', '小鱼儿', 'oUj1u1WD9jkWnK4wKzGz1-SM4xME', 'http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIK12AvJLiatS78pRL1eoV1YAvIy8Q9q4YJ2fEcaRKafhQfIl1QQFBICoGqricwgrYZGAtK0rgVHytQ/132', '18477272535', 'Candy', '1', '上塘商业大厦', '上塘', '1561530519', '1', '1', '1', '1');
INSERT INTO `user` VALUES ('3', 'Aaron', 'oUj1u1XQ5KUQZgBrRLfqGyrrw73E', 'http://thirdwx.qlogo.cn/mmopen/vi_32/RWKspFicia0l3JrMDy3xicLtuBicxHtTVYedN8rhumBK0HbKI9lvMn7NCo8dJwXUNIuxYtgA9viaVvs8W1Vt7sLwDKQ/132', '123456', 'aaron', '1', '上塘', '上塘', '1561535872', '1', '1', '1', '1');
INSERT INTO `user` VALUES ('4', 'Robin', 'oUj1u1cMLiZxE_dvHS2TYVynFosQ', 'http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLEhqrKHiabE4eBiclhzc0Xtm0FZSJ8TBcrO0WoNb0OJDad9rj8K641XfgZ2J0DE7pfwRuxZQcSjdRQ/132', '123456', 'robin', '1', '123', '123', '1561536852', '0', '1', '1', '1');
