-- ----------------------------
-- Table structure for t_dict
-- ----------------------------
DROP TABLE IF EXISTS `t_dict`;
CREATE TABLE `t_dict`  (
                           `id` int NOT NULL AUTO_INCREMENT,
                           `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,
                           `parent_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,
                           PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_dict
-- ----------------------------
INSERT INTO `t_dict` VALUES (1, '正常维修', 'repair-type', NULL, 'A', '2025-01-16 14:44:03', '2025-01-16 14:52:19');
INSERT INTO `t_dict` VALUES (2, '退换货维修', 'repair-type', NULL, 'A', '2025-01-16 14:44:08', '2025-01-16 14:52:19');
INSERT INTO `t_dict` VALUES (3, '内部维修', 'repair-type', NULL, 'A', '2025-01-16 14:44:11', '2025-01-16 14:52:19');
INSERT INTO `t_dict` VALUES (6, '相机', 'repair-item', NULL, 'A', '2025-01-16 14:51:05', '2025-01-16 14:51:58');
INSERT INTO `t_dict` VALUES (7, '配件', 'repair-item', NULL, 'A', '2025-01-16 14:51:10', '2025-01-16 14:52:00');
INSERT INTO `t_dict` VALUES (8, '四维看看', 'repair-item', 6, 'A', '2025-01-16 14:52:30', '2025-01-16 14:54:52');
INSERT INTO `t_dict` VALUES (9, '四维看见', 'repair-item', 6, 'A', '2025-01-16 14:52:35', '2025-01-16 14:54:52');
INSERT INTO `t_dict` VALUES (10, '四维深光', 'repair-item', 6, 'A', '2025-01-16 14:52:41', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (11, '四维深时', 'repair-item', 6, 'A', '2025-01-16 14:52:47', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (12, 'RTK', 'repair-item', 7, 'A', '2025-01-16 14:53:06', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (13, '补光灯', 'repair-item', 7, 'A', '2025-01-16 14:53:11', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (14, '看看三脚架', 'repair-item', 7, 'A', '2025-01-16 14:53:19', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (15, '看见三脚架', 'repair-item', 7, 'A', '2025-01-16 14:53:26', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (16, '深光三脚架', 'repair-item', 7, 'A', '2025-01-16 14:53:34', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (17, '深时三脚架', 'repair-item', 7, 'A', '2025-01-16 14:53:42', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (18, '滑轮', 'repair-item', 7, 'A', '2025-01-16 14:53:51', '2025-01-16 14:54:55');
INSERT INTO `t_dict` VALUES (19, '镜头报错', 'fault-type', NULL, 'A', '2025-01-16 15:31:27', '2025-01-16 15:32:14');
INSERT INTO `t_dict` VALUES (20, '拍摄图像异常', 'fault-type', NULL, 'A', '2025-01-16 15:32:34', '2025-01-16 15:38:00');
INSERT INTO `t_dict` VALUES (21, '无法正常开机', 'fault-type', NULL, 'A', '2025-01-16 15:32:39', '2025-01-16 15:38:00');
INSERT INTO `t_dict` VALUES (22, '内部异响', 'fault-type', NULL, 'A', '2025-01-16 15:32:45', '2025-01-16 15:38:00');
INSERT INTO `t_dict` VALUES (23, '相机外观', 'fault-type', NULL, 'A', '2025-01-16 15:32:49', '2025-01-16 15:38:00');
INSERT INTO `t_dict` VALUES (24, '其他类型', 'fault-type', NULL, 'A', '2025-01-16 15:32:54', '2025-01-16 15:38:01');
INSERT INTO `t_dict` VALUES (25, '排线松脱', 'fault-type', 19, 'A', '2025-01-16 15:33:13', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (26, '镜头板故障', 'fault-type', 19, 'A', '2025-01-16 15:33:26', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (27, 'FPGA板与主板不匹配', 'fault-type', 19, 'A', '2025-01-16 15:33:39', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (28, '摔落破损', 'fault-type', 19, 'A', '2025-01-16 15:34:04', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (29, '排线破损', 'fault-type', 19, 'A', '2025-01-16 15:34:09', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (30, 'FPGA板接口破损', 'fault-type', 19, 'A', '2025-01-16 15:34:22', '2025-01-16 15:38:44');
INSERT INTO `t_dict` VALUES (31, '镜头断裂', 'fault-type', 20, 'A', '2025-01-16 15:34:29', '2025-01-16 15:38:55');
INSERT INTO `t_dict` VALUES (32, '镜头松动失焦', 'fault-type', 20, 'A', '2025-01-16 15:34:43', '2025-01-16 15:38:55');
INSERT INTO `t_dict` VALUES (33, '镜头成像异常（发红，发黑）', 'fault-type', 20, 'A', '2025-01-16 15:34:59', '2025-01-16 15:38:55');
INSERT INTO `t_dict` VALUES (34, '拼接异常（标定）', 'fault-type', 20, 'A', '2025-01-16 15:35:14', '2025-01-16 15:38:55');
INSERT INTO `t_dict` VALUES (35, '电池硬件版本不符', 'fault-type', 21, 'A', '2025-01-16 15:35:30', '2025-01-16 15:39:03');
INSERT INTO `t_dict` VALUES (36, '电池老化', 'fault-type', 21, 'A', '2025-01-16 15:35:36', '2025-01-16 15:39:03');
INSERT INTO `t_dict` VALUES (37, '开机卡LOGO', 'fault-type', 21, 'A', '2025-01-16 15:35:42', '2025-01-16 15:39:03');
INSERT INTO `t_dict` VALUES (38, '开机自动关机', 'fault-type', 21, 'A', '2025-01-16 15:35:53', '2025-01-16 15:39:03');
INSERT INTO `t_dict` VALUES (39, '风扇排线过长', 'fault-type', 22, 'A', '2025-01-16 15:36:06', '2025-01-16 15:39:15');
INSERT INTO `t_dict` VALUES (40, '风扇断裂', 'fault-type', 22, 'A', '2025-01-16 15:36:14', '2025-01-16 15:39:15');
INSERT INTO `t_dict` VALUES (41, '内部螺丝断裂脱落', 'fault-type', 22, 'A', '2025-01-16 15:36:26', '2025-01-16 15:39:15');
INSERT INTO `t_dict` VALUES (42, '外壳破损', 'fault-type', 23, 'A', '2025-01-16 15:36:40', '2025-01-16 15:39:29');
INSERT INTO `t_dict` VALUES (43, '镜头刮花', 'fault-type', 23, 'A', '2025-01-16 15:36:47', '2025-01-16 15:39:29');
INSERT INTO `t_dict` VALUES (44, '前盖刮花', 'fault-type', 23, 'A', '2025-01-16 15:36:54', '2025-01-16 15:39:29');
INSERT INTO `t_dict` VALUES (45, '后盖刮花', 'fault-type', 23, 'A', '2025-01-16 15:37:00', '2025-01-16 15:39:29');
INSERT INTO `t_dict` VALUES (46, '镜头圈丢失', 'fault-type', 23, 'A', '2025-01-16 15:37:07', '2025-01-16 15:39:29');
INSERT INTO `t_dict` VALUES (47, '无法搜索到WIFI', 'fault-type', 24, 'A', '2025-01-16 15:37:18', '2025-01-16 15:39:35');
INSERT INTO `t_dict` VALUES (48, 'WIFI无法连接', 'fault-type', 24, 'A', '2025-01-16 15:37:26', '2025-01-16 15:39:35');
INSERT INTO `t_dict` VALUES (49, '故障不再现', 'fault-type', 24, 'A', '2025-01-16 15:37:36', '2025-01-16 15:39:35');
INSERT INTO `t_dict` VALUES (50, '显示屏故障', 'fault-type', 24, 'A', '2025-01-16 15:37:41', '2025-01-16 15:39:35');
INSERT INTO `t_dict` VALUES (51, '无法充电', 'fault-type', 24, 'A', '2025-01-16 15:37:45', '2025-01-16 15:39:35');

ALTER TABLE `4dkankan_v4_sale`.`t_repair`
    ADD COLUMN `repair_type` varchar(255) NULL AFTER `cancel_remark`,
    ADD COLUMN `repair_item` varchar(255) NULL AFTER `repair_type`;

ALTER TABLE `4dkankan_v4_sale`.`t_repair_register`
    ADD COLUMN `fault_type` varchar(255) NULL AFTER `define_damage`;


ALTER TABLE `4dkankan_v4_sale`.`t_repair`
    ADD COLUMN `fault_version` varchar(255) NULL DEFAULT 'V1' AFTER `repair_item`;