DROP TABLE IF EXISTS `t_case_animation`;
CREATE TABLE `t_case_animation`  (
                                     `id` int NOT NULL AUTO_INCREMENT,
                                     `case_id` int NULL DEFAULT NULL,
                                     `fusion_id` int NULL DEFAULT NULL,
                                     `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                     `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                     `show_title` int NULL DEFAULT NULL COMMENT '0否，1是',
                                     `font_size` int NULL DEFAULT NULL,
                                     `global_visibility` int NULL DEFAULT NULL COMMENT '0否，1是',
                                     `visibility_range` int NULL DEFAULT NULL,
                                     `frames` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                     `actions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                     `subtitles` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                     `paths` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                     `mat` 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 = 42 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;


DROP TABLE IF EXISTS `t_map_config`;
CREATE TABLE `t_map_config`  (
                                 `id` int NOT NULL AUTO_INCREMENT,
                                 `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `map_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
                                 `coord` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
                                 `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                 `tb_status` int NULL DEFAULT 0,
                                 `geocode_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `resp_list_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `resp_location_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `resp_address_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 `resp_name_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of t_map_config
-- ----------------------------
INSERT INTO `t_map_config` VALUES (1, '高德影像地图', '[{\"tempUrl\":\"//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=6&x={x}&y={y}&z={z}&layer=6&token=YOUR_API_KEY\",\"maximumLevel\":18},{\"tempUrl\":\"//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}&layer=6&token=YOUR_API_KEY\",\"maximumLevel\":18}]', NULL, '2025-03-28 11:21:01', '2025-09-09 17:28:03', 0, 'https://restapi.amap.com/v3/place/text?keywords={address}&offset=20&page=1&key=e9df4167dcdf63eac3ce871a2127c8f7&extensions=base', 'pois', 'location', 'address', 'name');
INSERT INTO `t_map_config` VALUES (2, '高德矢量地图', '[{\"tempUrl\":\"//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}&layer=6&token=YOUR_API_KEY\",\"maximumLevel\":18},{\"tempUrl\":\"//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}&layer=6&token=YOUR_API_KEY\",\"maximumLevel\":18}]', NULL, '2025-03-28 11:22:00', '2025-09-09 17:28:03', 0, 'https://restapi.amap.com/v3/place/text?keywords={address}&offset=20&page=1&key=e9df4167dcdf63eac3ce871a2127c8f7&extensions=base', 'pois', 'location', 'address', 'name');
INSERT INTO `t_map_config` VALUES (3, '江门内网地图', '[{\"tempUrl\":\"//a.map.jms.gd/tile/osm/{z}/{x}/{y}.png\",\"maximumLevel\":18}]', NULL, '2025-04-25 17:13:02', '2025-09-09 17:28:00', 1, NULL, NULL, NULL, NULL, NULL);



DROP TABLE IF EXISTS `t_case_overview`;
CREATE TABLE `t_case_overview`  (
                                    `id` int NOT NULL AUTO_INCREMENT,
                                    `case_id` int NULL DEFAULT NULL,
                                    `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                    `cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                    `store` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '数据',
                                    `viewport` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '视口',
                                    `type` int NULL DEFAULT 0,
                                    `map_url` 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,
                                    `high` int NULL DEFAULT NULL,
                                    `width` int NULL DEFAULT NULL,
                                    `list_cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                    `kankan_cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                    `platform_id` int NULL DEFAULT NULL,
                                    `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                    `sub_group` int NULL DEFAULT NULL,
                                    `sys_user_id` int NULL DEFAULT NULL,
                                    `is_copy` int NULL DEFAULT NULL,
                                    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 293 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for t_case_tabulation
-- ----------------------------
DROP TABLE IF EXISTS `t_case_tabulation`;
CREATE TABLE `t_case_tabulation`  (
                                      `id` int NOT NULL AUTO_INCREMENT,
                                      `case_id` int NULL DEFAULT NULL,
                                      `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                      `store` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '数据',
                                      `viewport` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '视口',
                                      `cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '封面图',
                                      `paper_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '纸张',
                                      `is_auto_gen` 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,
                                      `overview_id` int NULL DEFAULT NULL,
                                      `map_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                      `high` int NULL DEFAULT NULL,
                                      `width` int NULL DEFAULT NULL,
                                      `list_cover` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
                                      `platform_id` int NULL DEFAULT NULL,
                                      `sys_user_id` int NULL DEFAULT NULL,
                                      `is_copy` int NULL DEFAULT NULL,
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 554 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;



ALTER TABLE `t_case_fusion`
    ADD COLUMN `platform_id` int NULL AFTER `case_id`;
ALTER TABLE `t_case_fusion`
    ADD COLUMN `sys_user_id` int NULL AFTER `platform_id`;
ALTER TABLE `t_case_fusion`
    ADD COLUMN `lat_and_long` varchar(255) NULL AFTER `sys_user_id`;
ALTER TABLE `t_case_fusion`
    ADD COLUMN `offline_status` int NULL DEFAULT 0 NULL AFTER `lat_and_long`,
    ADD COLUMN `offline_path` varchar(255) NULL AFTER `offline_status`,
    ADD COLUMN `offline_start_time` varchar(255) NULL AFTER `offline_path`,
    ADD COLUMN `offline_end_time` varchar(255) NULL AFTER `offline_start_time`;


ALTER TABLE `t_case_settings`
    ADD COLUMN `fusion_id` int NULL AFTER `case_id`;

ALTER TABLE `t_hot_icon`
    ADD COLUMN `fusion_id` int NULL AFTER `case_id`;
ALTER TABLE `t_hot_icon`
    ADD COLUMN `parent_id` int NULL AFTER `fusion_id`;

ALTER TABLE `t_case_tag`
    ADD COLUMN `fusion_id` int NULL AFTER `case_id`;

ALTER TABLE `t_fusion_guide2`
    ADD COLUMN `fusion_id` int NULL AFTER `case_id`;

ALTER TABLE `t_case_path`
    ADD COLUMN `fusion_id` int NULL AFTER `case_id`;
ALTER TABLE `t_model2`
    ADD COLUMN `is_obj` int NULL AFTER `convert_type`;

ALTER TABLE `t_case_settings`
    ADD COLUMN `map_id` int NULL AFTER `rotate`;

ALTER TABLE `t_case_tag`
    ADD COLUMN `tq_status` int NULL AFTER `file_name`;

ALTER TABLE `t_case_tag`
    ADD COLUMN `tq_time` timestamp NULL AFTER `tq_status`;

ALTER TABLE `t_fusion_guide2`
    ADD COLUMN `show_taggings` int NULL AFTER `fusion_id`;

ALTER TABLE `t_fusion_guide2`
    ADD COLUMN `show_measure` int NULL AFTER `show_taggings`;

ALTER TABLE `t_fusion_guide2`
    ADD COLUMN `show_monitor` int NULL AFTER `show_measure`;

ALTER TABLE `t_fusion_guide2`
    ADD COLUMN `show_path` int NULL AFTER `show_monitor`;

ALTER TABLE `t_fusion_guide_path2`
    ADD COLUMN `play_animation` int NULL AFTER `pano_info`;