-- MySQL dump 10.13  Distrib 5.7.24, for Linux (x86_64)
--
-- Host: 127.0.0.1    Database: im_service
-- ------------------------------------------------------
-- Server version	5.7.24-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `im_service`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `im_service` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

USE `im_service`;

--
-- Table structure for table `chat`
--

DROP TABLE IF EXISTS `chat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `u1` varchar(32) NOT NULL DEFAULT '',
  `u2` varchar(32) DEFAULT '' COMMENT 'u1 < u2',
  `goods_id` int(11) DEFAULT '0',
  `show_to_u1` tinyint(1) DEFAULT '1',
  `show_to_u2` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `u1` (`u1`),
  KEY `u2` (`u2`),
  KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `chat`
--

LOCK TABLES `chat` WRITE;
/*!40000 ALTER TABLE `chat` DISABLE KEYS */;
INSERT INTO `chat` VALUES (1,'1','2',13,1,1),(2,'1','3',14,1,1),(3,'1','4',23,1,1),(4,'1','5',32,1,1),(5,'1','6',32,1,0),(6,'1','7',33,1,0),(7,'1','8',34,1,0),(8,'1','9',31,1,0),(9,'1','10',25,1,0),(10,'1','11',36,1,0),(11,'1','12',15,1,0);
/*!40000 ALTER TABLE `chat` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `history`
--

DROP TABLE IF EXISTS `history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chat_id` int(11) DEFAULT '0',
  `u1_to_u2` tinyint(1) DEFAULT '0',
  `message_type` int(11) DEFAULT '1',
  `message_body` text,
  `send_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `chat_id` (`chat_id`),
  KEY `send_time` (`send_time`)
) ENGINE=InnoDB AUTO_INCREMENT=277 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `history`
--

