/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50644
 Source Host           : localhost:3306
 Source Schema         : health

 Target Server Type    : MySQL
 Target Server Version : 50644
 File Encoding         : 65001

 Date: 03/05/2020 15:46:09
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_body_info
-- ----------------------------
DROP TABLE IF EXISTS `t_body_info`;
CREATE TABLE `t_body_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `creator` int(11) NULL DEFAULT NULL COMMENT '创建id',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updater` int(11) NULL DEFAULT NULL COMMENT '修改id',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `low_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '舒张压',
  `high_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '收缩压',
  `heart_rate` int(10) NULL DEFAULT NULL COMMENT '心率',
  `temperature` double(10, 2) NULL DEFAULT NULL COMMENT '体温',
  `appetite` int(11) NULL DEFAULT NULL COMMENT '食欲',
  `weight` double(10, 2) NULL DEFAULT NULL COMMENT '体重',
  `number_of_step` bigint(20) NULL DEFAULT NULL COMMENT '步数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '身体信息表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for t_health_config
-- ----------------------------
DROP TABLE IF EXISTS `t_health_config`;
CREATE TABLE `t_health_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `creator` int(11) NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updater` int(11) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `min_low_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '最小低血压',
  `max_low_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '最高低血压',
  `min_high_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '最小高血压',
  `max_high_blood_pressure` int(10) NULL DEFAULT NULL COMMENT '最大高血压',
  `min_heart_rate` int(10) NULL DEFAULT NULL COMMENT '最小心率',
  `max_heart_rate` int(10) NULL DEFAULT NULL COMMENT '最大心率',
  `min_temperature` double(10, 2) NULL DEFAULT NULL COMMENT '最低体温',
  `max_temperature` double(10, 2) NULL DEFAULT NULL COMMENT '最高体温',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '健康信息配置表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `creator` int(11) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updater` int(11) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `nick_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '用户昵称',
  `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '登录账户',
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '登录密码',
  `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮箱',
  `head_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '头像',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_name`(`user_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '用户表' ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
