/*
	Navicat MySQL Data Transfer

	Source Server         : wjw(im)
	Source Server Version : 50549
	Source Host           : localhost:3306
	Source Database       : im

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

	Date: 2016-07-19 20:56:59
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `group_msg`
-- ----------------------------
DROP TABLE IF EXISTS `group_msg`;
CREATE TABLE `group_msg` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` varchar(255) NOT NULL COMMENT '组ID',
  `from_uid` varchar(255) NOT NULL COMMENT '消息发送者ID',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '消息类型：1文本，2图片，3语音',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '消息发送时间',
  `content` varchar(1000) NOT NULL DEFAULT '' COMMENT '消息内容',
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of group_msg
-- ----------------------------

-- ----------------------------
-- Table structure for `push_notify`
-- ----------------------------
DROP TABLE IF EXISTS `push_notify`;
CREATE TABLE `push_notify` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` varchar(255) NOT NULL COMMENT '用户ID',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '推送消息时间戳',
  `type` varchar(255) NOT NULL DEFAULT '' COMMENT '消息类',
  `title` varchar(255) NOT NULL COMMENT '消息标题',
  `content` varchar(255) NOT NULL COMMENT '消息内容',
  `data` varchar(255) NOT NULL DEFAULT '' COMMENT '消息内容',
  `has_pushed` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已经推送：0未推送，1已推送',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of push_notify
-- ----------------------------
INSERT INTO `push_notify` VALUES ('183', 'D20160322000002', '2016-07-19 20:56:05', 'D_CT_01', '指定咨询', '您有新的指定咨询', 'e0370b70f3d74a8ea4aa40e0010cdca2', '0');
INSERT INTO `push_notify` VALUES ('184', 'D20160322000002', '2016-07-19 20:56:25', 'D_CT_02', '指定咨询', '您有新的消息', 'e0370b70f3d74a8ea4aa40e0010cdca2', '0');
INSERT INTO `push_notify` VALUES ('185', 'D20160322000002', '2016-07-19 20:56:42', 'D_CT_02', '指定咨询', '您有新的消息', 'e0370b70f3d74a8ea4aa40e0010cdca2', '0');

-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` varchar(255) NOT NULL COMMENT '用户ID',
  `platform` tinyint(1) NOT NULL DEFAULT '0' COMMENT '平台：0为ios，1为android',
  `token` varchar(255) NOT NULL DEFAULT '' COMMENT '个推的token',
  `client_id` varchar(255) NOT NULL DEFAULT '' COMMENT '个推的clientid',
  `is_online` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否在线：0离线，1在线',
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user
-- ----------------------------
