UPDATE `sys_job` SET `cron_expression` = '0/1 * * * * ?'  WHERE `job_id` = 4 AND `job_name` = '计算场景' AND `job_group` = 'DEFAULT';


-- ----------------------------
-- Table structure for t_fusion_model
-- ----------------------------
Create Table If Not Exists `t_fusion_model`  (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`fusion_id` int NULL DEFAULT NULL,
`model_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`model_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三维模型标题',
`transform` json NULL COMMENT '位置,比例等属性',
`opacity` float NULL DEFAULT 100 COMMENT '透明度',
`bottom` float NULL DEFAULT 0,
`hide` int NULL DEFAULT 0 COMMENT '是否隐藏0否，1是',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
`deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
`delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_model
-- ----------------------------
Create Table If Not Exists `t_model`  (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`model_date_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三维模型数据类型',
`model_size` bigint NULL DEFAULT NULL COMMENT '大小',
`model_obj_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`model_glb_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_status` int NULL DEFAULT 0 COMMENT '0初始化，创建中，1创建成功',
`type` int NULL DEFAULT 3 COMMENT '0看看，1看见，2深时，3用户上传三维模型',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
`deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
`delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模型类型\'glb\'|\'pointcloud\',类型 点云还是模型,',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
ALTER TABLE `t_model` change model_glb_url model_url varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL ;

-- ----------------------------
-- Table structure for t_scene_tag
-- ----------------------------
Create Table If Not Exists `t_scene_tag`  (
 `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
 `tag_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
 `tag_describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
 `leave_behind` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '遗留部位',
 `get_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提取方法',
 `get_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提取人',
 `place_num` int NULL DEFAULT NULL,
 `meta` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标注图片集',
 `hot_icon_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '热点iconurl',
 `hot_icon_id` int NULL DEFAULT NULL COMMENT '热点iconid',
 `fusion_id` bigint NULL DEFAULT NULL COMMENT '融合id',
 `sort` int NULL DEFAULT 1,
 `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
 `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
 `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
 `deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
 `delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
 `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
 `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_scene_tag_point
-- ----------------------------
Create Table If Not Exists `t_scene_tag_point`  (
   `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
   `tag_point_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '位置名称',
   `tag_point` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置json',
   `tag_id` int NULL DEFAULT NULL COMMENT '标注id',
   `model_id` int NULL DEFAULT NULL,
   `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
   `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
   `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
   `deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
   `delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
   `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
   `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
   `sort` int NULL DEFAULT 1,
   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_scene_fusion
-- ----------------------------
Create Table If Not Exists `t_scene_fusion`  (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`scene_id` int NULL DEFAULT NULL,
`fusion_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
`deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
`delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_fusion_guide_path
-- ----------------------------
Create Table If Not Exists `t_fusion_guide_path`  (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`guide_id` int NULL DEFAULT NULL COMMENT '导览id',
`cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频地址',
`target` json NULL COMMENT '位置json',
`position` json NULL COMMENT '位置',
`time`  double(10, 2) DEFAULT NULL COMMENT '持续时间 秒',
`speed` double(10, 2) NULL DEFAULT NULL COMMENT '速度 m/s',
`sort` int NULL DEFAULT 1 COMMENT '排序',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
`deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
`delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_fusion_guide
-- ----------------------------
Create Table If Not Exists `t_fusion_guide`  (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`fusion_id` int NULL DEFAULT NULL COMMENT '融合场景id',
`cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`sort` int NULL DEFAULT 1 COMMENT '排序',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
`deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
`delete_flag` datetime NULL DEFAULT NULL COMMENT '逻辑删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;


Create Table If Not Exists `t_scene_upload`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '文件上传资源记录表',
  `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
  `file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传文件路径',
  `biz_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务类型',
  `upload_user` bigint NULL DEFAULT NULL COMMENT '上传用户id',
  `rec_status` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'A',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_plus_ext
-- ----------------------------
Create Table If Not Exists `t_scene_plus_ext`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `plus_id` bigint NOT NULL COMMENT 't_scene_plus主键',
  `data_source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景数据目录',
  `web_site` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景链接',
  `thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图链接',
  `scene_scheme` tinyint NULL DEFAULT NULL COMMENT '方案：1-双目，2-转台，3-六目,4-八目,10-获取4k图，11-获取2k，12-获取1k',
  `space` bigint NULL DEFAULT NULL COMMENT '使用用量',
  `ecs` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'aliyun' COMMENT '云服务器类型',
  `shoot_count` int UNSIGNED NULL DEFAULT NULL COMMENT '点位数量',
  `view_count` int NULL DEFAULT NULL COMMENT '浏览次数',
  `gps` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'gps定位',
  `algorithm` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'slam' COMMENT '算法类型(slam、sfm)',
  `firmware_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '固件版本',
  `build_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '算法类型（V2,V3）',
  `scene_resolution` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分辨率（2k,4k）',
  `scene_from` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景来源，lite：双目lite相机，pro：八目相机，minion：双面转台相机，laser：激光相机，virtual：虚拟场景，sketch：图片建模场景',
  `scene_kind` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '切图方式（tiles：瓦片图，face：切片图，pan：全景图 ，local：本地切片，cube：立体图）',
  `videos` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '点位视频',
  `compute_time` bigint NULL DEFAULT 0 COMMENT '计算耗时',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A' COMMENT '0-有效，1-删除, 2-禁用',
  `yun_file_bucket` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '4dkankan',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_plusId_dataSource`(`plus_id`, `data_source`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_plus
-- ----------------------------
Create Table If Not Exists `t_scene_plus`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '场景码',
  `user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
  `camera_id` bigint NULL DEFAULT NULL COMMENT '相机id',
  `phone_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景名称',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '场景描述',
  `scene_status` tinyint NOT NULL DEFAULT 0 COMMENT '场景状态：0-未建好，1--已建好，-1-计算出错，-2--不在官网显示',
  `scene_source` int NULL DEFAULT NULL COMMENT '场景来源：相机拍摄10以内表示，1表示八目，2双目，3转台，4 激光  其他来源10以上，11：一键换装，12：123看房，13文通虚拟场景',
  `pay_status` tinyint NULL DEFAULT 0 COMMENT '支付状态：0表示未付款，1表示付款了，-1表示欠费，-2表示容量不足',
  `scene_type` int NULL DEFAULT NULL COMMENT '场景类型  0-其他，1-文博，2-地产，3-电商，4-餐饮，5-家居,99-一件换装虚拟房源',
  `recommend` tinyint NOT NULL DEFAULT 0 COMMENT '是否推荐：0-否，1-是',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A' COMMENT '0-有效，1-删除, 2-禁用',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_num`(`num`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '场景主表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_edit_info_ext
-- ----------------------------
Create Table If Not Exists `t_scene_edit_info_ext`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `scene_pro_id` bigint NULL DEFAULT NULL,
  `scene_plus_id` bigint NULL DEFAULT NULL,
  `edit_info_id` bigint NULL DEFAULT NULL,
  `floor_plan_angle` float NULL DEFAULT 0 COMMENT '户型角度',
  `floor_plan_compass` float NULL DEFAULT 0 COMMENT '指南针角度',
  `vr_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '大场景序号(随心装场景码)  原pro_edit表中的字段',
  `tours` tinyint NULL DEFAULT 0 COMMENT '是否有保存导览（0-否，1-是）',
  `mosaics` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '马赛克数据',
  `mosaic` tinyint NOT NULL DEFAULT 0 COMMENT '是否有马赛克',
  `water_mark` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '水印文件名',
  `links` tinyint NOT NULL DEFAULT 0 COMMENT '是否有场景关联(0-否，1-是)',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A' COMMENT '0-有效，1-删除, 2-禁用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_edit_info
-- ----------------------------
Create Table If Not Exists `t_scene_edit_info`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `scene_pro_id` bigint NULL DEFAULT NULL,
  `scene_plus_id` bigint NULL DEFAULT NULL,
  `floor_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地面logo名称',
  `floor_logo_size` int NULL DEFAULT NULL COMMENT '地面logo大小',
  `floor_logo_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地面logo文件名称',
  `music` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '背景音乐名称',
  `music_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '背景音乐文件名称',
  `scene_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '浏览密码',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景标题',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '场景描述',
  `floor_plan_user` tinyint NULL DEFAULT 0 COMMENT '用户是否上传户型图（0-否，1-是）',
  `tags` tinyint NULL DEFAULT 0 COMMENT '是否有热点数据（0-否，1-是）',
  `version` int NOT NULL DEFAULT 1 COMMENT '版本',
  `img_version` int NOT NULL DEFAULT 0 COMMENT '图片版本',
  `link_version` int NOT NULL DEFAULT 0 COMMENT '场景关联版本',
  `is_upload_obj` tinyint NULL DEFAULT 0 COMMENT '是否上传模型',
  `floor_edit_ver` int NULL DEFAULT 0 COMMENT '重新建模的版本',
  `floor_publish_ver` int NULL DEFAULT 0 COMMENT '正式发布重新建模的版本',
  `box_videos` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '空间视频数据',
  `box_photos` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '空间贴图数据',
  `build_video_status` tinyint NOT NULL DEFAULT 0 COMMENT '是否需要处理球幕视频',
  `entry` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '初始点信息',
  `loading_logo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '加载logo名',
  `loading_logo_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '加载logo文件名',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A' COMMENT '0-有效，1-删除, 2-禁用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_edit_controls
-- ----------------------------
Create Table If Not Exists `t_scene_edit_controls`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `edit_info_id` bigint NOT NULL COMMENT 't_scene_edit_info表id',
  `show_map` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示小地图（0-不展示，1-展示）',
  `show_lock` tinyint NOT NULL DEFAULT 0 COMMENT '是否需要密码（0-不需要，1-需要）',
  `show_title` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示标题（0-不需要，1-需要）',
  `show_panorama` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示漫游按钮（0-不需要，1-需要）',
  `show_dollhouse` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示3D按钮（0-不需要，1-需要）',
  `show_floorplan` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示2D按钮（0-不需要，1-需要）',
  `show_VR` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示VR（0-不需要，1-需要）',
  `show_tour` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示自动导览（0-不需要，1-需要）',
  `show_rule` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示测量线（0-不需要，1-需要）',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A' COMMENT '0-有效，1-删除, 2-禁用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_user_increment
-- ----------------------------
Create Table If Not Exists `t_user_increment`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `key_word` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权益包标识',
  `user_id` bigint NULL DEFAULT NULL COMMENT '用户表t_user的id',
  `camera_id` bigint NULL DEFAULT NULL COMMENT '相机主表t_camera的id',
  `increment_type_id` int NULL DEFAULT NULL COMMENT '会员权益类型Id',
  `increment_end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `is_expired` int NULL DEFAULT 0 COMMENT '是否过期（1过期，0未过期）',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录的状态，A: 生效，I: 禁用',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `order_sn` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '扩容订单集合',
  `increment_start_time` datetime NULL DEFAULT NULL COMMENT '生效时间',
  `download_num` int NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户增值权益表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
Create Table If Not Exists `t_user`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `head` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像对应的链接地址',
  `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
  `register_time` datetime NULL DEFAULT NULL COMMENT '注册时间',
  `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
  `nick_name` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '昵称',
  `status` tinyint NULL DEFAULT 1 COMMENT '0表示禁言（bbs）',
  `is_notice` tinyint NULL DEFAULT 1 COMMENT '0表示拒绝通知，1表示接受通知',
  `organization_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称',
  `main_page` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主页链接',
  `country` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '86' COMMENT '所在国家，默认是86',
  `province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所在省份',
  `city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所在城市',
  `download_num_total` int NULL DEFAULT 0 COMMENT '可下载场景总数',
  `download_num` int NULL DEFAULT 0 COMMENT '已下载场景总数',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录的状态，A: 生效，I: 禁用',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_name`(`user_name`) USING BTREE,
  INDEX `nick_name`(`nick_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for t_scene_resource_cooperation
-- ----------------------------
Create Table If Not Exists `t_scene_resource_cooperation`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `scene_resource_id` bigint NULL DEFAULT NULL COMMENT '场景资源id',
  `scene_cooperation_id` bigint NULL DEFAULT NULL COMMENT '协作用户的id',
  `create_time` datetime NULL DEFAULT NULL,
  `update_time` datetime NULL DEFAULT NULL,
  `rec_status` varchar(2) 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 COMMENT = '场景资源和协作用户关联表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for t_scene_resource
-- ----------------------------
Create Table If Not Exists `t_scene_resource`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限名称',
  `en_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '英文名',
  `key_word` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限key',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限图标',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源描述',
  `version` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版本(v3,v4)',
  `create_time` datetime NULL DEFAULT NULL,
  `update_time` datetime NULL DEFAULT NULL,
  `rec_status` varchar(2) 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 COMMENT = '场景资源表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for t_scene_data_download
-- ----------------------------
Create Table If Not Exists `t_scene_data_download`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `scene_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
  `file_md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件md5',
  `download_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件下载地址',
  `create_time` datetime NULL DEFAULT NULL,
  `update_time` datetime NULL DEFAULT NULL,
  `rec_status` varchar(2) 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 COMMENT = '安居客场景数据下载' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for t_scene_cooperation
-- ----------------------------
Create Table If Not Exists `t_scene_cooperation`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `scene_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '场景码',
  `user_id` bigint NULL DEFAULT NULL COMMENT '协作的用户id',
  `create_time` datetime NULL DEFAULT NULL,
  `update_time` datetime NULL DEFAULT NULL,
  `rec_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'A',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

SET FOREIGN_KEY_CHECKS = 1;


ALTER TABLE `t_scene` MODIFY COLUMN `build_obj_status` int NULL DEFAULT 0 COMMENT '生成OBJ状态,0，未生成 1完成，2计算中' AFTER `obj_url`;






ALTER TABLE `t_scene` MODIFY COLUMN `build_obj_status` int NULL DEFAULT 0 COMMENT '生成OBJ状态,0，未生成 1完成，2计算中';

ALTER TABLE `t_scene` ADD COLUMN `is_copy` int NULL DEFAULT 0 COMMENT '是否复制，默认否' ;

ALTER TABLE `t_scene` ADD COLUMN `copy_time` datetime NULL DEFAULT NULL COMMENT '复制时间' ;

ALTER TABLE `t_scene` ADD COLUMN `scene_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景版本' AFTER `copy_time`;

ALTER TABLE `t_scene` ADD COLUMN `offline_ver` int NULL DEFAULT NULL COMMENT '离线包版本，和重算次数对比' ;

ALTER TABLE `t_scene` ADD COLUMN `offline_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '离线包地址' ;

ALTER TABLE `t_scene` ADD COLUMN `offline_status` int NULL DEFAULT 1 COMMENT '离线包状态是否需要重新生成 1 不需要 2需要' ;

ALTER TABLE `t_scene_plus_ext` ADD COLUMN `model_kind` VARCHAR(20) DEFAULT 'dam' NOT NULL COMMENT '算法生成模型类型（dam,3dtiles）';
  
  
Create Table If Not Exists  `t_scene_asyn_oper_log`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `num` varchar(50) NOT NULL COMMENT '场景码',
  `oper_type` varchar(50) NULL COMMENT '操作类型（upload-上传,download-下载）',
  `module` varchar(50) NULL COMMENT '模块名称',
  `func` varchar(50) NULL COMMENT '功能',
  `version` int NULL COMMENT '版本号',
  `state` int NOT NULL DEFAULT 0 COMMENT '状态(0-处理中，1-处理完成，2-处理失败)',
  `url` varchar(255) NULL COMMENT '下载链接',
  `pop` int NOT NULL DEFAULT 1 COMMENT '是否需要弹窗（0-否，1-是）',
  `ext_data` text NULL COMMENT '扩展信息',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `rec_status` varchar(5) NOT NULL DEFAULT 'A' COMMENT '状态（A-有效，I-无效）',
  PRIMARY KEY (`id`),
  INDEX `IDX_NUM`(`num`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '场景异步操作记录表';

ALTER TABLE `t_scene_plus`  ADD COLUMN `house_type` tinyint NOT NULL DEFAULT 0 COMMENT '是否有housetype文件（0-否，1-是）' ;


Create Table If Not Exists `t_scene_download_log` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `scene_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '场景码',
  `scene_version` int DEFAULT NULL COMMENT '场景版本',
  `download_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '场景打包之后的连接',
  `status` int DEFAULT '0' COMMENT '0下载中，1下载成功，2下载失败',
  `sys_version` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'v3' COMMENT '下载版本v3,v4',
  `rec_status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'A',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1229 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;


ALTER TABLE `t_scene_plus_ext`  ADD COLUMN `algorithm_time` timestamp NULL DEFAULT NULL COMMENT '算法计算完成时间';
  

  
ALTER TABLE `t_scene_file_build`   ADD COLUMN  `build_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT 'buildScene';


  
Create Table If Not Exists`t_scene_asyn_oper_log`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `num` varchar(50) NOT NULL COMMENT '场景码',
  `oper_type` varchar(50) NULL COMMENT '操作类型（upload-上传,download-下载）',
  `module` varchar(50) NULL COMMENT '模块名称',
  `func` varchar(50) NULL COMMENT '功能',
  `version` int NULL COMMENT '版本号',
  `state` int NOT NULL DEFAULT 0 COMMENT '状态(0-处理中，1-处理完成，2-处理失败)',
  `url` varchar(255) NULL COMMENT '下载链接',
  `pop` int NOT NULL DEFAULT 1 COMMENT '是否需要弹窗（0-否，1-是）',
  `ext_data` text NULL COMMENT '扩展信息',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `rec_status` varchar(5) NOT NULL DEFAULT 'A' COMMENT '状态（A-有效，I-无效）',
  PRIMARY KEY (`id`),
  INDEX `IDX_NUM`(`num`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '场景异步操作记录表';

ALTER TABLE `t_scene_edit_info_ext`   
  ADD COLUMN `filters` TINYINT(2) DEFAULT 0 NOT NULL COMMENT '是否有滤镜（0-否，1-是）' AFTER `links`;

ALTER TABLE `t_scene_edit_info_ext`   
  ADD COLUMN `roi_filter` TEXT NULL COMMENT '风格滤镜数据' AFTER `filters`;

ALTER TABLE `t_scene_edit_info_ext`   
  ADD COLUMN `surveillances` TINYINT(2) DEFAULT 0 NOT NULL COMMENT '是否有监控摄像头（0-否，1-是）' AFTER `roi_filter`;
  
Create Table If Not Exists `t_surveillance` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `num` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '场景码',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '监控名称',
  `sid` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '监控唯一标识',
  `pano_id` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ponoId',
  `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '摄像头设置信息',
  `play_url` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '播放地址',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `rec_status` char(1) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'A',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='监控推拉流信息';


Create Table If Not Exists`t_download_tour_video` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `num` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '场景码',
  `state` tinyint NOT NULL DEFAULT '0' COMMENT '视频转换状态（0-等待中，1-成功，2-失败）',
  `reason` text COLLATE utf8mb4_general_ci COMMENT '转换失败原因',
  `file_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名称',
  `local_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '本地临时文件地址',
  `download_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '导览视频目录地址',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `rec_status` char(1) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'A' COMMENT 'A-有效，I-无效',
  PRIMARY KEY (`id`),
  KEY `IDX_NUM` (`num`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='导览视频转换记录表';


ALTER TABLE `t_scene_edit_info`   
  ADD COLUMN `box_models` TEXT NULL COMMENT '空间模型数据' AFTER `box_photos`;
  
ALTER TABLE `t_scene_edit_info`   
  ADD COLUMN `floor_plan_upload` TEXT NULL COMMENT '用户上传自定义平面图数据' AFTER `loading_logo_file`;
  
ALTER TABLE `t_scene_edit_info_ext`   
ADD COLUMN `share_logo_img` VARCHAR(255) NULL COMMENT '二维码logo路径（oss相对路径）' AFTER `surveillances`;

ALTER TABLE `t_surveillance`   
  ADD  UNIQUE INDEX `IDX_NUM_SID` (`num`, `sid`);


ALTER TABLE `t_scene` MODIFY COLUMN `status` int NULL DEFAULT 0 COMMENT '状态, -1:场景被删；0:计算中；1:计算失败；2:计算成功；3：封存（目前未使用此状态)；4：重算中' AFTER `path`;

ALTER TABLE `t_scene` ADD COLUMN `scene_source` int NULL DEFAULT 4 COMMENT '场景来源：相机拍摄10以内表示，1表示八目，2双目，3转台，4 激光 5深光  其他来源10以上，11：一键换装，12：123看房，13文通虚拟场景' AFTER `offline_status`;

ALTER TABLE `t_scene` ADD COLUMN `algorithm_time` datetime NULL COMMENT '计算完成时间' AFTER `scene_source`;

ALTER TABLE `t_scene` ADD COLUMN `location` int NULL DEFAULT 4 COMMENT '判断是否为slam场景,深光和深时 以前的场景都是4' AFTER `algorithm_time`;


 ALTER TABLE `t_scene` ADD COLUMN `mapping` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'profile' COMMENT '映射路径';
 ALTER TABLE `t_scene` ADD COLUMN `web_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '本地资源路径';



ALTER TABLE  `t_proj4` ADD COLUMN `def` int NULL DEFAULT NULL COMMENT '是否默认 true flase' AFTER `name`;

ALTER TABLE  `t_proj4` ADD COLUMN `gfw` int NULL DEFAULT NULL COMMENT 'true 国内，flase国外。' AFTER `def`;

INSERT INTO  `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (68, 'Pseudo-Mercator', 1, 0, NULL, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs', '3857', 2, NULL, NULL, NULL, 0, NULL, NULL);

UPDATE t_proj4 set `def` = 0, `gfw` = 1;

UPDATE `t_proj4` SET `def` = 1, `gfw` = 1  WHERE `id` = 65;

UPDATE `t_proj4` SET `def` = 1, `gfw` = 0  WHERE `id` = 68;



ALTER TABLE  `t_camera` ADD COLUMN `type` int NULL DEFAULT 10 COMMENT '相机类型，0表示双目，1四维看看pro，2 四维看看lite，3 双目转台，10 激光转台' AFTER `sn_code`;

ALTER TABLE  `t_camera` ADD COLUMN `plaintext` text CHARACTER SET utf8mb3 COLLATE utf8_general_ci COMMENT '注册码' AFTER `type`;



 

Create Table If Not Exists `t_path` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` int DEFAULT NULL COMMENT '坐标类型 1，原始资源 2，计算资源',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  `create_by` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `dir` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '资源路径本地',
  `deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
  `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
  `mapping` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '映射路径',
  `status` int DEFAULT NULL COMMENT '停用启用 01 ',
  `enable` int DEFAULT NULL COMMENT '展示状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='路径主表';

Create Table If Not Exists `t_plaintext` (
  `id` int NOT NULL AUTO_INCREMENT,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  `create_by` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `text` text CHARACTER SET utf8mb3 COLLATE utf8_general_ci COMMENT '注册码',
  `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='注册码主表';


INSERT INTO `t_laser_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`) VALUES (15, '全景图', 0, 0, 'panorama', NULL, 'F', '0', '0', NULL, 'pic_s', '', NULL, '', NULL, '', '0');

INSERT INTO `t_laser_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`) VALUES (16, '点云', 0, 0, 'cloudPoint', NULL, 'F', '0', '0', NULL, 'dot_n', '', NULL, '', NULL, '', '0');

INSERT INTO `t_laser_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`) VALUES (17, '模型', 0, 0, 'model', NULL, 'F', '0', '0', NULL, 'jdot_n', '', NULL, '', NULL, '', '0');


ALTER TABLE `t_scene_edit_controls` 
ADD COLUMN `show_scale` tinyint NOT NULL DEFAULT 0 COMMENT '是否展示标尺（0-不需要，1-需要）' AFTER `show_rule`,
ADD COLUMN `show_share` tinyint NOT NULL DEFAULT 1 COMMENT '是否展示分享场景（0-不需要，1-需要）' AFTER `show_scale`,
ADD COLUMN `show_tagshare` tinyint NOT NULL DEFAULT 0 COMMENT '是否展示分享热点（0-不需要，1-需要）' AFTER `show_share`,
ADD COLUMN `show_capture` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示合照开关（0-不需要，1-需要）' AFTER `show_tagshare`;


ALTER TABLE `t_scene_edit_info_ext` ADD COLUMN `sns_info` TEXT NULL   COMMENT '分享配置' AFTER `share_logo_img`;

ALTER TABLE `t_scene_edit_info_ext` ADD COLUMN `billboards` TINYINT(2) DEFAULT 0  NOT NULL   COMMENT '是否有指示牌（0-否，1-是）' AFTER `share_logo_img`;

ALTER TABLE `t_scene_edit_controls`   
  ADD COLUMN `show_tag_title` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示多媒体标签标题（0-否，1-是）' AFTER `show_capture`,
  ADD COLUMN `show_billboard_title` TINYINT DEFAULT 1  NOT NULL   COMMENT '是否显示指示牌标签标题（0-否，1-是）' AFTER `show_tag_title`,
  ADD COLUMN `show_camera_title` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示视频监控标签标题（0-否，1-是）' AFTER `show_billboard_title`,
  ADD COLUMN `show_link_title` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示场景关联标签标题（0-否，1-是）' AFTER `show_camera_title`;

ALTER TABLE  `t_scene_plus_ext` MODIFY COLUMN `yun_file_bucket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' AFTER `rec_status`;

UPDATE t_scene_plus_ext set yun_file_bucket =null  WHERE yun_file_bucket='4dkankan';

ALTER TABLE `t_scene` MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标题';
  
UPDATE t_scene set algorithm_time=create_time WHERE algorithm_time is null;

UPDATE t_scene_plus p, t_scene_plus_ext e SET e.`algorithm_time` = p.`create_time` WHERE p.id = e.plus_id and e.`algorithm_time` is null;

ALTER TABLE  `t_scene_edit_info`   
  CHANGE `floor_logo` `floor_logo` VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '0'  NULL   COMMENT '地面logo名称';

ALTER TABLE `t_camera` ADD COLUMN  `enable` int DEFAULT '1' COMMENT '展示状态';

UPDATE t_scene_file_build b JOIN t_scene a  ON a.scene_code=b.scene_num SET B.delete_flag = CURDATE() WHERE a.delete_flag IS NOT NULL;


Create Table If Not Exists `t_camera_cooperation`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sn_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '相机码',
  `cooperation_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '协作人账户',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
  `deleted` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '0' COMMENT '逻辑未删除值0，逻辑已删除值1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '相机协作表' ROW_FORMAT = DYNAMIC;


ALTER TABLE `t_scene` ADD COLUMN `shoot_count` int NULL DEFAULT 0 COMMENT '拍摄点位数量' AFTER `location`;

ALTER TABLE `t_scene` MODIFY COLUMN `algorithm_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '计算完成时间' AFTER `scene_source`;

INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (69, 'ETRS89 / UTM zone 32N', 0, 0, NULL, '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', '25832', 2, NULL, NULL, NULL, 0, NULL, NULL);


ALTER TABLE `t_scene_tag` MODIFY COLUMN `tag_describe` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;

ALTER TABLE `t_model` MODIFY COLUMN `model_url` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;

INSERT INTO `sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`, `delete_flag`) VALUES (5, '场景下载', 'DEFAULT', 'OfflineSceneTask.build', '0/1 * * * * ?', '3', '1', '0', 'admin', '2021-09-28 14:43:03', 'admin', '2021-09-29 12:16:43', '', '0', NULL);

INSERT INTO `sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`, `delete_flag`) VALUES (6, '添加数据集', 'DEFAULT', 'AddOtherDatasetTask.build', '0/1 * * * * ?', '3', '0', '0', 'admin', '2021-09-28 14:43:03', 'admin', '2021-09-29 12:16:43', '', '0', NULL);

Create Table If Not Exists `t_earth_work`  (
                                              `id` int NOT NULL AUTO_INCREMENT,
                                              `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '类型',
                                              `scene_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景码',
                                              `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标题',
                                              `data_set` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数据集id',
                                              `is_show` int NULL DEFAULT 1 COMMENT '是否展示，默认否',
                                              `points` json NULL,
                                              `dataset_points` json NULL,
                                              `dataset_ids` json NULL,
                                              `height` double NULL DEFAULT NULL,
                                              `height_type` tinyint(1) NULL DEFAULT NULL COMMENT '平面类型',
                                              `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新者',
                                              `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                              `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
                                              `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
                                              `create_by` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建者',
                                              `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                              `fill` double NULL DEFAULT NULL COMMENT '填方量',
                                              `dig` double NULL DEFAULT NULL COMMENT '挖方量',
                                              `max_height` double NULL DEFAULT NULL,
                                              `min_height` double NULL DEFAULT NULL,
                                              `height_percentage` double NULL DEFAULT NULL,
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '土方测量' ROW_FORMAT = DYNAMIC;

Create Table If Not Exists  `sys_role_laser_menu`  (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
  PRIMARY KEY (`role_id`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;

ALTER TABLE `t_scene` ADD COLUMN `space` bigint NULL DEFAULT 0 COMMENT '使用容量' AFTER `shoot_count`;

ALTER TABLE `t_scene` ADD COLUMN `offline_ver_for_push` int NULL DEFAULT 0 COMMENT '离线包版本-提供自动推送' AFTER `space`;

ALTER TABLE `t_scene` ADD COLUMN `mixture` int NULL DEFAULT 0 AFTER `offline_ver_for_push`;

ALTER TABLE `t_laser_menu` ADD COLUMN `menu_by_role` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 'N' COMMENT '是否关联角色查询（Y/N）' AFTER `menu_type`;


INSERT INTO `t_laser_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `menu_by_role`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`) VALUES (18, '土方', 0, 0, 'earthwork', '/earthwork', 'C', 'Y', '0', '0', NULL, 'aicon-earthwork-n', '', NULL, '', NULL, '', '0');

INSERT INTO  `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (71, 'SVY21', 0, 1, NULL, '+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs +type=crs', '4757', 1, NULL, NULL, NULL, 0, NULL, NULL);


ALTER TABLE `t_scene` ADD COLUMN `offline_lang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '语言版本' AFTER `offline_status`;
ALTER TABLE `t_scene_download_log` ADD COLUMN `lang` VARCHAR(10) NULL   COMMENT '语言' AFTER `sys_version`;

INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`, `delete_flag`) VALUES (72, 'WGS 84 / UTM zone 51N', 0, 1, NULL, '+proj=utm +zone=51 +datum=WGS84 +units=m +no_defs +type=crs', '32651', 2, NULL, NULL, NULL, 0, NULL, NULL, NULL);
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`, `delete_flag`) VALUES (73, 'WGS 84 / UTM zone 52N', 0, 1, NULL, '+proj=utm +zone=52 +datum=WGS84 +units=m +no_defs +type=crs', '32652', 2, NULL, NULL, NULL, 0, NULL, NULL, NULL);
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`, `delete_flag`) VALUES (74, 'ITRF2000', 0, 1, NULL, '+proj=longlat +ellps=GRS80 +no_defs +type=crs', '7909', 2, NULL, NULL, NULL, 0, NULL, NULL, NULL);
UPDATE `t_proj4` SET `type` = 1 WHERE `epsg` IN ('4757','7909') AND `type` =2;
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (75, 'SVY21 / Singapore TM', 0, 1, NULL, '+proj=tmerc +lat_0=1.36666666666667 +lon_0=103.833333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', '3414', 2, NULL, NULL, NULL, 0, NULL, NULL);

ALTER TABLE `t_earth_work` ADD COLUMN `model_info` json NULL COMMENT '模型信息' AFTER `height_percentage`;
ALTER TABLE `t_earth_work` ADD COLUMN `resource_dxf1` json NULL COMMENT '模型资源信息（cad或 模型）' AFTER `model_info`;
ALTER TABLE `t_earth_work` ADD COLUMN `resource_dxf2` json NULL AFTER `resource_dxf1`;
ALTER TABLE `t_earth_work` ADD COLUMN `resource_model` json NULL AFTER `resource_dxf2`;
ALTER TABLE `t_earth_work` ADD COLUMN `crop_info` json NULL COMMENT '当前土方裁剪信息' AFTER `resource_model`;
ALTER TABLE `t_folder` ADD COLUMN `scene_source` int NULL DEFAULT 4 AFTER `deleted`;
ALTER TABLE `t_scene` ADD COLUMN `pay_status` int NULL DEFAULT 1 AFTER `mixture`;
ALTER TABLE `t_scene` ADD COLUMN `build_e57_status` int NULL DEFAULT 0 COMMENT '生成e57状态,-1 失败 0，未生成 1完成，2计算中' AFTER `pay_status`;

INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (70, 'SVY21', 0, 1, NULL, '+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs +type=crs', '4757', 1, NULL, NULL, NULL, 0, NULL, NULL);

INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (76, 'WGS 84 / UTM zone 48N', 0, 1, NULL, '+proj=utm +zone=48 +datum=WGS84 +units=m +no_defs +type=crs', '32648', 2, NULL, NULL, NULL, 0, NULL, NULL);

UPDATE `t_proj4` SET `name` = 'UTM zone 32N', `def` = 0, `gfw` = 1, `context` = NULL, `epsg_code` = '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', `epsg` = '25832', `type` = 2, `update_by` = NULL, `update_time` = NULL, `remark` = NULL, `deleted` = 0, `create_by` = NULL, `create_time` = NULL WHERE `id` = 69;

UPDATE `t_proj4` SET `name` = 'WGS 84 / UTM zone 51N', `def` = 0, `gfw` = 1, `context` = NULL, `epsg_code` = '+proj=utm +zone=51 +datum=WGS84 +units=m +no_defs +type=crs', `epsg` = '32651', `type` = 2, `update_by` = NULL, `update_time` = NULL, `remark` = NULL, `deleted` = 0, `create_by` = NULL, `create_time` = NULL WHERE `id` = 71;

UPDATE `t_proj4` SET `name` = 'WGS 84 / UTM zone 52N', `def` = 0, `gfw` = 1, `context` = NULL, `epsg_code` = '+proj=utm +zone=52 +datum=WGS84 +units=m +no_defs +type=crs\r\n', `epsg` = '32652', `type` = 2, `update_by` = NULL, `update_time` = NULL, `remark` = NULL, `deleted` = 0, `create_by` = NULL, `create_time` = NULL WHERE `id` = 72;

UPDATE `t_proj4` SET `name` = 'ITRF2000', `def` = 0, `gfw` = 1, `context` = NULL, `epsg_code` = '+proj=longlat +ellps=GRS80 +no_defs +type=crs\r\n', `epsg` = '7909', `type` = 1, `update_by` = NULL, `update_time` = NULL, `remark` = NULL, `deleted` = 0, `create_by` = NULL, `create_time` = NULL WHERE `id` = 73;

UPDATE `t_proj4` SET `name` = 'WGS 84 / UTM zone 47N', `def` = 0, `gfw` = 1, `context` = NULL, `epsg_code` = '+proj=utm +zone=47 +datum=WGS84 +units=m +no_defs +type=crs', `epsg` = '32647', `type` = 2, `update_by` = NULL, `update_time` = NULL, `remark` = NULL, `deleted` = 0, `create_by` = NULL, `create_time` = NULL WHERE `id` = 74;




Create Table If Not Exists `t_scene_control_point`  (
                                                  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                                  `epsg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'epsg',
                                                  `scene_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景码',
                                                  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '文件名',
                                                  `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '文件地址',
                                                  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
                                                  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                                  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
                                                  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                                  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
                                                  `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
                                                  `use_control_point` int NULL DEFAULT NULL,
                                                  `upload_time` datetime NULL DEFAULT NULL COMMENT '上传时间',
                                                  `report` datetime NULL DEFAULT NULL COMMENT '报告生成时间',
                                                  `controls_update_time` datetime NULL DEFAULT NULL,
                                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '场景控制点详情表' ROW_FORMAT = DYNAMIC;

Create Table If Not Exists  `t_scene_control_point_gis_pos`  (
                                                          `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                                          `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
                                                          `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                                          `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
                                                          `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                                          `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
                                                          `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
                                                          `pos_raw` json NULL COMMENT '84坐标',
                                                          `uid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '全景图名称',
                                                          `pos` json NULL COMMENT '原始坐标',
                                                          `scene_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景码',
                                                          `scene_control_point_id` bigint NULL DEFAULT NULL COMMENT '控制点id',
                                                          `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '场景控制点表' ROW_FORMAT = DYNAMIC;

Create Table If Not Exists `t_scene_control_point_pos`  (
                                                      `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                                      `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
                                                      `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                                      `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
                                                      `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                                      `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注信息',
                                                      `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
                                                      `offset` json NULL COMMENT '本地位置对应全景图的偏移像素',
                                                      `uid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '全景图名称',
                                                      `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '控制点名称',
                                                      `local` json NULL COMMENT '本地左边xyz',
                                                      `scene_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景码',
                                                      `scene_control_point_id` bigint NULL DEFAULT NULL COMMENT '控制点id',
                                                      `sort` int NULL DEFAULT NULL COMMENT '排序字段',
                                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '场景控制点表' ROW_FORMAT = DYNAMIC;

INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (77, 'BGS2005 / CCS2005', 0, 1, NULL, '+proj=lcc +lat_0=42.6678756833333 +lon_0=25.5 +lat_1=42 +lat_2=43.3333333333333 +x_0=500000 +y_0=4725824.3591 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', '7801', 2, NULL, NULL, NULL, 0, NULL, NULL);

ALTER TABLE `t_scene_edit_info_ext`
    ADD COLUMN `cut_model` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否有裁剪模型（0-否，1-是）' AFTER `billboards`;

ALTER TABLE `t_surveillance`
    CHANGE `play_url` `play_url` VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci NULL   COMMENT '播放地址',
    ADD COLUMN `url_type` INT DEFAULT 1  NOT NULL   COMMENT '类型（1-监控，2-视频）' AFTER `play_url`,
    ADD COLUMN `poster` VARCHAR(255) NULL   COMMENT '视频类型时，封面图文件名' AFTER `url_type`,
    ADD COLUMN `file_name` VARCHAR(255) NULL   COMMENT '视频文件名' AFTER `poster`;

ALTER TABLE `t_scene_edit_info_ext`
    ADD COLUMN `started` TEXT NULL   COMMENT '启动页信息' AFTER `sns_info`;


ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_draw_title` TINYINT DEFAULT 1  NOT NULL   COMMENT '是否显示空间绘制标题' AFTER `show_link_title`,
  ADD COLUMN `show_all_model` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示全部模型' AFTER `show_draw_title`;

ALTER TABLE `t_scene_edit_info_ext`
    ADD COLUMN `scene_draw` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否有空间绘制' AFTER `started`;

Create Table If Not Exists `t_scene_dynamic_panel` (
                                         `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                         `num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '场景码',
                                         `sid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sid',
                                         `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                         `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                         `rec_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'A' COMMENT '删除状态（A-可用，I删除）',
                                         PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=501 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='场景动态面板';


ALTER TABLE `t_scene_edit_controls`
    CHANGE `show_tagshare` `show_tagshare` TINYINT DEFAULT 1  NOT NULL   COMMENT '是否展示分享热点（0-不需要，1-需要）';


ALTER TABLE `t_scene_edit_info_ext`
    ADD COLUMN `floor_logo_type` TINYINT DEFAULT 1  NOT NULL   COMMENT '地面logo类型（0-指北针，1-图标）' AFTER `scene_draw`;

ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_surveil_scope` TINYINT DEFAULT 1  NOT NULL   COMMENT '是否显示监控范围' AFTER `show_all_model`;

ALTER TABLE `t_scene_plus_ext`
    ADD COLUMN `location` INT NULL COMMENT '拍摄模式:3(SFM架站式-看看场景), 4(SFM架站式-看见/深时/深光场景), 5(SLAM移动定位模式) , 6(SLAM移动定位模式-有点位)' AFTER `compute_time`,
  ADD COLUMN `mixture` INT DEFAULT 0  NULL COMMENT '是否混合模式' AFTER `location`,
  ADD COLUMN `orientation` VARCHAR(50) NULL   COMMENT '方向（只有激光场景才有）' AFTER `mixture`;

ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_texture` TINYINT DEFAULT 1  NULL   COMMENT '是否显示cad底图' AFTER `show_surveil_scope`;


ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_panos` TINYINT DEFAULT 0  NULL   COMMENT '是否显示漫游点' AFTER `show_texture`;

INSERT INTO `sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `deleted`) VALUES (7, 'OSS场景下载数据处理', 'DEFAULT', 'SceneOssDataTask.handel', '0 0/10 * * * ?', '3', '1', '0', 'admin', '2021-09-28 14:43:03', 'admin', '2021-09-29 12:16:43', '', '0');


ALTER TABLE `t_scene` ADD COLUMN `re_end_time` datetime NULL DEFAULT NULL COMMENT '重算时间' AFTER `web_path`;

ALTER TABLE `t_scene` ADD COLUMN `offline_time` datetime NULL DEFAULT NULL COMMENT '离线包生成完成时间' AFTER `re_end_time`;

ALTER TABLE `t_scene` ADD COLUMN `shoot_start_time` datetime NULL DEFAULT NULL COMMENT '开始拍摄时间' AFTER `offline_time`;

ALTER TABLE `t_scene` ADD COLUMN `upload_time` datetime NULL DEFAULT NULL COMMENT '上传时间' AFTER `shoot_start_time`;

ALTER TABLE `t_scene` ADD COLUMN `packing_status` int NULL DEFAULT 0 COMMENT '打包状态 0没打包,1已经打过包' AFTER `upload_time`;

ALTER TABLE `t_scene` ADD COLUMN `packing_folder` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '打包的存档路径' AFTER `packing_status`;

ALTER TABLE `t_scene` ADD COLUMN `build_offline_end_time` datetime NULL DEFAULT NULL COMMENT '离线包生成完成时间' AFTER `packing_folder`;

ALTER TABLE `t_scene_file_build` ADD COLUMN `result_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结果存放路径' AFTER `build_type`;

ALTER TABLE `t_scene_file_build` ADD COLUMN `result_file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结果文件名' AFTER `result_path`;

ALTER TABLE `t_scene_plus` ADD COLUMN `last_edit_time` timestamp NULL DEFAULT NULL COMMENT '最后计算时间' AFTER `house_type`;


-- CREATE DATABASE IF NOT EXISTS fd_fusion CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-- use fd_fusion;
-- SET NAMES utf8mb4;
-- SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_case
-- ----------------------------
Create Table If Not Exists `t_case`  (
                           `case_id` int NOT NULL AUTO_INCREMENT COMMENT '案件表',
                           `case_title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '案件标题',
                           `user_name` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '四维用户名',
                           `tb_status` tinyint(1) NULL DEFAULT 0,
                           `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                           `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                           `type` int NULL DEFAULT 0 COMMENT '0刑侦案件，1火调案件',
                           `tm_project_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '火调项目id',
                           `dept_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
                           `map_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地图链接',
                           `lat_and_long` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                           `case_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '案件编号',
                           `case_category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '案件类别',
                           `case_region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '案发区域',
                           `case_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '案发地址',
                           `homicide_case` int NULL DEFAULT NULL COMMENT '是否命案，0否，1是',
                           `criminal_case` int NULL DEFAULT NULL COMMENT '是否刑案，0否，1是',
                           `sys_user_id` int NULL DEFAULT NULL,
                           `crime_time` timestamp NULL DEFAULT NULL COMMENT '案发时间',
                           `show_scenes` int NULL DEFAULT NULL COMMENT '是否展示场景0否，1是',
                           PRIMARY KEY (`case_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 600 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_extract_detail
-- ----------------------------
Create Table If Not Exists `t_case_extract_detail`  (
                                          `id` int NOT NULL AUTO_INCREMENT,
                                          `case_id` int NULL DEFAULT NULL,
                                          `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '地址',
                                          `time` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '提取时间',
                                          `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '提取清单',
                                          `extract_user` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '提取人信息',
                                          `witness_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '证人信息',
                                          `tb_status` int NULL DEFAULT 0,
                                          `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                          `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_files
-- ----------------------------
Create Table If Not Exists `t_case_files`  (
                                 `files_id` int NOT NULL AUTO_INCREMENT COMMENT '卷宗',
                                 `case_id` int NULL DEFAULT NULL,
                                 `files_type_id` int NULL DEFAULT NULL COMMENT '附件类型',
                                 `files_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件标题',
                                 `files_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                 `img_type` int NULL DEFAULT NULL COMMENT '0现场图，1方位图',
                                 `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场图或方位图json',
                                 `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人账号',
                                 `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人昵称',
                                 `tb_status` int NULL DEFAULT 0,
                                 `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                 `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                 `create_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'upload' COMMENT '创建类型',
                                 PRIMARY KEY (`files_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1181 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_files_type
-- ----------------------------
Create Table If Not Exists `t_case_files_type`  (
                                      `files_type_id` int NOT NULL AUTO_INCREMENT COMMENT '附件类型',
                                      `files_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件类型名称',
                                      `sort` int NULL DEFAULT 1,
                                      `tb_status` int NULL DEFAULT 0,
                                      `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                      `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                      `parent_id` int NULL DEFAULT NULL,
                                      `modal_show` int NULL DEFAULT 0,
                                      `flat_show` int NULL DEFAULT 0,
                                      PRIMARY KEY (`files_type_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_fusion
-- ----------------------------
Create Table If Not Exists `t_case_fusion`  (
                                  `fusion_id` int NOT NULL AUTO_INCREMENT COMMENT '多元融合',
                                  `fusion_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '融合标题',
                                  `case_id` int NULL DEFAULT NULL COMMENT '案件id',
                                  `tb_status` int NULL DEFAULT 0,
                                  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  PRIMARY KEY (`fusion_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 275 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_img
-- ----------------------------
Create Table If Not Exists `t_case_img`  (
                               `id` int NOT NULL AUTO_INCREMENT,
                               `case_id` int NULL DEFAULT NULL COMMENT '案例id',
                               `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片链接',
                               `img_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片说明',
                               `status` int NULL DEFAULT 0 COMMENT '0未应用，1已应用',
                               `sort` int NULL DEFAULT 0 COMMENT '排序',
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                               `type` int NULL DEFAULT 0 COMMENT '0图片，1合并图片',
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 81 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_img_tag
-- ----------------------------
Create Table If Not Exists `t_case_img_tag`  (
                                   `id` int NOT NULL AUTO_INCREMENT,
                                   `case_id` int NULL DEFAULT NULL,
                                   `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                   `is_horizontal` int NULL DEFAULT 0,
                                   `tb_status` int NULL DEFAULT 0,
                                   `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                   `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_inquest
-- ----------------------------
Create Table If Not Exists `t_case_inquest`  (
                                   `id` int NOT NULL AUTO_INCREMENT,
                                   `case_id` int NULL DEFAULT NULL,
                                   `count` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勘验次数',
                                   `start_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勘验开始时间',
                                   `end_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勘验结束时间',
                                   `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验地点',
                                   `user_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验人员信息',
                                   `weather` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验气象条件',
                                   `situation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验情况',
                                   `environment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '环境勘验',
                                   `first_inquest` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '初步勘验',
                                   `careful_inquest` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '细项勘验',
                                   `special_inquest` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '专项勘验',
                                   `item_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '提取物品描述',
                                   `img_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场拍照制图描述',
                                   `leader` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人',
                                   `recorder` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录人',
                                   `inspector` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勘验人',
                                   `witness_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '证人信息数组',
                                   `tb_status` int NULL DEFAULT 0,
                                   `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                   `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_inquest_criminal
-- ----------------------------
Create Table If Not Exists `t_case_inquest_criminal`  (
                                            `id` int NOT NULL AUTO_INCREMENT,
                                            `case_id` int NULL DEFAULT NULL,
                                            `inquest_file_id` int NULL DEFAULT NULL,
                                            `inquest_num` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场勘验号',
                                            `dept_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '单位名称',
                                            `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标题',
                                            `send_dept` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '发送单位',
                                            `recorder` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '笔录人',
                                            `painter` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '绘图人',
                                            `photographer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '照相人',
                                            `issuance_count` int NULL DEFAULT NULL COMMENT '份数',
                                            `make_time` timestamp NULL DEFAULT NULL COMMENT '制作时间',
                                            `issuance_opinion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '签发意见',
                                            `signature` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '签名',
                                            `signature_time` timestamp NULL DEFAULT NULL COMMENT '签名时间',
                                            `report_dept` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报告单位',
                                            `inquest_time` timestamp NULL DEFAULT NULL COMMENT '时间',
                                            `times` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验时间数组',
                                            `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验地址',
                                            `protection_situation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场保护情况',
                                            `protector` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场保护人',
                                            `protection_measures` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场保护措施',
                                            `situation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场情况',
                                            `change_reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '变动原因',
                                            `change_reason_other_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                            `weather_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '天气情况',
                                            `light` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '光线',
                                            `inquest_commander` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验指挥人',
                                            `inquest_situation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验情况',
                                            `image_num` int NULL DEFAULT NULL COMMENT '现场勘验制图数量',
                                            `photograph_num` int NULL DEFAULT NULL COMMENT '照相数量',
                                            `photography_min_num` int NULL DEFAULT NULL COMMENT '摄影数量',
                                            `photography_sec_num` int NULL DEFAULT NULL,
                                            `recorder_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场勘验纪录人员obj',
                                            `signature_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场勘验人员签名数组',
                                            `witness_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现场勘验见证人数组',
                                            `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
                                            `tb_status` int NULL DEFAULT 0,
                                            `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                            `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                            `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '讯飞ai全景图解析场景码',
                                            `inquest_resource` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验事由',
                                            `recording_min_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                            `recording_Sec_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                            PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_inquest_info
-- ----------------------------
Create Table If Not Exists `t_case_inquest_info`  (
                                        `id` int NOT NULL AUTO_INCREMENT,
                                        `case_id` int NULL DEFAULT NULL,
                                        `command_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指挥中心电话时间',
                                        `alarm_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接警时间',
                                        `alarm_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接警人',
                                        `inquest_dept` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '现场勘验单位',
                                        `assign_dept` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指派/报告单位',
                                        `assign_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指派方式',
                                        `times` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勘验时间数组',
                                        `inquest_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勘验地点',
                                        `tb_status` int NULL DEFAULT 0,
                                        `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                        `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                        PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_case_live
-- ----------------------------
Create Table If Not Exists `t_case_live`  (
                                `id` int NOT NULL AUTO_INCREMENT,
                                `case_id` int NULL DEFAULT NULL,
                                `tm_user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                `take_room_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                `tb_status` int NULL DEFAULT 0,
                                `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                `num_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 241 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_num
-- ----------------------------
Create Table If Not Exists `t_case_num`  (
                               `id` int NOT NULL AUTO_INCREMENT,
                               `case_id` int NULL DEFAULT NULL,
                               `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `num_type` int NULL DEFAULT NULL COMMENT '0 四维看看，1看见场景，2 深时场景,3 三维模型,4深时obj',
                               `tb_status` int NULL DEFAULT 0,
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3657 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_offline
-- ----------------------------
Create Table If Not Exists `t_case_offline`  (
                                   `id` int NOT NULL AUTO_INCREMENT,
                                   `case_id` int NULL DEFAULT NULL,
                                   `offline_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `version` int NULL DEFAULT NULL,
                                   `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                   `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_path
-- ----------------------------
Create Table If Not Exists `t_case_path`  (
                                `id` int NOT NULL AUTO_INCREMENT,
                                `case_id` int NULL DEFAULT NULL,
                                `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                `tb_status` int NULL DEFAULT 0,
                                `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 194 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_case_script
-- ----------------------------
Create Table If Not Exists `t_case_script`  (
                                  `id` int NOT NULL AUTO_INCREMENT,
                                  `case_id` int NULL DEFAULT NULL,
                                  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                  `tb_status` int NULL DEFAULT 0,
                                  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_settings
-- ----------------------------
Create Table If Not Exists `t_case_settings`  (
                                    `settings_id` int NOT NULL AUTO_INCREMENT COMMENT '融合场景设置表',
                                    `case_id` int NULL DEFAULT NULL COMMENT '案件id',
                                    `pose` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '初始画面json',
                                    `cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '封面图',
                                    `back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '背景，天空',
                                    `back_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                    `open_compass` int NULL DEFAULT 0,
                                    `map_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                    `map_open` int NULL DEFAULT 0,
                                    `tb_status` int NULL DEFAULT 0,
                                    `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                    `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                    `scale` double(11, 4) NULL DEFAULT NULL COMMENT '缩放系数',
                                    `fov` double(11, 2) NULL DEFAULT NULL COMMENT '视角范围',
                                    `rotate` double(11, 4) NULL DEFAULT NULL,
                                    PRIMARY KEY (`settings_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_settings_resource
-- ----------------------------
Create Table If Not Exists `t_case_settings_resource`  (
                                             `id` int NOT NULL AUTO_INCREMENT,
                                             `case_id` int NULL DEFAULT NULL,
                                             `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
                                             `resource` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源链接',
                                             `back_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型，0天空，1地面',
                                             `tb_status` int NULL DEFAULT 0,
                                             `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                             `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                             `scale` double(11, 4) NULL DEFAULT NULL COMMENT '缩放系数',
                                             `rotate` double(11, 4) NULL DEFAULT NULL COMMENT '旋转系数',
                                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_tag
-- ----------------------------
Create Table If Not Exists `t_case_tag`  (
                               `tag_id` int NOT NULL AUTO_INCREMENT COMMENT '标注表',
                               `tag_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
                               `tag_describe` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '描述',
                               `leave_behind` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '遗留部位',
                               `get_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提取方法',
                               `get_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提取人',
                               `place_num` int NULL DEFAULT NULL,
                               `tag_img_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标注图片集',
                               `hot_icon_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '热点iconurl',
                               `hot_icon_id` int NULL DEFAULT NULL COMMENT '热点iconid',
                               `case_id` int NULL DEFAULT NULL,
                               `mtype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `cat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `tsms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `sort` int NULL DEFAULT 1,
                               `show3d_title` int NULL DEFAULT 0,
                               `audio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `tb_status` int NULL DEFAULT 0,
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                               `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               PRIMARY KEY (`tag_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 401 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_tag_point
-- ----------------------------
Create Table If Not Exists `t_case_tag_point`  (
                                     `tag_point_id` int NOT NULL AUTO_INCREMENT COMMENT '标注位置表',
                                     `tag_point_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '位置名称',
                                     `tag_point` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置json',
                                     `tag_id` int NULL DEFAULT NULL COMMENT '标注id',
                                     `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                     `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                     `sort` int NULL DEFAULT 1,
                                     `tb_status` int NULL DEFAULT 0,
                                     `fusion_num_id` int NULL DEFAULT NULL,
                                     `bind_hide` int NULL DEFAULT 0,
                                     `global_visibility` int NULL DEFAULT 0,
                                     `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     `mat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     `font_size` int NULL DEFAULT NULL,
                                     `line_height` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     `visibility_range` int NULL DEFAULT NULL,
                                     `normal` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     PRIMARY KEY (`tag_point_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1210 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_video
-- ----------------------------
Create Table If Not Exists `t_case_video`  (
                                 `video_id` int NOT NULL AUTO_INCREMENT,
                                 `folder_id` int NULL DEFAULT NULL,
                                 `video_path` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                 `video_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                 `video_cover` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '封面图',
                                 `sort` int NULL DEFAULT NULL,
                                 `tb_status` int NULL DEFAULT 0,
                                 `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                 `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                 `upload_status` int NULL DEFAULT 0 COMMENT '上传状态0上传中，1上传成功，-1上传失败',
                                 PRIMARY KEY (`video_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 513 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_video_folder
-- ----------------------------
Create Table If Not Exists `t_case_video_folder`  (
                                        `video_folder_id` int NOT NULL AUTO_INCREMENT COMMENT '视频文件夹',
                                        `video_folder_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件夹名称',
                                        `case_id` int NULL DEFAULT NULL COMMENT '案件id',
                                        `video_folder_cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图',
                                        `video_merge_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '合并片段之后的视频url',
                                        `sort` int NULL DEFAULT 0 COMMENT '排序',
                                        `tb_status` int NULL DEFAULT 0,
                                        `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                        `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                        `upload_status` int NULL DEFAULT 0,
                                        PRIMARY KEY (`video_folder_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 304 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_view
-- ----------------------------
Create Table If Not Exists `t_case_view`  (
                                `view_id` int NOT NULL AUTO_INCREMENT COMMENT '视图截取',
                                `view_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视图名称',
                                `view_point` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '场景进入位置',
                                `view_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视图截图',
                                `view_img_small` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视图截图缩略图',
                                `case_id` int NULL DEFAULT NULL COMMENT '案件id',
                                `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                                `num_type` int NULL DEFAULT NULL COMMENT '场景类型',
                                `num_thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景链接',
                                `sort` int NULL DEFAULT 1,
                                `tb_status` int NULL DEFAULT 0,
                                `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                `fusion_id` int NULL DEFAULT NULL,
                                `bind_hide` int NULL DEFAULT 0,
                                PRIMARY KEY (`view_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 538 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_fusion_guide
-- ----------------------------
Create Table If Not Exists `t_fusion_guide2`  (
                                    `fusion_guide_id` int NOT NULL AUTO_INCREMENT COMMENT '融合场景导览，路线',
                                    `case_id` int NULL DEFAULT NULL COMMENT '案件id',
                                    `cover` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '封面图',
                                    `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
                                    `sort` int NULL DEFAULT 1 COMMENT '排序',
                                    `tb_status` int NULL DEFAULT 0,
                                    `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                    `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                    `recovery_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                    PRIMARY KEY (`fusion_guide_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 261 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_fusion_guide_path
-- ----------------------------
Create Table If Not Exists `t_fusion_guide_path2`  (
                                         `guide_path_id` int NOT NULL AUTO_INCREMENT,
                                         `guide_id` int NULL DEFAULT NULL,
                                         `target` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置json',
                                         `position` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置json',
                                         `cover` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '封面图',
                                         `time` int NULL DEFAULT NULL COMMENT '持续时间 秒',
                                         `speed` double(10, 2) NULL DEFAULT NULL COMMENT '速度 m/s ',
                                         `sort` int NULL DEFAULT 1 COMMENT '排序',
                                         `pano_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                         `tb_status` int NULL DEFAULT 0,
                                         `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                         `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                         PRIMARY KEY (`guide_path_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1133 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_fusion_meter
-- ----------------------------
Create Table If Not Exists `t_fusion_meter`  (
                                   `fusion_meter_id` int NOT NULL AUTO_INCREMENT COMMENT '测量',
                                   `fusion_id` int NULL DEFAULT NULL COMMENT '融合id',
                                   `meter_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
                                   `meter_type` int NULL DEFAULT NULL COMMENT '测量工具类型，0 自由，1垂直，2面积',
                                   `position` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置',
                                   `length` double(10, 2) NULL DEFAULT NULL COMMENT '长度  米',
                                   `hide` int NULL DEFAULT 0 COMMENT '0展示，1隐藏',
                                   `tb_status` int NULL DEFAULT 0,
                                   `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                   `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                   `bind_hide` int NULL DEFAULT 0,
                                   PRIMARY KEY (`fusion_meter_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 640 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_fusion_num
-- ----------------------------
Create Table If Not Exists `t_fusion_num`  (
                                 `fusion_num_id` int NOT NULL AUTO_INCREMENT,
                                 `fusion_id` int NULL DEFAULT NULL,
                                 `model_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                 `transform` json NULL COMMENT '位置,比例等属性',
                                 `bottom` double(10, 2) NULL DEFAULT 1.00 COMMENT '高度',
                                 `opacity` double(10, 2) NULL DEFAULT 0.50 COMMENT '透明度',
                                 `hide` int NULL DEFAULT 0 COMMENT '是否隐藏0否，1是',
                                 `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                 `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                 `tb_status` int NULL DEFAULT 0,
                                 PRIMARY KEY (`fusion_num_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2012 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_hot_icon
-- ----------------------------
Create Table If Not Exists `t_hot_icon`  (
                               `icon_id` int NOT NULL AUTO_INCREMENT,
                               `icon_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `icon_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `is_system` int NULL DEFAULT 0 COMMENT '是否系统默认，0否，1是',
                               `use_num` int NULL DEFAULT 0 COMMENT '使用次数',
                               `last_use` int NULL DEFAULT 0 COMMENT '1上次使用',
                               `is_new` int NULL DEFAULT 1 COMMENT '0否，1是',
                               `tb_status` int NULL DEFAULT 0,
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                               `case_id` int NULL DEFAULT NULL,
                               `sort` int NULL DEFAULT 1,
                               PRIMARY KEY (`icon_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 272 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_model
-- ----------------------------
Create Table If Not Exists `t_model2`  (
                             `model_id` int NOT NULL AUTO_INCREMENT COMMENT '三维模型id',
                             `model_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三维模型标题',
                             `model_date_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三维模型数据类型',
                             `model_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '大小',
                             `model_obj_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                             `model_glb_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                             `type` int NULL DEFAULT 3 COMMENT '0看看，1看见，2深时，3用户上传三维模型，4深时点云',
                             `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                             `create_status` int NULL DEFAULT 0 COMMENT '0初始化，创建中，1创建成功 ,-1上传失败，-2已取消',
                             `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                             `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模型类型\'glb\'|\'pointcloud\',类型 点云还是模型,',
                             `tb_status` int NULL DEFAULT 0,
                             `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                             `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                             `dept_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
                             `file_new_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                             `render_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'base',
                             `wgs84` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                             `gcj02` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                             PRIMARY KEY (`model_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12647 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_scene_down_log
-- ----------------------------
Create Table If Not Exists `t_scene_down_log`  (
                                     `id` int NOT NULL AUTO_INCREMENT COMMENT '下载场景记录表',
                                     `scene_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                                     `scene_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景标题',
                                     `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户账号',
                                     `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户昵称',
                                     `sn_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景相机sn',
                                     `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织名称',
                                     `dept_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织类型',
                                     `dept_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织id',
                                     `status` int NULL DEFAULT 0 COMMENT '0下载中，1下载完成，2下载失败',
                                     `version` int NULL DEFAULT NULL COMMENT '场景版本',
                                     `down_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '下载链接',
                                     `tb_status` int NULL DEFAULT 0,
                                     `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                     `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 110 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_system_setting
-- ----------------------------
Create Table If Not Exists `t_system_setting`  (
                                     `id` int NOT NULL AUTO_INCREMENT,
                                     `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统标题',
                                     `theme_colour` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     `tb_status` int NULL DEFAULT 0,
                                     `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                     `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_xfyun_config
-- ----------------------------
Create Table If Not Exists `t_xfyun_config`  (
                                   `id` int NOT NULL AUTO_INCREMENT,
                                   `host_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `appid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `api_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `api_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `df_question` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                   `tb_status` int NULL DEFAULT 0,
                                   `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                   `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_xfyun_image
-- ----------------------------
Create Table If Not Exists `t_xfyun_image`  (
                                  `id` int NOT NULL AUTO_INCREMENT,
                                  `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                                  `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片路径',
                                  `xfyun_answer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '讯飞回复',
                                  `tb_status` int NULL DEFAULT 0,
                                  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_attachment
-- ----------------------------
Create Table If Not Exists `tm_attachment`  (
                                  `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一ID',
                                  `file_name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件名称',
                                  `attachment_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件类型',
                                  `type` tinyint NULL DEFAULT NULL COMMENT '文件类型:1->照片;2->文件',
                                  `file_oss_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件的oss路径',
                                  `dept_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件所属的部门ID',
                                  `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件上传人ID',
                                  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                  `update_time` datetime NULL DEFAULT NULL COMMENT '最新更新时间',
                                  `is_delete` tinyint NULL DEFAULT NULL COMMENT '是否删除: 0->未删除;1->已删除',
                                  `project_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件所属的火调项目ID',
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_camera
-- ----------------------------
Create Table If Not Exists `tm_camera`  (
                              `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一ID',
                              `camera_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相机编码',
                              `is_delete` tinyint NULL DEFAULT 0 COMMENT '是否被删除:0->未被删除;1->已被删除',
                              `dept_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属用户的部门id',
                              `user_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属用户的id',
                              `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                              `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新更新时间',
                              `fd_camera_id` bigint NULL DEFAULT NULL COMMENT '四维看看相机ID',
                              `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '相机关联关系表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_department
-- ----------------------------
Create Table If Not Exists `tm_department`  (
                                  `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
                                  `parent_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父类id',
                                  `ancestors` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表',
                                  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                  `is_delete` tinyint NULL DEFAULT 0 COMMENT '是否删除：0: 未删除，1: 已删除',
                                  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                  `dept_type` int NULL DEFAULT NULL COMMENT '组织类型 1总队，2支队，3大队',
                                  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门名称',
                                  `level` tinyint NULL DEFAULT NULL COMMENT '排序',
                                  `leader` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人',
                                  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
                                  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
                                  `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人ID',
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_message
-- ----------------------------
Create Table If Not Exists `tm_message`  (
                               `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一ID',
                               `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '留言内容',
                               `project_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '留言所属的火调项目ID',
                               `user_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '留言用户ID',
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新更新时间',
                               `is_delete` tinyint NULL DEFAULT 0 COMMENT '是否删除：0->未删除;1->已删除',
                               `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_permission
-- ----------------------------
Create Table If Not Exists `tm_permission`  (
                                  `id` int NOT NULL AUTO_INCREMENT,
                                  `perms` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限标识',
                                  `module` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '模块',
                                  `reamrk` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
                                  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  `is_delete` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '记录的状态，0: 生效，1: 禁用',
                                  `creator_id` varchar(28) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                                  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由',
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 88 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_project
-- ----------------------------
Create Table If Not Exists `tm_project`  (
                               `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一ID',
                               `project_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目编号',
                               `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起火对象名称',
                               `project_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起火对象地址',
                               `project_site` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起火场所',
                               `project_site_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起火场所层级编码',
                               `dept_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '承办单位ID',
                               `organizer_dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '承办单位名称',
                               `organizer_users` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '承办人员',
                               `accident_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '事故日期',
                               `fire_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事故原因',
                               `scene_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                               `is_teached` tinyint NULL DEFAULT 0 COMMENT '是否是教学项目: 0->不是;1->是',
                               `creator_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                               `creator_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者名称',
                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                               `editor_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编辑者ID',
                               `editor_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者名称',
                               `edit_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '编辑时间',
                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新更新时间',
                               `is_delete` tinyint NULL DEFAULT 0 COMMENT '是否删除: 0->未删除;1->已删除',
                               `status` tinyint NULL DEFAULT 0 COMMENT '状态: 0->未认定;1已认定',
                               `creator_dept_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者部门ID',
                               `vr_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景链接',
                               `case_new_name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                               `latlng` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `map_show` int NULL DEFAULT 0,
                               `field1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field7` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field8` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field9` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               `field10` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '火调项目信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_role
-- ----------------------------
Create Table If Not Exists `tm_role`  (
                            `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id',
                            `role_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色描述',
                            `role_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
                            `role_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色key',
                            `sort` int NULL DEFAULT NULL COMMENT '排序',
                            `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                            `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                            `is_delete` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '记录的状态，0: 生效，1: 禁用',
                            `dataScope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据范围（1：所有数据权限；2：自定义数据权限；3：本部门数据权限；4：本部门及以下数据权限；5：仅本人数据权限',
                            `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                            PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_role_permission
-- ----------------------------
Create Table If Not Exists `tm_role_permission`  (
                                       `id` int NOT NULL AUTO_INCREMENT,
                                       `role_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                       `permission_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                       `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                       `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                       `is_delete` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '记录的状态，0: 生效，1: 禁用',
                                       `dataScope` int NULL DEFAULT NULL COMMENT '数据范围（1：所有数据权限；2：自定义数据权限；3：本部门数据权限；4：本部门及以下数据权限；5：仅本人数据权限',
                                       `creator_id` varchar(28) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                                       PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1732 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_scene
-- ----------------------------
Create Table If Not Exists `tm_scene`  (
                             `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一主键',
                             `scene_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景码',
                             `dept_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门ID',
                             `user_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属用户的ID',
                             `camera_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属相机ID',
                             `is_delete` tinyint NULL DEFAULT NULL COMMENT '是否删除: 0->未删除;1->已删除',
                             `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                             `update_time` datetime NULL DEFAULT NULL COMMENT '最新更新时间',
                             `video_create_time` date NULL DEFAULT NULL COMMENT '拍摄日期',
                             `title` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景标题',
                             `cover_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景封面照片',
                             `vr_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景浏览链接',
                             `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '场景关联关系表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_user
-- ----------------------------
Create Table If Not Exists `tm_user`  (
                            `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
                            `dept_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
                            `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像对应的链接地址',
                            `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
                            `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
                            `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '昵称',
                            `status` tinyint NOT NULL DEFAULT 1 COMMENT '是否禁用：1->可用;0->禁用',
                            `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                            `is_delete` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除，0: 未删除，1: 已删除',
                            `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                            `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                            `is_admin` tinyint NULL DEFAULT 0 COMMENT '0：否 1：是',
                            PRIMARY KEY (`id`) USING BTREE,
                            INDEX `user_name`(`user_name`(191)) USING BTREE,
                            INDEX `nick_name`(`nick_name`(191)) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for tm_user_role
-- ----------------------------
Create Table If Not Exists `tm_user_role`  (
                                 `id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
                                 `user_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户表id',
                                 `role_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色表id',
                                 `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                 `is_delete` tinyint NULL DEFAULT 0 COMMENT '是否删除，0: 未删除，1: 已经删除',
                                 `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                 `creator_id` varchar(28) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
                                 PRIMARY KEY (`id`) USING BTREE,
                                 INDEX `role_id`(`role_id`) USING BTREE,
                                 INDEX `fk_user_id_1`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关系表' ROW_FORMAT = DYNAMIC;






Create Table If Not Exists `t_common_upload`  (
                                    `id` int NOT NULL AUTO_INCREMENT,
                                    `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `file_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `new_file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `file_type_str` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `file_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `result_file_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
                                    `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                    `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                    `status` int NULL DEFAULT 0,
                                    `unzip_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `file_type` int NULL DEFAULT NULL,
                                    `wgs84` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    `gcj02` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 723 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_dict
-- ----------------------------
Create Table If Not Exists `t_dict`  (
                           `id` int NOT NULL AUTO_INCREMENT,
                           `dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                           `dict_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                           `sort` int NULL DEFAULT 1,
                           `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
                           `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                           `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                           `sys_user_id` int NULL DEFAULT NULL,
                           `parent_id` int NULL DEFAULT NULL,
                           PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 130 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_dict_file
-- ----------------------------
Create Table If Not Exists `t_dict_file`  (
                                `id` int NOT NULL AUTO_INCREMENT,
                                `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                `type_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                `dict_id` int NULL DEFAULT NULL,
                                `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
                                `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                `sys_user_id` int NULL DEFAULT NULL,
                                `upload_id` int NULL DEFAULT NULL,
                                PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;




ALTER TABLE `t_case`
    ADD COLUMN `thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '案件封面图' AFTER `show_scenes`;

INSERT INTO `t_hot_icon` VALUES (1, '系统默认', 'profile/fusion/default/tag_icon_default.svg', NULL, 1, 0, 1, 1, 1, '2022-08-04 11:06:39', '2024-12-19 16:16:36', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (2, '2', 'profile/fusion/default/hand_l.png', NULL, 1, 2, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-31 11:15:07', NULL, 2);
INSERT INTO `t_hot_icon` VALUES (3, '2', 'profile/fusion/default/hand_r.png', NULL, 1, 1, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-20 10:09:26', NULL, 3);
INSERT INTO `t_hot_icon` VALUES (4, '2', 'profile/fusion/default/zhiwen.png', NULL, 1, 9, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-27 11:00:33', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (5, '3', 'profile/fusion/default/xieyin.png', NULL, 1, 2, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-16 20:47:56', NULL, 3);
INSERT INTO `t_hot_icon` VALUES (6, '3', 'profile/fusion/default/youzuji.png', NULL, 1, 2, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-13 17:46:00', NULL, 2);
INSERT INTO `t_hot_icon` VALUES (7, '3', 'profile/fusion/default/zuozuji.png', NULL, 1, 5, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-20 14:29:35', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (8, '4', 'profile/fusion/default/xueji.png', NULL, 1, 3, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-27 14:43:06', NULL, 2);
INSERT INTO `t_hot_icon` VALUES (9, '4', 'profile/fusion/default/xuepo.png', NULL, 1, 0, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-19 16:10:24', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (10, '5', 'profile/fusion/default/shitiz.png', NULL, 1, 0, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-19 16:10:24', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (11, '5', 'profile/fusion/default/shitib.png', NULL, 1, 1, 1, 1, 0, '2024-12-19 11:10:50', '2025-01-02 09:54:29', NULL, 2);
INSERT INTO `t_hot_icon` VALUES (12, '5', 'profile/fusion/default/shitifuhao.png', NULL, 1, 0, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-19 16:10:24', NULL, 3);
INSERT INTO `t_hot_icon` VALUES (13, '6', 'profile/fusion/default/h_default.png', NULL, 1, 1, 1, 1, 0, '2024-12-19 11:10:50', '2024-12-19 17:27:49', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (14, '7', 'profile/fusion/default/h_default.png', NULL, 1, 2, 1, 1, 0, '2024-12-19 11:10:50', '2025-01-08 17:02:50', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (18, '8', 'profile/fusion/default/h_default.png', NULL, 1, 96, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-27 14:34:10', NULL, 1);
INSERT INTO `t_hot_icon` VALUES (20, '8', 'profile/fusion/default/indicate1.png', NULL, 1, 12, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-16 20:30:29', NULL, 2);
INSERT INTO `t_hot_icon` VALUES (21, '8', 'profile/fusion/default/indicate2.png', NULL, 1, 3, 1, 1, 0, '2024-12-19 11:10:50', '2025-01-02 15:02:40', NULL, 3);
INSERT INTO `t_hot_icon` VALUES (22, '8', 'profile/fusion/default/indicate3.png', NULL, 1, 7, 1, 1, 0, '2024-12-19 11:10:50', '2025-02-16 20:46:33', NULL, 4);


INSERT INTO `t_case_files_type` VALUES (1, '原始照片', 1, 0, '2024-12-10 15:19:08', '2024-12-10 15:25:02', NULL, 1, 0);
INSERT INTO `t_case_files_type` VALUES (2, '三录材料', 1, 0, '2024-12-10 15:19:53', '2024-12-10 15:19:55', NULL, 0, 0);
INSERT INTO `t_case_files_type` VALUES (3, '案件卷宗', 1, 0, '2024-12-10 15:20:01', '2024-12-10 15:20:04', NULL, 0, 0);
INSERT INTO `t_case_files_type` VALUES (4, '其他资料', 1, 0, '2024-12-10 15:20:09', '2024-12-10 15:20:12', NULL, 0, 0);
INSERT INTO `t_case_files_type` VALUES (11, '中心现场照片', 1, 0, '2024-12-10 09:40:19', '2024-12-10 15:20:53', 1, 0, 0);
INSERT INTO `t_case_files_type` VALUES (12, '关联现场照片', 2, 0, '2024-12-10 09:41:31', '2024-12-10 15:20:53', 1, 0, 0);
INSERT INTO `t_case_files_type` VALUES (13, '痕迹物证照片', 3, 0, '2024-12-10 09:41:43', '2024-12-10 15:20:53', 1, 0, 0);
INSERT INTO `t_case_files_type` VALUES (14, '其他', 4, 0, '2024-12-10 09:41:58', '2024-12-10 15:20:53', 1, 0, 0);
INSERT INTO `t_case_files_type` VALUES (23, '方位', 5, 0, '2024-12-10 09:44:05', '2024-12-10 15:18:35', 11, 0, 0);
INSERT INTO `t_case_files_type` VALUES (24, '概貌', 6, 0, '2024-12-10 09:44:15', '2024-12-10 15:18:35', 11, 0, 0);
INSERT INTO `t_case_files_type` VALUES (25, '重点部位', 7, 0, '2024-12-10 09:44:21', '2024-12-10 15:18:35', 11, 0, 0);
INSERT INTO `t_case_files_type` VALUES (26, '细目', 8, 0, '2024-12-10 09:44:22', '2024-12-10 15:18:35', 11, 0, 0);
INSERT INTO `t_case_files_type` VALUES (27, '其他', 9, 0, '2024-12-10 09:44:29', '2024-12-10 15:18:35', 11, 0, 0);
INSERT INTO `t_case_files_type` VALUES (28, '尸检照片', 10, 0, '2024-12-10 09:46:25', '2024-12-10 15:18:41', 12, 0, 0);
INSERT INTO `t_case_files_type` VALUES (29, '其他', 11, 0, '2024-12-10 09:46:29', '2024-12-10 15:18:41', 12, 0, 0);
INSERT INTO `t_case_files_type` VALUES (30, '尸体', 12, 0, '2024-12-10 09:49:02', '2024-12-10 15:18:51', 13, 0, 0);
INSERT INTO `t_case_files_type` VALUES (31, '手印', 13, 0, '2024-12-10 09:49:08', '2024-12-10 15:18:51', 13, 0, 0);
INSERT INTO `t_case_files_type` VALUES (32, '足迹', 14, 0, '2024-12-10 09:49:14', '2024-12-10 15:18:51', 13, 0, 0);
INSERT INTO `t_case_files_type` VALUES (33, '血迹', 15, 0, '2024-12-10 09:49:18', '2024-12-10 15:18:51', 13, 0, 0);
INSERT INTO `t_case_files_type` VALUES (34, '其他', 16, 0, '2024-12-10 09:49:23', '2024-12-10 15:18:51', 13, 0, 0);
INSERT INTO `t_case_files_type` VALUES (38, '现场图', 1, 0, '2024-12-10 15:22:08', '2024-12-10 15:25:12', 2, 0, 1);
INSERT INTO `t_case_files_type` VALUES (39, '现场照片', 1, 0, '2024-12-10 15:22:24', '2024-12-10 15:25:21', 2, 1, 0);
INSERT INTO `t_case_files_type` VALUES (40, '勘验笔录', 1, 0, '2024-12-10 15:22:28', '2024-12-10 15:22:38', 2, 0, 0);
INSERT INTO `t_case_files_type` VALUES (41, '平面图', 1, 0, '2024-12-10 15:23:09', '2024-12-10 15:23:16', 38, 0, 0);
INSERT INTO `t_case_files_type` VALUES (42, '方位图', 1, 0, '2024-12-10 15:23:12', '2025-01-02 10:58:53', 38, 0, 0);
INSERT INTO `t_case_files_type` VALUES (43, '侦查实验', 1, 0, '2024-12-10 15:23:58', '2024-12-10 15:24:05', 4, 0, 0);
INSERT INTO `t_case_files_type` VALUES (44, '其他材料', 1, 0, '2024-12-10 15:24:02', '2024-12-10 15:24:05', 4, 0, 0);
INSERT INTO `t_case_files_type` VALUES (45, '诉讼卷', 1, 0, '2024-12-10 15:24:31', '2024-12-10 15:24:45', 3, 0, 0);
INSERT INTO `t_case_files_type` VALUES (46, '证据卷', 1, 0, '2024-12-10 15:24:37', '2024-12-10 15:24:45', 3, 0, 0);
INSERT INTO `t_case_files_type` VALUES (47, '中心现场照片', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:00:58', 39, 0, 0);
INSERT INTO `t_case_files_type` VALUES (48, '关联现场照片', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:00:58', 39, 0, 0);
INSERT INTO `t_case_files_type` VALUES (49, '痕迹物证照片', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:00:58', 39, 0, 0);
INSERT INTO `t_case_files_type` VALUES (50, '其他', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:00:58', 39, 0, 0);
INSERT INTO `t_case_files_type` VALUES (51, '方位', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:08', 47, 0, 0);
INSERT INTO `t_case_files_type` VALUES (52, '概貌', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:08', 47, 0, 0);
INSERT INTO `t_case_files_type` VALUES (53, '重点部位', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:08', 47, 0, 0);
INSERT INTO `t_case_files_type` VALUES (54, '细目', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:08', 47, 0, 0);
INSERT INTO `t_case_files_type` VALUES (55, '其他', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:14', 47, 0, 0);
INSERT INTO `t_case_files_type` VALUES (56, '尸检照片', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:30', 48, 0, 0);
INSERT INTO `t_case_files_type` VALUES (57, '其他', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:30', 48, 0, 0);
INSERT INTO `t_case_files_type` VALUES (58, '尸体', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:40', 49, 0, 0);
INSERT INTO `t_case_files_type` VALUES (59, '手印', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:40', 49, 0, 0);
INSERT INTO `t_case_files_type` VALUES (60, '足迹', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:40', 49, 0, 0);
INSERT INTO `t_case_files_type` VALUES (61, '血迹', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:40', 49, 0, 0);
INSERT INTO `t_case_files_type` VALUES (62, '其他', 1, 0, '2024-12-18 17:00:49', '2024-12-18 17:01:40', 49, 0, 0);


ALTER TABLE `t_scene_file_build` ADD COLUMN  `first_end_time` datetime DEFAULT NULL COMMENT '初次计算完成时间';
ALTER TABLE `t_scene` ADD COLUMN   `packing_time` datetime DEFAULT NULL COMMENT '打包的存档完成时间';

ALTER TABLE `t_case`
    ADD COLUMN `offline_status` int NULL DEFAULT 0 COMMENT '离线包打包状态-1打包失败，0未打包，1打包中，2打包完成' AFTER `thumb`,
    ADD COLUMN `offline_path` varchar(255) NULL COMMENT '离线包路径' AFTER `offline_status`;

ALTER TABLE `t_scene_plus_ext`
    ADD COLUMN `rtk_location` varchar(255) NULL AFTER `orientation`;



ALTER TABLE `t_scene` ADD COLUMN `slam_count` int NULL DEFAULT NULL COMMENT '帧数' AFTER `build_e57_status`;

Create Table If Not Exists `t_coord_temp`  (
                                         `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
                                         `scene_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '场景码',
                                         `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '模板路径',
                                         `is_default` tinyint NULL DEFAULT 0 COMMENT '是否为默认数据（1: 是默认数据；0: 不是默认数据）',
                                         `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '模板名称',
                                         `create_by` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建者',
                                         `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                         `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新者',
                                         `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                         `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
                                         `delete_flag` datetime DEFAULT NULL COMMENT '逻辑删除',
                                         `company_id` bigint NULL DEFAULT NULL COMMENT '四普26',
                                         `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'gps/pro',
                                         `display` int NULL DEFAULT NULL COMMENT '前端展示',
                                         `lang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '语言',
                                         `menu` json NULL COMMENT 'hot,measurement,point',
                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '场景坐标下载模板表' ROW_FORMAT = DYNAMIC;

INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('1', NULL, 'coordMergeTemp/def-xyz.xls', '1', '默认模板', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'pro', '1', 'zh', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('2', NULL, 'coordMergeTemp/def-v1.xls', '1', '默认模板', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'gis', '1', 'zh', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('3', NULL, 'coordMergeTemp/templaten.xls', '0', '本体边界绘制矢量数据', NULL, NULL, NULL, NULL, NULL, NULL, '26', 'gis', '1', 'zh', '[\"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('4', NULL, 'coordMergeTemp/V2.xls', '0', '本体边界坐标', NULL, NULL, NULL, NULL, NULL, NULL, '26', 'gis', '1', 'zh', '[\"hot\", \"point\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('5', NULL, 'coordMergeTemp/def-xyz-en.xls', '1', 'Default Template', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'pro', '1', 'en', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('6', NULL, 'coordMergeTemp/def-v1-en.xls', '1', 'Default Template', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'gis', '1', 'en', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('7', NULL, 'coordMergeTemp/def-xyz-ja.xls', '1', 'デフォルトテンプレート', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'pro', '1', 'ja', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('8', NULL, 'coordMergeTemp/def-v1-ja.xls', '1', 'デフォルトテンプレート', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'gis', '1', 'ja', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('9', NULL, 'coordMergeTemp/def-xyz-kr.xls', '1', '기본 템플릿', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'pro', '1', 'kr', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_coord_temp` (`id`, `scene_code`, `url`, `is_default`, `title`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `delete_flag`, `company_id`, `type`, `display`, `lang`, `menu`) VALUES ('10', NULL, 'coordMergeTemp/def-v1-kr.xls', '1', '기본 템플릿', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'gis', '1', 'kr', '[\"hot\", \"point\", \"measurement\"]');
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (78, 'WGS 84 / UTM zone 31N', 0, 1, NULL, '+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs +type=crs', '32631', 2, NULL, NULL, NULL, 0, NULL, NULL);
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (79, 'WGS 84 / UTM zone 32N', 0, 1, NULL, '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +type=crs', '32632', 2, NULL, NULL, NULL, 0, NULL, NULL);
INSERT INTO `t_proj4` (`id`, `name`, `def`, `gfw`, `context`, `epsg_code`, `epsg`, `type`, `update_by`, `update_time`, `remark`, `deleted`, `create_by`, `create_time`) VALUES (80, 'WGS 84 / UTM zone 30N', 0, 1, NULL, '+proj=utm +zone=30 +datum=WGS84 +units=m +no_defs +type=crs\r\n', '32630', 2, NULL, NULL, NULL, 0, NULL, NULL);



ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_areas` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示地域';

ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_ai` TINYINT DEFAULT 0  NOT NULL   COMMENT '是否显示ai识别';

ALTER TABLE `t_scene_edit_controls`
    ADD COLUMN `show_laser` TINYINT DEFAULT 0  NULL   COMMENT '是否显示点云跳转按钮';

ALTER TABLE `t_scene_plus`
    ADD COLUMN `remove_portrait` INT DEFAULT 2  NULL   COMMENT '人像抹除状态（-1-失败，0-执行中，1-成功，2-无）';

ALTER TABLE `t_scene_plus`
    ADD COLUMN `other_type` VARCHAR(20) NULL,
  ADD COLUMN `source_id` BIGINT NULL;

ALTER TABLE `t_scene_plus`
  ADD COLUMN `has_floorplan_ai` TINYINT DEFAULT 0  NULL COMMENT '是否有平面图ai识别数据';

ALTER TABLE `t_scene_plus_ext`
    ADD COLUMN `mesh_compute_time` BIGINT NULL   COMMENT 'mesh计算耗时';

ALTER TABLE `t_scene_plus_ext`
    ADD COLUMN `has_recognition` TINYINT DEFAULT 0  NULL   COMMENT '是否有ai识别';

ALTER TABLE `t_scene_plus_ext`
    ADD COLUMN `slam_count` int NULL COMMENT '帧数' AFTER `has_recognition`;


Create Table If Not Exists `t_scene_mark_shape` (
                                      `id` bigint NOT NULL AUTO_INCREMENT,
                                      `flag` json DEFAULT NULL,
                                      `shapes` json DEFAULT NULL,
                                      `image_path` varchar(50) DEFAULT NULL COMMENT '图片名称',
                                      `image_height` int DEFAULT NULL COMMENT '高',
                                      `image_width` int DEFAULT NULL COMMENT '宽度',
                                      `num` varchar(255) DEFAULT NULL COMMENT '场景码',
                                      `version` varchar(50) DEFAULT NULL COMMENT '版本号',
                                      `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'A' COMMENT '记录的状态，A: 生效，I: 禁用',
                                      `update_time` datetime DEFAULT NULL COMMENT '更新时间',
                                      `create_time` datetime DEFAULT NULL COMMENT '创建时间',
                                      `re_train` int DEFAULT '0' COMMENT '重新训练 0不需要 1需要',
                                      `to_train` int DEFAULT '0' COMMENT '0没训练 1训练过',
                                      `type` int DEFAULT '1',
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16215 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='场景标记多边形识别数据表';

Create Table If Not Exists `t_scene_shape_enum` (
                                      `id` bigint NOT NULL AUTO_INCREMENT,
                                      `name` varchar(50) DEFAULT NULL COMMENT '属性名',
                                      `class_name` varchar(50) DEFAULT NULL COMMENT '类名',
                                      `resource_id` int DEFAULT NULL COMMENT '资源类型ID',
                                      `type_id` int DEFAULT NULL COMMENT '设备类型ID',
                                      `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'A' COMMENT '记录的状态，A: 生效，I: 禁用',
                                      `update_time` datetime DEFAULT NULL COMMENT '更新时间',
                                      `create_time` datetime DEFAULT NULL COMMENT '创建时间',
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='标注框模型表';




insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('1','换电锂电池组','lead_batteries','1513','15130001','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('2','UPS电源设备','ups_power_unit','1511','1483735','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('3','标准机柜','equipment_cabinet','3405','34050005','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('4','交流配电柜','ac_switchboard','3406','35530011','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('5','普通空调壁挂','kfr','3533','35330005','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('6','普通空调柜式','sdkt','3533','35330006','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('7','灭火器','extinguisher','3599','35610015','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('8','直流配电设备','dc_distribution','1511','1483734','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('9','监控摄像机','surveillance_camera','3536','35360025','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('10','蓄电池组','accumulator','9006','90060001','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('11','双层走线架','double-cabling_rack','9999','99990003','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('12','单层走线架','cabling_rack','9999','99990002','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('13','馈线窗','hlkc','9999','99990001','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('14','接地排','grounding_bar','9999','99990004','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('15','开关电源','power_switch','3510','35100006','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('16','低压计量柜','low_pressure_measuring_tank','3502','35020006','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('17','智能通风设备','ventilation_installation','3533','35330004','A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('18','电视','TV',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('19','组合沙发','CombinationSofa',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('20','单人沙发','SingleSofa',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('21','茶几','TeaTable',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('22','地毯','Carpet',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('23','植物','Plant',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('24','餐桌','DiningTable',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('25','双人床','DoubleBed',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('26','单人床','SingleBed',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('27','衣柜','Wardrobe',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('28','梳妆台','Dresser',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('29','床头柜','BedsideCupboard',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('30','抱枕','Pillow',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('31','燃气灶','GasStove',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('32','橱柜','Cupboard',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('33','浴缸','Bathtub',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('34','马桶','Closestool',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('35','洗漱台','Washstand',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('36','书桌','Desk',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('37','阳台椅','BalconyChair',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('38','电梯','Elevator',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('39','xxx房间','Tag',NULL,NULL,'I',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('40','客厅','Tag_livingroom',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('41','卧室','Tag_bedroom',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('42','卫生间','Tag_bathroom',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('43','椅子','Chair',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('44','厨房','Tag_kitchenroom',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('45','窗户','BayWindow',NULL,NULL,'A',NULL,NULL);
insert into `t_scene_shape_enum` (`id`, `name`, `class_name`, `resource_id`, `type_id`, `rec_status`, `update_time`, `create_time`) values('46','三人沙发','ThreeSofa',NULL,NULL,'A',NULL,NULL);

ALTER TABLE `t_model2`  ADD COLUMN `convert_type` int NULL DEFAULT 0 AFTER `gcj02`;

ALTER TABLE `t_scene` ADD COLUMN `last_edit_time` datetime NULL DEFAULT NULL COMMENT '最后编辑时间' AFTER `packing_time`;


ALTER TABLE  `t_case`
    ADD COLUMN `offline_start_time` timestamp NULL AFTER `offline_path`,
    ADD COLUMN `offline_end_time` timestamp NULL AFTER `offline_start_time`;

ALTER TABLE `t_model2`
    ADD COLUMN `upload_id` int NULL DEFAULT null AFTER `gcj02`;

ALTER TABLE `t_case_files`
    ADD COLUMN `upload_id` int NULL DEFAULT null AFTER `content`;