CREATE TABLE `mes_pro_task_pause_record` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `task_id` bigint(20) NOT NULL COMMENT '任务编号',
  `work_order_id` bigint(20) DEFAULT NULL COMMENT '工单编号',
  `workstation_id` bigint(20) DEFAULT NULL COMMENT '工作站编号',
  `reason` varchar(255) NOT NULL COMMENT '停工原因',
  `pause_time` datetime NOT NULL COMMENT '停工时间',
  `pause_user_id` bigint(20) NOT NULL COMMENT '停工操作人ID',
  `resume_time` datetime DEFAULT NULL COMMENT '复工时间',
  `resume_user_id` bigint(20) DEFAULT NULL COMMENT '复工操作人ID',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  `tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_task_id` (`task_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='生产任务停工记录表';
