mysql.sql 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : maria
  4. Source Server Version : 100312
  5. Source Host : localhost:3306
  6. Source Database : wechat
  7. Target Server Type : MYSQL
  8. Target Server Version : 100312
  9. File Encoding : 65001
  10. Date: 2019-01-27 16:57:32
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for customer
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `customer`;
  17. CREATE TABLE `customer` (
  18. `csr_id` varchar(20) NOT NULL COMMENT '用户id',
  19. `csr_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户姓名或昵称',
  20. `csr_phone` varchar(16) NOT NULL COMMENT '用户电话',
  21. `csr_gender` bit(1) NOT NULL COMMENT '用户性别',
  22. `csr_password` varchar(32) NOT NULL COMMENT '用户密码',
  23. `csr_old_phone` varchar(16) DEFAULT '' COMMENT '用户旧手机(换手机)',
  24. `csr_vcode` varchar(32) DEFAULT '' COMMENT '用户验证码(用于忘记密码)',
  25. `vcode_expiry_time` datetime DEFAULT NULL ON UPDATE current_timestamp() COMMENT '验证码有效时间',
  26. `enable` bit(1) DEFAULT b'0' COMMENT '启用禁用',
  27. `csr_gen_time` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  28. PRIMARY KEY (`csr_id`),
  29. UNIQUE KEY `phone` (`csr_phone`)
  30. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  31. -- ----------------------------
  32. -- Table structure for reply
  33. -- ----------------------------
  34. DROP TABLE IF EXISTS `reply`;
  35. CREATE TABLE `reply` (
  36. `type_id` varchar(20) NOT NULL COMMENT '分类id',
  37. `reply_name` varchar(255) NOT NULL COMMENT '回复名称',
  38. `reply_content` varchar(16) NOT NULL COMMENT '回复内容',
  39. `reply_gen_time` datetime DEFAULT NULL COMMENT '生成时间',
  40. PRIMARY KEY (`reply_name`,`type_id`)
  41. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  42. -- ----------------------------
  43. -- Table structure for reply_type
  44. -- ----------------------------
  45. DROP TABLE IF EXISTS `reply_type`;
  46. CREATE TABLE `reply_type` (
  47. `csr_id` varchar(20) NOT NULL COMMENT '用户id',
  48. `type_id` varchar(20) NOT NULL COMMENT '分类id',
  49. `type_name` varchar(255) NOT NULL COMMENT '分类名称',
  50. `type_gen_time` datetime DEFAULT NULL COMMENT '分类生成时间',
  51. PRIMARY KEY (`type_id`),
  52. UNIQUE KEY `cus_type` (`csr_id`,`type_name`) USING BTREE
  53. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;