/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50557
Source Host           : 127.0.0.1
Source Database       : wxdb

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

Date: 2019-01-14 10:45:44
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for customer
-- ----------------------------
DROP TABLE IF EXISTS `customer`;
CREATE TABLE `customer` (
  `csr_id` varchar(16) NOT NULL COMMENT '用户id',
  `csr_name` varchar(255) DEFAULT '' COMMENT '用户姓名或昵称',
  `csr_phone` varchar(16) NOT NULL COMMENT '用户电话',
  `csr_gender` bit(1) NOT NULL COMMENT '用户性别',
  `csr_password` varchar(32) NOT NULL COMMENT '用户密码',
  `csr_old_phone` varchar(16) DEFAULT '' COMMENT '用户旧手机（换手机）',
  `csr_vcode` varchar(32) DEFAULT '' COMMENT '用户验证码（用于忘记密码）',
  `vcode_expiry_time` datetime DEFAULT NULL COMMENT '验证码有效时间',
  `enable` bit(1) DEFAULT 0 COMMENT '启用\禁用',
  PRIMARY KEY (`csr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for reply_type
-- ----------------------------
DROP TABLE IF EXISTS `reply_type`;
CREATE TABLE `reply_type` (
  `csr_id` varchar(16) NOT NULL COMMENT '用户id',
  `type_id` varchar(16) NOT NULL COMMENT '分类id',
  `type_name` varchar(255) NOT NULL COMMENT '分类名称',
  `type_gen_time` datetime DEFAULT NULL COMMENT '分类生成时间',
  PRIMARY KEY (`type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for reply
-- ----------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE `reply` (
  `csr_id` varchar(16) NOT NULL COMMENT '用户id',
  `type_id` varchar(16) NOT NULL COMMENT '分类id',
  `reply_id` varchar(16) NOT NULL COMMENT '回复id',
  `reply_name` varchar(255) NOT NULL COMMENT '回复名称',
  `reply_content` varchar(16) NOT NULL COMMENT '回复内容',
  `reply_gen_time` datetime DEFAULT NULL COMMENT '生成时间',
  PRIMARY KEY (`reply_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;