LOCK TABLES `history` WRITE;
/*!40000 ALTER TABLE `history` DISABLE KEYS */;
INSERT INTO `history` VALUES (1,1,1,1,'第一条消息','2018-12-05 12:57:04'),(2,1,0,1,'回复第一条消息','2018-12-05 12:57:43'),(3,1,1,1,'第二条消息','2018-12-05 12:58:23'),(4,3,1,1,'testets','2018-12-06 07:39:38'),(9,2,0,1,'aaa','2018-12-06 12:30:01'),(10,3,0,1,'bbb','2018-12-06 12:30:10'),(11,4,0,1,'ccc','2018-12-06 12:30:21'),(12,2,0,1,'ddd','2018-12-06 12:30:29'),(13,4,0,1,'测试redis','2018-12-06 09:04:00'),(14,4,0,1,'测试redis2','2018-12-07 09:04:00'),(15,2,0,1,'测试redis3','2018-12-07 05:37:37'),(16,2,0,1,'测试聊天框','2018-12-08 01:11:21'),(17,2,0,1,'测试聊天框2','2018-12-08 01:11:31'),(18,2,0,1,'测试刷新','2018-12-08 01:20:44'),(19,2,0,1,'测试jwt','2018-12-08 13:00:17'),(20,2,0,1,'测试jwt','2018-12-08 13:00:00'),(21,2,0,1,'debug','2018-12-09 00:35:00'),(22,2,0,1,'测试重构','2018-12-09 03:36:00'),(23,2,0,1,'测试重构2','2018-12-09 04:37:00'),(24,2,0,1,'测试重构3','2018-12-09 04:40:00'),(25,2,0,1,'测试重构4','2018-12-09 04:58:00'),(26,5,1,4,NULL,'2018-12-09 09:01:56'),(27,6,1,4,NULL,'2018-12-09 09:02:56'),(28,7,1,4,NULL,'2018-12-09 09:03:56'),(29,8,1,4,NULL,'2018-12-09 09:04:56'),(30,9,1,4,NULL,'2018-12-09 09:05:56'),(31,10,1,4,NULL,'2018-12-09 09:06:56'),(32,11,1,4,NULL,'2018-12-09 09:07:56'),(33,2,0,1,'测试badge','2018-12-09 09:42:00'),(34,2,0,1,'测试badge??','2018-12-09 09:55:00'),(35,2,0,1,'测试badge1','2018-12-09 10:00:00'),(36,2,0,1,'测试badge2','2018-12-09 10:01:00'),(37,2,0,1,'测试badge3','2018-12-09 10:05:00'),(38,2,0,1,'测试badge4','2018-12-09 10:05:00'),(40,2,0,1,'测试badge5','2018-12-09 10:07:00'),(41,2,0,1,'测试badge6','2018-12-09 10:16:00'),(42,2,0,1,'测试badge7','2018-12-09 10:16:00'),(43,2,0,1,'测试badge8','2018-12-09 10:17:00'),(44,2,0,1,'测试badge9','2018-12-09 10:17:00'),(45,2,0,1,'测试badge10','2018-12-09 10:18:00'),(46,2,0,1,'测试badge11','2018-12-09 10:21:00'),(47,2,0,1,'测试badge12','2018-12-09 10:21:00'),(48,2,0,1,'测试badge13','2018-12-09 10:26:48'),(49,2,0,1,'测试badge14','2018-12-09 10:26:51'),(50,4,0,1,'redisList3','2018-12-10 03:20:21'),(51,2,0,1,'redisList1','2018-12-10 03:18:13'),(52,2,0,1,'redisList2','2018-12-10 03:18:28'),(53,4,0,1,'redisList4','2018-12-10 05:24:43'),(54,4,0,1,'redisList5','2018-12-10 05:24:45'),(55,4,0,1,'测试badge1','2018-12-11 00:41:11'),(56,4,0,1,'测试badge1','2018-12-11 00:41:12'),(57,4,0,1,'测试badge1','2018-12-11 00:41:12'),(58,4,0,1,'测试onMessage','2018-12-11 00:51:20'),(59,4,0,1,'测试ws接收','2018-12-15 07:15:56'),(60,4,0,1,'测试ws接收1','2018-12-15 07:17:19'),(61,4,0,1,'测试ws接收2','2018-12-15 07:20:05'),(62,4,0,1,'测试ws接收3','2018-12-15 07:20:34'),(63,4,0,1,'测试ws接收4','2018-12-15 07:21:30'),(64,4,0,1,'测试ws接收5','2018-12-15 07:22:18'),(65,4,0,1,'测试ws接收6','2018-12-15 07:23:00'),(66,4,0,1,'测试ws接收6','2018-12-15 07:24:35'),(67,4,0,1,'测试ws接收7','2018-12-15 07:25:22'),(68,4,0,1,'测试ws接收7','2018-12-15 07:26:43'),(69,4,0,1,'测试ws接收8','2018-12-15 07:33:19'),(70,4,0,1,'测试ws接收9','2018-12-15 07:33:41'),(71,4,0,1,'测试ws接收10','2018-12-15 07:36:17'),(72,4,0,1,'测试ws接收11','2018-12-15 07:36:58'),(73,4,0,1,'测试ws接收12','2018-12-15 07:37:35'),(74,4,0,1,'测试ws接收12','2018-12-15 07:38:12'),(75,4,0,1,'测试ws接收12','2018-12-15 07:38:50'),(76,4,0,1,'测试ws接收13','2018-12-15 08:39:40'),(77,2,0,1,'测试badge2','2018-12-11 00:42:12'),(78,2,0,1,'测试ws接收','2018-12-15 08:43:51'),(79,2,0,1,'测试ws接收2','2018-12-15 08:50:31'),(80,4,0,1,'测试ws接收14','2018-12-15 08:40:41'),(81,4,0,1,'测试ws接收15','2018-12-15 08:40:58'),(82,2,0,1,'测试ws接收3','2018-12-15 09:19:46'),(83,2,0,1,'测试ws接收4','2018-12-15 09:21:32'),(84,2,0,1,'测试ws接收5','2018-12-15 09:22:26'),(85,2,0,1,'测试ws接收6','2018-12-15 09:23:32'),(86,2,0,1,'测试ws接收7','2018-12-15 09:24:16'),(87,2,0,1,'测试ws接收8','2018-12-15 09:24:42'),(88,2,0,1,'测试ws接收9','2018-12-15 09:24:50'),(89,2,0,1,'测试ws接收10','2018-12-15 09:25:45'),(90,2,0,1,'测试ws接收11','2018-12-15 09:27:28'),(91,2,0,1,'测试ws接收12','2018-12-15 09:28:17'),(92,2,0,1,'测试ws接收13','2018-12-15 09:28:49'),(93,2,0,1,'测试ws接收14','2018-12-15 09:28:58'),(94,2,0,1,'测试ws接收15','2018-12-15 09:38:32'),(95,2,0,1,'测试ws接收16','2018-12-15 09:39:14'),(96,2,0,1,'测试ws接收17','2018-12-15 09:40:01'),(97,2,0,1,'测试ws接收18','2018-12-15 09:42:40'),(98,2,0,1,'测试ws接收19','2018-12-15 09:51:17'),(99,2,0,1,'测试ws接收20','2018-12-15 10:02:41'),(100,2,0,1,'测试ws接收21','2018-12-15 10:03:06'),(101,2,0,1,'测试ws接收22','2018-12-15 10:03:45'),(102,2,0,1,'测试ws接收23','2018-12-15 10:06:29'),(103,2,0,1,'测试ws接收24','2018-12-15 10:07:14'),(104,2,0,1,'测试ws接收25','2018-12-15 10:11:15'),(105,2,0,1,'测试ws接收26','2018-12-15 10:11:26'),(106,2,0,1,'测试ws接收27','2018-12-15 10:20:37'),(107,2,0,1,'测试ws接收29','2018-12-15 10:20:51'),(108,2,0,1,'测试ws接收30','2018-12-15 10:24:27'),(109,2,0,1,'测试ws接收31','2018-12-15 10:24:58'),(110,2,0,1,'测试ws接收32','2018-12-15 10:26:28'),(111,2,0,1,'测试ws接收33','2018-12-15 10:26:57'),(112,2,0,1,'测试ws接收34','2018-12-15 10:28:17'),(113,2,0,1,'测试ws接收35','2018-12-15 10:29:04'),(114,2,0,1,'测试ws接收36','2018-12-15 10:29:41'),(115,2,0,1,'测试ws接收37','2018-12-15 10:31:17'),(116,2,0,1,'测试ws接收38','2018-12-15 10:31:37'),(117,2,0,1,'测试ws接收39','2018-12-15 10:32:19'),(118,2,0,1,'测试ws接收40','2018-12-15 10:32:53'),(119,2,0,1,'测试ws接收41','2018-12-15 10:33:47'),(120,2,0,1,'测试ws接收42','2018-12-15 10:34:24'),(121,4,0,1,'测试ws接收','2018-12-15 12:20:50'),(122,4,0,1,'测试ws静态','2018-12-15 12:30:27'),(123,2,0,1,'测试ws接收43','2018-12-15 10:36:41'),(124,2,0,1,'测试ws静态','2018-12-15 12:28:17'),(125,2,0,1,'测试ws静态2','2018-12-15 12:29:24'),(126,2,0,1,'测试ws静态3','2018-12-15 12:29:58'),(127,3,0,1,'测试ws静态','2018-12-15 12:33:15');
/*!40000 ALTER TABLE `history` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-12-18 13:43:13
