text: # ************************************************************
  # Sequel Pro SQL dump
  # Version 4541
  #
  # http://www.sequelpro.com/
  # https://github.com/sequelpro/sequelpro
  #
  # Host: 127.0.0.1 (MySQL 5.7.21)
  # Database: dtm
  # Generation Time: 2018-02-27 03:42:47 +0000
  # ************************************************************
  
  
  /*!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 */;
  /*!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 */;
  
  
  # Dump of table group
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `group`;
  
  CREATE TABLE `group` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID',
    `name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '组名',
    `is_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0',
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `INDEX_USER_ID` (`user_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='任务组';
  
  
  
  # Dump of table task
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `task`;
  
  CREATE TABLE `task` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `group_id` bigint(20) unsigned NOT NULL COMMENT '组ID',
    `detail` varchar(1000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '任务详情',
    `begin_at` datetime DEFAULT NULL COMMENT '任务开始时间',
    `end_at` datetime DEFAULT NULL COMMENT '任务结束时间',
    `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '任务状态 0未开始1进行中2延期...10已完成',
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `INDEX_GROUP_ID_STATUS` (`group_id`,`status`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='任务详情';
  
  
  
  # Dump of table user
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `user`;
  
  CREATE TABLE `user` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `login` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '登录名',
    `password` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '密码',
    `nickname` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称',
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `UNIQUE_LOGIN` (`login`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  
  
  # Dump of table user_oauth
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `user_oauth`;
  
  CREATE TABLE `user_oauth` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `openid` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'OPENID',
    `user_id` bigint(20) unsigned DEFAULT NULL COMMENT '用户ID',
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `UNIQUE_OPENID` (`openid`),
    KEY `INDEX_USER_ID` (`user_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  
  
  
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
  