/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50726
 Source Host           : localhost:3306
 Source Schema         : insurance

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

 Date: 22/07/2019 00:14:44
*/


-- ----------------------------
-- Table structure for auth_group
-- ----------------------------
CREATE TABLE `auth_group`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of auth_group
-- ----------------------------
INSERT INTO `auth_group` VALUES (2, '基础数据管理员');

-- ----------------------------
-- Table structure for auth_group_permissions
-- ----------------------------
CREATE TABLE `auth_group_permissions`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `auth_group_permissions_group_id_permission_id_0cd325b0_uniq`(`group_id`, `permission_id`) USING BTREE,
  INDEX `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm`(`permission_id`) USING BTREE,
  CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of auth_group_permissions
-- ----------------------------
INSERT INTO `auth_group_permissions` VALUES (7, 2, 25);
INSERT INTO `auth_group_permissions` VALUES (8, 2, 26);
INSERT INTO `auth_group_permissions` VALUES (9, 2, 27);
INSERT INTO `auth_group_permissions` VALUES (10, 2, 28);
INSERT INTO `auth_group_permissions` VALUES (11, 2, 29);
INSERT INTO `auth_group_permissions` VALUES (12, 2, 30);
INSERT INTO `auth_group_permissions` VALUES (13, 2, 31);
INSERT INTO `auth_group_permissions` VALUES (2, 2, 32);
INSERT INTO `auth_group_permissions` VALUES (3, 2, 33);
INSERT INTO `auth_group_permissions` VALUES (4, 2, 34);
INSERT INTO `auth_group_permissions` VALUES (5, 2, 35);
INSERT INTO `auth_group_permissions` VALUES (6, 2, 36);

