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;

-- ----------------------------
-- 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_model` change model_glb_url model_url varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL ;


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  `fdkk_laser`.`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 `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');
