INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
                         `is_open`, `remark`, `is_deleted`, `belong_application`, `keep_alive`)
VALUES (1123598815738675201, 0, 'desk', '工作台', 'desk', '/console/desk', 'iconfont saber-gongzuotai', 1, 0, 0, 1,
        NULL,
        0, 'CPS', 1);

DROP TABLE IF EXISTS `blade_workbench_card`;
CREATE TABLE `blade_workbench_card`
(
    `id`           bigint(0)                                                    NOT NULL COMMENT '主键',
    `status`       tinyint(0) UNSIGNED                                          NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`   int(0)                                                       NULL DEFAULT NULL,
    `create_user`  bigint(0)                                                    NULL DEFAULT NULL COMMENT '创建人',
    `create_dept`  bigint(0)                                                    NULL DEFAULT NULL COMMENT '创建部门',
    `create_time`  datetime(0)                                                  NULL DEFAULT NULL COMMENT '创建时间',
    `update_user`  bigint(0)                                                    NULL DEFAULT NULL COMMENT '更新人',
    `update_time`  datetime(0)                                                  NULL DEFAULT NULL COMMENT '更新时间',
    `tenant_id`    varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属租户',
    `workbench_id` bigint(0)                                                    NULL DEFAULT NULL COMMENT '工作台id',
    `card_length`  varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长',
    `card_wide`    varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '宽',
    `x_coordinate` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'x轴坐标',
    `y_coordinate` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'y轴坐标',
    `card_key`     varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '卡片key',
    `api_resource` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL DEFAULT NULL COMMENT '接口api',
    `text_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL COMMENT '文本内容',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '工作台卡片'
  ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS `blade_workbench`;
CREATE TABLE `blade_workbench`
(
    `id`           bigint(0)                                                     NOT NULL COMMENT '主键',
    `status`       tinyint(0)                                                    NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`   int(0)                                                        NULL DEFAULT NULL COMMENT '删除',
    `create_user`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
    `create_dept`  bigint(0)                                                     NULL DEFAULT NULL COMMENT '创建部门',
    `create_time`  datetime(0)                                                   NULL DEFAULT NULL COMMENT '创建时间',
    `update_user`  bigint(0)                                                     NULL DEFAULT NULL COMMENT '更新人',
    `update_time`  datetime(0)                                                   NULL DEFAULT NULL COMMENT '更新时间',
    `tenant_id`    varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT '0' COMMENT '租户',
    `name`         varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作台名称',
    `sort`         int(0)                                                        NULL DEFAULT NULL COMMENT '排序',
    `picture_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片展示',
    `is_system`    int(0)                                                        NULL DEFAULT 0 COMMENT '是否自动生成',
    `user_name`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人姓名',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '工作台'
  ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS `blade_workbench_template_card`;
CREATE TABLE `blade_workbench_template_card`
(
    `id`           bigint(0)                                                     NOT NULL COMMENT '主键',
    `workbench_id` bigint(0)                                                     NULL DEFAULT NULL COMMENT '工作台模板',
    `card_length`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长',
    `card_wide`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '宽',
    `x_coordinate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'x轴坐标',
    `y_coordinate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'y轴坐标',
    `card_key`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '卡片key',
    `api_resource` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci     NULL DEFAULT NULL COMMENT '接口api',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '工作台模板卡片'
  ROW_FORMAT = Dynamic;

INSERT INTO `blade_workbench_template_card`
VALUES (1507258432602804225, 1506904783898030081, '5', '3', '0', '0', 'Access', NULL),
       (1507258432602804226, 1506904783898030081, '5', '6', '3', '0', 'deskNotice', NULL),
       (1507258432602804227, 1506904783898030081, '5', '3', '9', '7', 'Entrance', NULL),
       (1507258432602804228, 1506904783898030081, '7', '9', '0', '5', 'Guide', NULL),
       (1507258432665718785, 1506904783898030081, '7', '3', '9', '0', 'Weather', NULL);

DROP TABLE IF EXISTS `blade_workbench_template`;
CREATE TABLE `blade_workbench_template`
(
    `id`           bigint(0)                                                     NOT NULL COMMENT '主键',
    `name`         varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作台名称',
    `sort`         int(0)                                                        NULL DEFAULT NULL COMMENT '排序',
    `picture_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片展示',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '工作台模板'
  ROW_FORMAT = Dynamic;

INSERT INTO `blade_workbench_template`
VALUES (1506904783898030081, '欢迎使用', 1, NULL);

INSERT INTO `blade_workbench_card`(`id`, `status`, `is_deleted`, `create_user`, `create_dept`,
                                   `create_time`, `update_user`, `update_time`, `tenant_id`,
                                   `workbench_id`, `card_length`, `card_wide`, `x_coordinate`,
                                   `y_coordinate`, `card_key`, `api_resource`, `text_content`)
VALUES (1508346412835901442, 1, 0, 1123598821738675201, 1123598813738675201, '2022-03-28 15:33:03', 1123598821738675201,
        '2022-03-28 15:33:03', '000000', 1506904783898030081, '5', '3', '0', '0', 'Access', '', ''),
       (1508346412848484354, 1, 0, 1123598821738675201, 1123598813738675201, '2022-03-28 15:33:03', 1123598821738675201,
        '2022-03-28 15:33:03', '000000', 1506904783898030081, '5', '6', '3', '0', 'deskNotice', '', ''),
       (1508346412852678657, 1, 0, 1123598821738675201, 1123598813738675201, '2022-03-28 15:33:03', 1123598821738675201,
        '2022-03-28 15:33:03', '000000', 1506904783898030081, '5', '3', '9', '7', 'Entrance', '', ''),
       (1508346412856872961, 1, 0, 1123598821738675201, 1123598813738675201, '2022-03-28 15:33:03', 1123598821738675201,
        '2022-03-28 15:33:03', '000000', 1506904783898030081, '7', '3', '9', '0', 'Weather', '', ''),
       (1508346412861067266, 1, 0, 1123598821738675201, 1123598813738675201, '2022-03-28 15:33:03', 1123598821738675201,
        '2022-03-28 15:33:03', '000000', 1506904783898030081, '7', '9', '0', '5', 'Guide', '', '');
INSERT INTO `blade_workbench`(`id`, `status`, `is_deleted`, `create_user`, `create_dept`, `create_time`, `update_user`,
                              `update_time`, `tenant_id`, `name`, `sort`, `picture_link`, `is_system`, `user_name`)
VALUES (1506904783898030081, 1, 0, '1123598821738675201', 1123598813738675201, '2022-03-24 16:04:32', NULL, NULL,
        '000000', '欢迎使用', 1, NULL, 1, '系统创建');