-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
CREATE TABLE `auth_permission`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `content_type_id` int(11) NOT NULL,
  `codename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `auth_permission_content_type_id_codename_01ab375a_uniq`(`content_type_id`, `codename`) USING BTREE,
  CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of auth_permission
-- ----------------------------
INSERT INTO `auth_permission` VALUES (1, 'Can add log entry', 1, 'add_logentry');
INSERT INTO `auth_permission` VALUES (2, 'Can change log entry', 1, 'change_logentry');
INSERT INTO `auth_permission` VALUES (3, 'Can delete log entry', 1, 'delete_logentry');
INSERT INTO `auth_permission` VALUES (4, 'Can view log entry', 1, 'view_logentry');
INSERT INTO `auth_permission` VALUES (5, 'Can add permission', 2, 'add_permission');
INSERT INTO `auth_permission` VALUES (6, 'Can change permission', 2, 'change_permission');
INSERT INTO `auth_permission` VALUES (7, 'Can delete permission', 2, 'delete_permission');
INSERT INTO `auth_permission` VALUES (8, 'Can view permission', 2, 'view_permission');
INSERT INTO `auth_permission` VALUES (9, 'Can add group', 3, 'add_group');
INSERT INTO `auth_permission` VALUES (10, 'Can change group', 3, 'change_group');
INSERT INTO `auth_permission` VALUES (11, 'Can delete group', 3, 'delete_group');
INSERT INTO `auth_permission` VALUES (12, 'Can view group', 3, 'view_group');
INSERT INTO `auth_permission` VALUES (13, 'Can add user', 4, 'add_user');
INSERT INTO `auth_permission` VALUES (14, 'Can change user', 4, 'change_user');
INSERT INTO `auth_permission` VALUES (15, 'Can delete user', 4, 'delete_user');
INSERT INTO `auth_permission` VALUES (16, 'Can view user', 4, 'view_user');
INSERT INTO `auth_permission` VALUES (17, 'Can add content type', 5, 'add_contenttype');
INSERT INTO `auth_permission` VALUES (18, 'Can change content type', 5, 'change_contenttype');
INSERT INTO `auth_permission` VALUES (19, 'Can delete content type', 5, 'delete_contenttype');
INSERT INTO `auth_permission` VALUES (20, 'Can view content type', 5, 'view_contenttype');
INSERT INTO `auth_permission` VALUES (21, 'Can add session', 6, 'add_session');
INSERT INTO `auth_permission` VALUES (22, 'Can change session', 6, 'change_session');
INSERT INTO `auth_permission` VALUES (23, 'Can delete session', 6, 'delete_session');
INSERT INTO `auth_permission` VALUES (24, 'Can view session', 6, 'view_session');
INSERT INTO `auth_permission` VALUES (25, 'Can add 灾害类型', 8, 'add_disaster');
INSERT INTO `auth_permission` VALUES (26, 'Can change 灾害类型', 8, 'change_disaster');
INSERT INTO `auth_permission` VALUES (27, 'Can delete 灾害类型', 8, 'delete_disaster');
INSERT INTO `auth_permission` VALUES (28, 'Can view 灾害类型', 8, 'view_disaster');
INSERT INTO `auth_permission` VALUES (29, 'Can add 灾害气象指数', 9, 'add_exponent');
INSERT INTO `auth_permission` VALUES (30, 'Can change 灾害气象指数', 9, 'change_exponent');
INSERT INTO `auth_permission` VALUES (31, 'Can delete 灾害气象指数', 9, 'delete_exponent');
INSERT INTO `auth_permission` VALUES (32, 'Can view 灾害气象指数', 9, 'view_exponent');
INSERT INTO `auth_permission` VALUES (33, 'Can add 农作物信息', 7, 'add_plant');
INSERT INTO `auth_permission` VALUES (34, 'Can change 农作物信息', 7, 'change_plant');
INSERT INTO `auth_permission` VALUES (35, 'Can delete 农作物信息', 7, 'delete_plant');
INSERT INTO `auth_permission` VALUES (36, 'Can view 农作物信息', 7, 'view_plant');
INSERT INTO `auth_permission` VALUES (37, 'Can add 投保农作物', 10, 'add_insure');
INSERT INTO `auth_permission` VALUES (38, 'Can change 投保农作物', 10, 'change_insure');
INSERT INTO `auth_permission` VALUES (39, 'Can delete 投保农作物', 10, 'delete_insure');
INSERT INTO `auth_permission` VALUES (40, 'Can view 投保农作物', 10, 'view_insure');
INSERT INTO `auth_permission` VALUES (41, 'Can add 投保记录', 12, 'add_record');
INSERT INTO `auth_permission` VALUES (42, 'Can change 投保记录', 12, 'change_record');
INSERT INTO `auth_permission` VALUES (43, 'Can delete 投保记录', 12, 'delete_record');
INSERT INTO `auth_permission` VALUES (44, 'Can view 投保记录', 12, 'view_record');
INSERT INTO `auth_permission` VALUES (45, 'Can add 投保用户', 11, 'add_user');
INSERT INTO `auth_permission` VALUES (46, 'Can change 投保用户', 11, 'change_user');
INSERT INTO `auth_permission` VALUES (47, 'Can delete 投保用户', 11, 'delete_user');
INSERT INTO `auth_permission` VALUES (48, 'Can view 投保用户', 11, 'view_user');

-- ----------------------------
-- Table structure for auth_user_groups
-- ----------------------------
CREATE TABLE `auth_user_groups`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `auth_user_groups_user_id_group_id_94350c0c_uniq`(`user_id`, `group_id`) USING BTREE,
  INDEX `auth_user_groups_group_id_97559544_fk_auth_group_id`(`group_id`) USING BTREE,
  CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auth_user_user_permissions
-- ----------------------------
CREATE TABLE `auth_user_user_permissions`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq`(`user_id`, `permission_id`) USING BTREE,
  INDEX `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm`(`permission_id`) USING BTREE,
  CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_area
