/*
 Navicat Premium Data Transfer

 Source Server         : 10.1.21.250
 Source Server Type    : MySQL
 Source Server Version : 100434
 Source Host           : 10.1.21.250:3306
 Source Schema         : ry-vue

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

 Date: 19/02/2025 15:00:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for work_order_info
-- ----------------------------
DROP TABLE IF EXISTS `work_order_info`;
CREATE TABLE `work_order_info`  (
                                    `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工单ID',
                                    `project_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所属项目',
                                    `repairer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '报修人员',
                                    `repairer_id` int(11) NOT NULL COMMENT '保修人员ID',
                                    `is_accident` tinyint(1) NOT NULL COMMENT '是否事故 (0: 否, 1: 是)',
                                    `response_level` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '响应级别 (0: 常规, 1: 紧急, 2: 特急)',
                                    `response_time` int(11) NOT NULL COMMENT '响应时限',
                                    `fault_category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '故障大类',
                                    `fault_subcategory` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '故障小类 (0: 电源故障, 1: 光缆故障, 2: 设备故障, 3: 监控故障, 4: 抓拍方向偏移, 5: 树枝遮挡, 6: 无图像, 7: 图像模糊)',
                                    `institution` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所属机构',
                                    `fault_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '故障地点',
                                    `fault_description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '故障描述',
                                    `fault_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '故障图片',
                                    `maintenance_requirement` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '维护要求 (0: 修复, 1: 新增, 2: 拆除, 3: 清除, 4: 其他)',
                                    `dispatch_opinion` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '派遣意见',
                                    `is_dispatched` tinyint(1) NULL DEFAULT NULL COMMENT '是否派遣 (0: 否, 1: 是)',
                                    `latitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
                                    `longitude` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
                                    `tenant_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '0' COMMENT '租户编号',
                                    `create_dept` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建部门',
                                    `create_time` timestamp(0) NULL DEFAULT current_timestamp(0) COMMENT '创建时间',
                                    `update_time` timestamp(0) NULL DEFAULT current_timestamp(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
                                    `create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
                                    `update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
                                    `status` tinyint(4) NULL DEFAULT 0 COMMENT '当前状态',
                                    `del_flag` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
                                    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工单信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of work_order_info
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;
