/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80041
 Source Host           : localhost:3306
 Source Schema         : vwed_task

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

 Date: 12/10/2025 10:34:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for vwed_blockrecord
-- ----------------------------
DROP TABLE IF EXISTS `vwed_blockrecord`;
CREATE TABLE `vwed_blockrecord`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录ID',
  `block_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '块名称',
  `block_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '块ID',
  `block_config_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '块配置ID',
  `block_input_params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '块输入参数',
  `block_input_params_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '块输入参数值',
  `block_out_params_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '块输出参数值',
  `block_internal_variables` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '块内部变量',
  `block_execute_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '块执行名称',
  `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联的任务定义ID',
  `task_record_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联的任务记录ID',
  `started_on` datetime(6) NULL DEFAULT NULL COMMENT '开始时间',
  `ended_on` datetime(6) NULL DEFAULT NULL COMMENT '结束时间',
  `ended_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '结束原因',
  `status` int NULL DEFAULT NULL COMMENT '块执行状态, 1000: 执行成功, 1001: 执行中, 1006: 未执行, 2000: 执行失败, 2002: 取消',
  `ctrl_status` int NULL DEFAULT NULL COMMENT '控制状态',
  `input_params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '输入参数',
  `internal_variables` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内部变量',
  `output_params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '输出参数',
  `version` int NULL DEFAULT NULL COMMENT '版本号',
  `remark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  `created_at` datetime(6) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(6) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除（软删除标记）',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_vwed_blockrecord_status`(`status` ASC) USING BTREE,
  INDEX `idx_vwed_blockrecord_task_id`(`task_id` ASC) USING BTREE,
  INDEX `idx_vwed_blockrecord_created_at`(`created_at` ASC) USING BTREE,
  INDEX `idx_vwed_blockrecord_task_record_id`(`task_record_id` ASC) USING BTREE,
  INDEX `idx_vwed_blockrecord_block_id`(`block_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of vwed_blockrecord
-- ----------------------------
INSERT INTO `vwed_blockrecord` VALUES ('0ab3a7db-9351-473e-915d-8ab90ed0111f', 'b2', '5', '', '{\"group\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"keyRoute\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"priority\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"vehicle\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{\"group\": \"\", \"keyRoute\": \"AP1\", \"priority\": \"\", \"vehicle\": \"\"}', 'null', '{}', 'CSelectAgvBp', '571985c1-cfa5-4186-8acd-6e3868a5e08c', 'e7191efc-4af9-4068-9d6c-cd421585d94e', '2025-10-12 10:32:45.122590', '2025-10-12 10:33:31.576345', '选择执行机器人取消, 块id：b2', 2001, NULL, '{\"group\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"keyRoute\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"priority\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"vehicle\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{}', '{\"blocks\": {\"b2\": null}}', 1, '选择执行机器人取消, 块id：b2', '2025-10-12 10:32:45.122590', '2025-10-12 10:33:31.576345', 0);
INSERT INTO `vwed_blockrecord` VALUES ('4e2a1b76-72c7-46aa-8dec-60f57e00b226', 'sw_7adf6f31', '7adf6f31-aa74-46e5-b510-6adb75077a03', '', '{\"spin\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"targetSiteLabel\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"task\": {\"type\": \"Simple\", \"value\": \"pick\", \"required\": false}, \"inspired_unique\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"unique_file\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{\"spin\": \"\", \"targetSiteLabel\": \"AP1\", \"task\": \"pick\", \"inspired_unique\": \"\", \"unique_file\": \"\"}', '{}', '{\"agv_for_block_7adf6f31-aa74-46e5-b510-6adb75077a03\": \"1957714488472002562\", \"agv_for_sw_7adf6f31\": \"1957714488472002562\", \"agv_task_id_7adf6f31-aa74-46e5-b510-6adb75077a03\": \"1977200937445552130\", \"agv_for_block_9a272c7f-d5aa-4472-8223-80da5bcdaade\": \"1957714488472002562\", \"agv_for_sw_9a272c7f\": \"1957714488472002562\", \"agv_task_id_9a272c7f-d5aa-4472-8223-80da5bcdaade\": \"1977200937445552130\"}', 'CAgvOperationBp', '571985c1-cfa5-4186-8acd-6e3868a5e08c', 'e7191efc-4af9-4068-9d6c-cd421585d94e', '2025-10-12 10:33:33.077338', NULL, '执行中', 1001, NULL, '{\"spin\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"targetSiteLabel\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"task\": {\"type\": \"Simple\", \"value\": \"pick\", \"required\": false}, \"inspired_unique\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"unique_file\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{\'agv_for_block_7adf6f31-aa74-46e5-b510-6adb75077a03\': \'1957714488472002562\', \'agv_for_sw_7adf6f31\': \'1957714488472002562\', \'agv_task_id_7adf6f31-aa74-46e5-b510-6adb75077a03\': \'1977200937445552130\', \'agv_for_block_9a272c7f-d5aa-4472-8223-80da5bcdaade\': \'1957714488472002562\', \'agv_for_sw_9a272c7f\': \'1957714488472002562\', \'agv_task_id_9a272c7f-d5aa-4472-8223-80da5bcdaade\': \'1977200937445552130\'}', '{\"blocks\": {\"sw_7adf6f31\": {}}}', 1, '执行中', '2025-10-12 10:33:33.078337', '2025-10-12 10:33:33.088389', 0);
INSERT INTO `vwed_blockrecord` VALUES ('647c57ad-519e-44e6-9241-647f3d23b70c', '-1', '-1', '', '{}', '{}', 'null', '{}', 'RootBp', '571985c1-cfa5-4186-8acd-6e3868a5e08c', 'e7191efc-4af9-4068-9d6c-cd421585d94e', '2025-10-12 10:33:32.936198', NULL, '执行中', 1001, NULL, '{}', '{}', '{\"blocks\": {\"-1\": null}}', 1, '执行中', '2025-10-12 10:32:45.102830', '2025-10-12 10:33:32.944209', 0);
INSERT INTO `vwed_blockrecord` VALUES ('aa01eec9-1516-4ee7-8611-f23cc702476b', 'b4', '6', '', '{\"spin\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"targetSiteLabel\": {\"type\": \"Simple\", \"value\": \"AP23\", \"required\": true}, \"task\": {\"type\": \"Simple\", \"value\": \"drop\", \"required\": false}, \"inspired_unique\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{\"spin\": \"\", \"targetSiteLabel\": \"AP23\", \"task\": \"drop\", \"inspired_unique\": \"\"}', '{}', '{}', 'CAgvOperationBp', '571985c1-cfa5-4186-8acd-6e3868a5e08c', 'e7191efc-4af9-4068-9d6c-cd421585d94e', '2025-10-12 10:33:31.364462', '2025-10-12 10:33:31.364462', '换机器人终止: 机器人损坏', 2001, NULL, '{\"spin\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"targetSiteLabel\": {\"type\": \"Simple\", \"value\": \"AP23\", \"required\": true}, \"task\": {\"type\": \"Simple\", \"value\": \"drop\", \"required\": false}, \"inspired_unique\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}}', '{}', '{}', 1, '未执行即被终止: 机器人损坏', '2025-10-12 10:33:31.367463', '2025-10-12 10:33:31.367463', 0);
INSERT INTO `vwed_blockrecord` VALUES ('b3e4f8cd-12f7-4f14-9b55-5ff5b335af54', 'sw_1704fcf9', '1704fcf9-9953-4673-acda-7905a37e101b', '', '{\"group\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"keyRoute\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"priority\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"vehicle\": {\"value\": \"Fake-12\", \"type\": \"Simple\", \"required\": false}}', '{\"group\": \"\", \"keyRoute\": \"AP1\", \"priority\": \"\", \"vehicle\": \"Fake-12\"}', 'null', '{}', 'CSelectAgvBp', '571985c1-cfa5-4186-8acd-6e3868a5e08c', 'e7191efc-4af9-4068-9d6c-cd421585d94e', '2025-10-12 10:33:32.955213', NULL, '执行成功', 1000, NULL, '{\"group\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"keyRoute\": {\"type\": \"Simple\", \"value\": \"AP1\", \"required\": true}, \"priority\": {\"type\": \"Simple\", \"value\": \"\", \"required\": false}, \"vehicle\": {\"value\": \"Fake-12\", \"type\": \"Simple\", \"required\": false}}', '{}', '{\"blocks\": {\"sw_1704fcf9\": null}}', 1, '执行成功', '2025-10-12 10:33:32.956202', '2025-10-12 10:33:33.056648', 0);

SET FOREIGN_KEY_CHECKS = 1;