-- ----------------------------
CREATE TABLE `back_area`  (
  `id` bigint(21) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `min_longitude` float(11, 0) NOT NULL COMMENT '最小经度',
  `max_longitude` float(11, 0) NOT NULL COMMENT '最大经度',
  `min_latitude` float(11, 0) NOT NULL COMMENT '最小纬度',
  `max_latitude` float(11, 0) NOT NULL COMMENT '最大纬度',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_area
-- ----------------------------
INSERT INTO `back_area` VALUES (1, '江苏', 116, 122, 30, 35, '2019-07-12 01:39:56', '2019-07-12 01:39:56', 1);

-- ----------------------------
-- Table structure for back_compensation
-- ----------------------------
CREATE TABLE `back_compensation`  (
  `id` bigint(20) NOT NULL COMMENT '标识符',
  `history_id` bigint(20) NOT NULL COMMENT '地区标识符',
  `disaster_id` bigint(20) NOT NULL COMMENT '灾害标识符',
  `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '赔付信息',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `history_id`(`history_id`) USING BTREE,
  INDEX `disaster_id`(`disaster_id`) USING BTREE,
  CONSTRAINT `back_compensation_ibfk_1` FOREIGN KEY (`history_id`) REFERENCES `back_history` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_compensation_ibfk_2` FOREIGN KEY (`disaster_id`) REFERENCES `back_disaster` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_disaster
-- ----------------------------
CREATE TABLE `back_disaster`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `threshold` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发阈值',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_disaster
-- ----------------------------
INSERT INTO `back_disaster` VALUES (1, '测试灾害类型', '1', '2019-07-03 15:23:07', '2019-07-03 15:23:07', 1);

-- ----------------------------
-- Table structure for back_exponent
-- ----------------------------
CREATE TABLE `back_exponent`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `disaster_id` bigint(20) NOT NULL COMMENT '名称',
  `threshold` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发阈值',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `disaster`(`disaster_id`) USING BTREE,
  CONSTRAINT `back_exponent_ibfk_1` FOREIGN KEY (`disaster_id`) REFERENCES `back_disaster` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_exponent
-- ----------------------------
INSERT INTO `back_exponent` VALUES (2, 1, '1', '2019-07-03 15:28:54', '2019-07-03 15:28:54', 1);

-- ----------------------------
-- Table structure for back_history
-- ----------------------------
CREATE TABLE `back_history`  (
  `id` bigint(20) NOT NULL COMMENT '标识符',
  `area_id` bigint(20) NOT NULL COMMENT '地区标识符',
  `plant_id` bigint(20) NOT NULL COMMENT '农作物标识符',
  `user_id` bigint(20) NOT NULL COMMENT '用户标识符',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `plant_id`(`plant_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `back_history_ibfk_1`(`area_id`) USING BTREE,
  CONSTRAINT `back_history_ibfk_1` FOREIGN KEY (`area_id`) REFERENCES `back_area` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_history_ibfk_2` FOREIGN KEY (`plant_id`) REFERENCES `back_plant` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_history_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `back_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_insure
-- ----------------------------
CREATE TABLE `back_insure`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `plant_id` bigint(20) NOT NULL COMMENT '农作物标识符',
  `state` int(11) NOT NULL COMMENT '投保状态',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `plant_id`(`plant_id`) USING BTREE,
  CONSTRAINT `back_insure_ibfk_1` FOREIGN KEY (`plant_id`) REFERENCES `back_plant` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_insure
-- ----------------------------
INSERT INTO `back_insure` VALUES (1, 1, 1, '2019-07-03 14:33:03', '2019-07-03 14:35:28', 1);

-- ----------------------------
-- Table structure for back_insurement
-- ----------------------------
CREATE TABLE `back_insurement`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `disaster_id` bigint(20) NULL DEFAULT NULL COMMENT '灾害标识符',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `threshold` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '保险指数',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `disaster_id`(`disaster_id`) USING BTREE,
  CONSTRAINT `back_insurement_ibfk_1` FOREIGN KEY (`disaster_id`) REFERENCES `back_disaster` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_permission
-- ----------------------------
CREATE TABLE `back_permission`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `area_id` bigint(20) NOT NULL COMMENT '用户标识符',
  `group_id` int(11) NOT NULL COMMENT '区域标识符',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE,
  INDEX `area_id`(`area_id`) USING BTREE,
  CONSTRAINT `back_permission_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_permission_ibfk_2` FOREIGN KEY (`area_id`) REFERENCES `back_area` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_plant
-- ----------------------------
CREATE TABLE `back_plant`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_plant
-- ----------------------------
INSERT INTO `back_plant` VALUES (1, '测试植物', '2019-07-03 13:17:08', '2019-07-03 13:17:08', 1);
INSERT INTO `back_plant` VALUES (2, '测试植物2', '2019-07-03 15:52:24', '2019-07-03 15:52:24', 1);

-- ----------------------------
-- Table structure for back_radar
-- ----------------------------
CREATE TABLE `back_radar`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `record_time` datetime(0) NULL DEFAULT NULL,
  `value` float NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_record
-- ----------------------------
CREATE TABLE `back_record`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `user_id` bigint(20) NOT NULL COMMENT '用户标识符',
  `plant_id` bigint(20) NOT NULL COMMENT '农作物标识符',
  `area_id` bigint(20) NOT NULL COMMENT '区域标识符',
  `start_time` datetime(0) NOT NULL COMMENT '开始时间',
  `end_time` datetime(0) NOT NULL COMMENT '结束时间',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `plant_id`(`plant_id`) USING BTREE,
  INDEX `area_id`(`area_id`) USING BTREE,
  CONSTRAINT `back_record_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `back_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_record_ibfk_2` FOREIGN KEY (`plant_id`) REFERENCES `back_plant` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `back_record_ibfk_3` FOREIGN KEY (`area_id`) REFERENCES `back_area` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_surface
-- ----------------------------
CREATE TABLE `back_surface`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `record_time` datetime(0) NULL DEFAULT NULL,
  `value` float NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for back_user
-- ----------------------------
CREATE TABLE `back_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识符',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
  `type` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户类型',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '修改时间',
  `status` int(11) NOT NULL COMMENT '激活状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of back_user
-- ----------------------------
INSERT INTO `back_user` VALUES (1, '测试用户', '1', '2019-07-03 15:30:03', '2019-07-03 15:43:58', 1);

-- ----------------------------
-- Table structure for django_admin_log
-- ----------------------------
CREATE TABLE `django_admin_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `action_time` datetime(6) NOT NULL,
  `object_id` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  `object_repr` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `action_flag` smallint(5) UNSIGNED NOT NULL,
  `change_message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `content_type_id` int(11) NULL DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `django_admin_log_content_type_id_c4bce8eb_fk_django_co`(`content_type_id`) USING BTREE,
  INDEX `django_admin_log_user_id_c564eba6_fk_auth_user_id`(`user_id`) USING BTREE,
  CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of django_admin_log
-- ----------------------------
INSERT INTO `django_admin_log` VALUES (1, '2019-07-01 16:14:50.339879', '1', '测试用户组', 1, '[{\"added\": {}}]', 3, 1);
INSERT INTO `django_admin_log` VALUES (2, '2019-07-01 16:15:20.364006', '2', 'test', 1, '[{\"added\": {}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (3, '2019-07-01 16:16:24.932860', '2', 'test', 2, '[{\"changed\": {\"fields\": [\"is_staff\", \"groups\"]}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (4, '2019-07-03 12:44:53.372456', '2', 'test', 3, '', 4, 1);
INSERT INTO `django_admin_log` VALUES (5, '2019-07-03 12:45:00.713134', '1', '测试用户组', 3, '', 3, 1);
INSERT INTO `django_admin_log` VALUES (6, '2019-07-03 13:17:07.593989', '1', 'Plant object (1)', 1, '[{\"added\": {}}]', 7, 1);
INSERT INTO `django_admin_log` VALUES (7, '2019-07-03 14:11:47.902311', '2', '基础数据管理员', 1, '[{\"added\": {}}]', 3, 1);
INSERT INTO `django_admin_log` VALUES (8, '2019-07-03 14:12:38.921894', '3', 'basic_user', 1, '[{\"added\": {}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (9, '2019-07-03 14:12:49.819677', '3', 'basic_user', 2, '[{\"changed\": {\"fields\": [\"is_staff\", \"groups\"]}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (10, '2019-07-03 14:21:11.636001', '3', 'basic_user', 2, '[{\"changed\": {\"fields\": [\"password\"]}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (11, '2019-07-03 14:33:02.611893', '1', 'Insure object (1)', 1, '[{\"added\": {}}]', 10, 1);
INSERT INTO `django_admin_log` VALUES (12, '2019-07-03 14:35:10.700156', '1', 'Insure object (1)', 2, '[{\"changed\": {\"fields\": [\"state\"]}}]', 10, 1);
INSERT INTO `django_admin_log` VALUES (13, '2019-07-03 14:35:27.857298', '1', 'Insure object (1)', 2, '[{\"changed\": {\"fields\": [\"state\"]}}]', 10, 1);
INSERT INTO `django_admin_log` VALUES (14, '2019-07-03 15:23:07.461068', '1', 'Disaster object (1)', 1, '[{\"added\": {}}]', 8, 1);
INSERT INTO `django_admin_log` VALUES (15, '2019-07-03 15:28:54.463806', '2', '测试灾害的气象指数  ', 1, '[{\"added\": {}}]', 9, 1);
INSERT INTO `django_admin_log` VALUES (16, '2019-07-03 15:30:02.991823', '1', '测试用户', 1, '[{\"added\": {}}]', 11, 1);
INSERT INTO `django_admin_log` VALUES (17, '2019-07-03 15:43:57.954890', '1', '测试用户', 2, '[]', 11, 1);
INSERT INTO `django_admin_log` VALUES (18, '2019-07-03 15:52:23.761173', '2', '测试植物2', 1, '[{\"added\": {}}]', 7, 1);
INSERT INTO `django_admin_log` VALUES (19, '2019-07-11 13:58:18.727024', '3', 'basic_user', 3, '', 4, 1);
INSERT INTO `django_admin_log` VALUES (20, '2019-07-11 13:58:42.670128', '1', 'admin', 2, '[{\"changed\": {\"fields\": [\"password\"]}}]', 4, 1);
INSERT INTO `django_admin_log` VALUES (21, '2019-07-12 01:39:56.222254', '1', 'Area object (1)', 1, '[{\"added\": {}}]', 13, 1);

-- ----------------------------
-- Table structure for django_content_type
-- ----------------------------
CREATE TABLE `django_content_type`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `django_content_type_app_label_model_76bd3d3b_uniq`(`app_label`, `model`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of django_content_type
-- ----------------------------
INSERT INTO `django_content_type` VALUES (1, 'admin', 'logentry');
INSERT INTO `django_content_type` VALUES (3, 'auth', 'group');
INSERT INTO `django_content_type` VALUES (2, 'auth', 'permission');
INSERT INTO `django_content_type` VALUES (4, 'auth', 'user');
INSERT INTO `django_content_type` VALUES (13, 'back', 'area');
INSERT INTO `django_content_type` VALUES (8, 'back', 'disaster');
INSERT INTO `django_content_type` VALUES (9, 'back', 'exponent');
INSERT INTO `django_content_type` VALUES (10, 'back', 'insure');
INSERT INTO `django_content_type` VALUES (7, 'back', 'plant');
INSERT INTO `django_content_type` VALUES (12, 'back', 'record');
INSERT INTO `django_content_type` VALUES (11, 'back', 'user');
INSERT INTO `django_content_type` VALUES (5, 'contenttypes', 'contenttype');
INSERT INTO `django_content_type` VALUES (6, 'sessions', 'session');

-- ----------------------------
-- Table structure for django_migrations
-- ----------------------------
CREATE TABLE `django_migrations`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `applied` datetime(6) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of django_migrations
-- ----------------------------
INSERT INTO `django_migrations` VALUES (1, 'contenttypes', '0001_initial', '2019-07-01 13:04:30.620652');
INSERT INTO `django_migrations` VALUES (2, 'auth', '0001_initial', '2019-07-01 13:04:30.717394');
INSERT INTO `django_migrations` VALUES (3, 'admin', '0001_initial', '2019-07-01 13:04:30.978083');
INSERT INTO `django_migrations` VALUES (4, 'admin', '0002_logentry_remove_auto_add', '2019-07-01 13:04:31.039896');
INSERT INTO `django_migrations` VALUES (5, 'admin', '0003_logentry_add_action_flag_choices', '2019-07-01 13:04:31.045903');
INSERT INTO `django_migrations` VALUES (6, 'contenttypes', '0002_remove_content_type_name', '2019-07-01 13:04:31.093771');
INSERT INTO `django_migrations` VALUES (7, 'auth', '0002_alter_permission_name_max_length', '2019-07-01 13:04:31.121677');
INSERT INTO `django_migrations` VALUES (8, 'auth', '0003_alter_user_email_max_length', '2019-07-01 13:04:31.134643');
INSERT INTO `django_migrations` VALUES (9, 'auth', '0004_alter_user_username_opts', '2019-07-01 13:04:31.140626');
INSERT INTO `django_migrations` VALUES (10, 'auth', '0005_alter_user_last_login_null', '2019-07-01 13:04:31.165583');
INSERT INTO `django_migrations` VALUES (11, 'auth', '0006_require_contenttypes_0002', '2019-07-01 13:04:31.167579');
INSERT INTO `django_migrations` VALUES (12, 'auth', '0007_alter_validators_add_error_messages', '2019-07-01 13:04:31.173539');
INSERT INTO `django_migrations` VALUES (13, 'auth', '0008_alter_user_username_max_length', '2019-07-01 13:04:31.201486');
INSERT INTO `django_migrations` VALUES (14, 'auth', '0009_alter_user_last_name_max_length', '2019-07-01 13:04:31.230422');
INSERT INTO `django_migrations` VALUES (15, 'auth', '0010_alter_group_name_max_length', '2019-07-01 13:04:31.243374');
INSERT INTO `django_migrations` VALUES (16, 'auth', '0011_update_proxy_permissions', '2019-07-01 13:04:31.248339');
INSERT INTO `django_migrations` VALUES (17, 'sessions', '0001_initial', '2019-07-01 13:04:31.263298');
INSERT INTO `django_migrations` VALUES (18, 'back', '0001_initial', '2019-07-03 14:11:11.486378');
INSERT INTO `django_migrations` VALUES (19, 'back', '0002_auto_20190703_2348', '2019-07-03 15:48:36.984519');

