/*
 Navicat Premium Data Transfer

 Source Server         : 山大
 Source Server Type    : MariaDB
 Source Server Version : 100323
 Source Host           : sd.tall.wiki:3306
 Source Schema         : yanyuan

 Target Server Type    : MariaDB
 Target Server Version : 100323
 File Encoding         : 65001

 Date: 13/05/2021 15:20:53
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for r_register
-- ----------------------------
DROP TABLE IF EXISTS `r_register`;
CREATE TABLE `r_register`  (
  `register_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `batch_num` int(11) NULL DEFAULT NULL,
  `is_bound` tinyint(1) NULL DEFAULT NULL,
  `created_at` date NULL DEFAULT NULL,
  `updated_at` date NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  PRIMARY KEY (`register_no`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for r_register_no
-- ----------------------------
DROP TABLE IF EXISTS `r_register_no`;
CREATE TABLE `r_register_no`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '注册码生成使用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1004 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for s_admin
-- ----------------------------
DROP TABLE IF EXISTS `s_admin`;
CREATE TABLE `s_admin`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '管理员ID UUID',
  `login_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '登录名 索引',
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '登录密码',
  `role_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色ID',
  `real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '手机号码',
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮箱',
  `is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用 1:禁用',
  `is_fixed` tinyint(1) NULL DEFAULT 0 COMMENT '是否锁定(不可编辑，删除) 0:不锁定  1:锁定',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除  1:正常',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `login_name`(`login_name`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_area
-- ----------------------------
DROP TABLE IF EXISTS `s_area`;
CREATE TABLE `s_area`  (
  `id` int(11) NOT NULL COMMENT '区县ID',
  `city_id` int(11) NULL DEFAULT NULL COMMENT '所属市',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县名称',
  `pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县拼音',
  `short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县简称',
  `zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
  `city_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县编码',
  `longitude` double NULL DEFAULT NULL COMMENT '经度',
  `latitude` double NULL DEFAULT NULL COMMENT '纬度',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_city
-- ----------------------------
DROP TABLE IF EXISTS `s_city`;
CREATE TABLE `s_city`  (
  `id` int(11) NOT NULL,
  `province_id` int(11) NULL DEFAULT NULL COMMENT '所属省',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市名称',
  `pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市拼音',
  `short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市简称',
  `zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
  `city_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市编码',
  `longitude` double NULL DEFAULT NULL COMMENT '经度',
  `latitude` double NULL DEFAULT NULL COMMENT '纬度',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_cities_on_province_id`(`province_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_config
-- ----------------------------
DROP TABLE IF EXISTS `s_config`;
CREATE TABLE `s_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `minValue` int(11) NULL DEFAULT NULL,
  `maxValue` int(255) NULL DEFAULT NULL,
  `grade` int(255) NULL DEFAULT NULL,
  `intro` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_grade
-- ----------------------------
DROP TABLE IF EXISTS `s_grade`;
CREATE TABLE `s_grade`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
  `minValue` decimal(6, 2) NULL DEFAULT NULL,
  `maxValue` decimal(6, 2) NULL DEFAULT NULL,
  `grade` int(6) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_menu
-- ----------------------------
DROP TABLE IF EXISTS `s_menu`;
CREATE TABLE `s_menu`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'UUID 主键',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单链接的Url',
  `parent_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '父菜单ID',
  `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  `is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用 1:禁用',
  `sort` int(4) NULL DEFAULT 0 COMMENT '排序值(越大值越大，顺序越靠前)',
  `type` int(4) NULL DEFAULT 0 COMMENT '菜单类型 0:父菜单，没有链接   1:菜单页面，链接到页面   2:子页面 不再菜单中显示(例如详情页，编辑页)',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除  1:正常',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_province
-- ----------------------------
DROP TABLE IF EXISTS `s_province`;
CREATE TABLE `s_province`  (
  `id` int(11) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '省名称',
  `pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '名称拼音',
  `short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '省简称',
  `zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
  `type` int(11) NULL DEFAULT NULL COMMENT ' 1:直辖市  2:行政省 3:自治区   4:特别行政区',
  `longitude` double NULL DEFAULT NULL COMMENT '经度',
  `latitude` double NULL DEFAULT NULL COMMENT '纬度',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_role
-- ----------------------------
DROP TABLE IF EXISTS `s_role`;
CREATE TABLE `s_role`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  `is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用  1:已禁用',
  `is_fixed` tinyint(1) NULL DEFAULT 0 COMMENT '是否锁定(锁定的话，不可编辑和删除) 0:未锁定  1:锁定',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除  1:正常',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for s_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `s_role_menu`;
CREATE TABLE `s_role_menu`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `menu_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单id',
  `role_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色id',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除  1:正常',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `role_id`(`role_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_train_aid
-- ----------------------------
DROP TABLE IF EXISTS `t_train_aid`;
CREATE TABLE `t_train_aid`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '教具',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
  `user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp,
  `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name_index`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练教具' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_train_content
-- ----------------------------
DROP TABLE IF EXISTS `t_train_content`;
CREATE TABLE `t_train_content`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `aid_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '训练内容',
  `level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '训练难度，数值越大表示难度越高',
  `user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp,
  `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `train_content_aid_index`(`aid_id`) USING BTREE,
  INDEX `train_content_level_index`(`level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 286 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_train_content_detail
-- ----------------------------
DROP TABLE IF EXISTS `t_train_content_detail`;
CREATE TABLE `t_train_content_detail`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '训练内容',
  `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0：训练目标 1：训练元素 2：训练原理 3：训练步骤',
  `sort` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '排序',
  `user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp,
  `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `train_detail_contentId_index`(`content_id`, `type`, `sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 617 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容详情' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_train_img
-- ----------------------------
DROP TABLE IF EXISTS `t_train_img`;
CREATE TABLE `t_train_img`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '访问路径',
  `sort` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
  `user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp,
  `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `train_img_contentid_index`(`content_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 134 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容对应的图' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_train_record
-- ----------------------------
DROP TABLE IF EXISTS `t_train_record`;
CREATE TABLE `t_train_record`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `test_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '测试ID',
  `question_id` int(11) NULL DEFAULT 0 COMMENT '试题ID',
  `user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp,
  `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `train_record_test_index`(`test_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 673 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练计划' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_care
-- ----------------------------
DROP TABLE IF EXISTS `u_care`;
CREATE TABLE `u_care`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `care_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `care_sex` tinyint(1) NULL DEFAULT NULL,
  `care_age` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `job_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `educate_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `care_period` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `care_relation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `zarit_point` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `zarit_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_follow_up
-- ----------------------------
DROP TABLE IF EXISTS `u_follow_up`;
CREATE TABLE `u_follow_up`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `is_test` tinyint(1) NULL DEFAULT NULL,
  `test_at` datetime NULL DEFAULT NULL,
  `mmse_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `moca_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `adl_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `npi_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `total_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `first_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `second_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `third_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `forth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `fifth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `sixth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `sev_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `sev_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_health_record
-- ----------------------------
DROP TABLE IF EXISTS `u_health_record`;
CREATE TABLE `u_health_record`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `mental_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `follow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `care_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `record_at` datetime NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_mental_test
-- ----------------------------
DROP TABLE IF EXISTS `u_mental_test`;
CREATE TABLE `u_mental_test`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `memory_num` decimal(10, 2) NULL DEFAULT NULL,
  `express_num` decimal(10, 2) NULL DEFAULT NULL,
  `view_num` decimal(10, 2) NULL DEFAULT NULL,
  `attention_num` decimal(10, 2) NULL DEFAULT NULL,
  `direction_num` decimal(10, 2) NULL DEFAULT NULL,
  `count_num` decimal(10, 2) NULL DEFAULT NULL,
  `logic_num` decimal(10, 2) NULL DEFAULT NULL,
  `average_num` decimal(10, 2) NULL DEFAULT NULL,
  `from_type` bit(4) NULL DEFAULT NULL,
  `grade_result` int(11) NULL DEFAULT NULL,
  `test_at` datetime NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  `pdf_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_practice
-- ----------------------------
DROP TABLE IF EXISTS `u_practice`;
CREATE TABLE `u_practice`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `mental_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `practice_period` int(11) NULL DEFAULT NULL,
  `first_practice` int(11) NULL DEFAULT NULL,
  `second_practice` int(11) NULL DEFAULT NULL,
  `third_practice` int(11) NULL DEFAULT NULL,
  `forth_practice` int(11) NULL DEFAULT NULL,
  `fifth_practice` int(11) NULL DEFAULT NULL,
  `sixth_practice` int(11) NULL DEFAULT NULL,
  `seventh_practice` int(11) NULL DEFAULT NULL,
  `eighth_practice` int(11) NULL DEFAULT NULL,
  `ninth_practice` int(11) NULL DEFAULT NULL,
  `tenth_practice` int(11) NULL DEFAULT NULL,
  `eleventh_practice` int(11) NULL DEFAULT NULL,
  `start_at` datetime NULL DEFAULT NULL,
  `end_at` datetime NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT NULL,
  `twelfth_practice` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_score
-- ----------------------------
DROP TABLE IF EXISTS `u_score`;
CREATE TABLE `u_score`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `memory_score` int(11) NULL DEFAULT 0 COMMENT '记忆力',
  `express_score` int(11) NULL DEFAULT 0 COMMENT '语言能力',
  `view_score` int(11) NULL DEFAULT 0 COMMENT '视空力',
  `attention_score` int(11) NULL DEFAULT 0 COMMENT '注意力',
  `direction_score` int(11) NULL DEFAULT 0 COMMENT '定向力',
  `count_score` int(11) NULL DEFAULT 0 COMMENT '计算能力',
  `logic_score` int(11) NULL DEFAULT 0 COMMENT '逻辑执行',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for u_user
-- ----------------------------
DROP TABLE IF EXISTS `u_user`;
CREATE TABLE `u_user`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
  `open_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信openId',
  `nick_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信昵称',
  `head_imgurl` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
  `subscribe_time` int(11) NULL DEFAULT NULL COMMENT '用户关注时间，为时间戳',
  `register_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '绑定注册码',
  `user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
  `mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户手机',
  `sex` int(11) NULL DEFAULT NULL COMMENT '用户的性别，值为1时是男性，值为2时是女性，值为0时是未知',
  `clinic_hospital` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊医院',
  `hospital_province_id` int(11) NULL DEFAULT NULL COMMENT '医院所在省ID',
  `hospital_city_id` int(11) NULL DEFAULT NULL COMMENT '医院所在城市ID',
  `hospital_address` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医院详细地址',
  `clinic_office` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊科室',
  `clinic_doctor` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊医生',
  `birth_date` datetime NULL DEFAULT NULL COMMENT '出生年月',
  `height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身高',
  `weight` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '体重',
  `job_title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职业',
  `educate_status` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受教育程度',
  `educate_date` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受教育年限',
  `abode_place` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '长期居住地',
  `appear_time` datetime NULL DEFAULT NULL COMMENT '出现认知障碍时间',
  `diagnose_time` datetime NULL DEFAULT NULL COMMENT '首次诊断痴呆时间',
  `diagnose_result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '诊断',
  `min_blood_pressure` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血压最低值',
  `max_blood_pressure` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最大血压值',
  `blood_fat` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血脂',
  `physical_act` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '体力活动',
  `apoe_gene` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ApoE基因',
  `diseases_record` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '疾病史',
  `relative_diseases_record` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '亲属疾病史',
  `is_insomnic` tinyint(1) NULL DEFAULT NULL COMMENT '是否失眠： 0 不 1 是',
  `insomnic_period` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '每天平均失眠时间',
  `is_smoke` tinyint(4) NULL DEFAULT NULL COMMENT '是否吸烟 0 不 1 吸烟已戒 2 吸烟未戒',
  `quit_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '已戒烟时长',
  `sustain_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '吸烟持续时间',
  `average_num` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '平均每天吸烟数量',
  `is_drink` tinyint(4) NULL DEFAULT NULL COMMENT '是否饮酒 0 不 1 是 已戒 2 是 未戒',
  `abstinence_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '戒酒时长',
  `drink_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '饮酒种类',
  `is_tea` tinyint(4) NULL DEFAULT NULL COMMENT '是否喝茶 0 不 2 是 不喝 3 喝 继续中',
  `quit_tea` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '已不喝茶时长',
  `continue_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶持续时长',
  `tea_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶种类',
  `tea_period` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶频率',
  `is_strong_flavour` tinyint(1) NULL DEFAULT NULL COMMENT '是否口味重 0 不 1 是',
  `is_like_meat` tinyint(1) NULL DEFAULT NULL COMMENT '是否偏爱荤菜 0 不 1 是',
  `is_more_oil` tinyint(1) NULL DEFAULT NULL COMMENT '是否多油 0 不 1 是',
  `msg_at` datetime NULL DEFAULT NULL COMMENT '发送短信时间',
  `created_at` datetime NULL DEFAULT NULL,
  `update_at` datetime NULL DEFAULT NULL,
  `status` tinyint(1) NULL DEFAULT 1,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mobile`(`mobile`) USING BTREE,
  INDEX `_copy_1`(`open_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '基本信息填写' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
