ALTER TABLE `negative`.`negative`
    ADD COLUMN `countersign_apply_id` int;

INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (21, 'apply_countersign', 'second_approve', NULL, '单位会签', 'primary', 1, 1, '发起会签', 0, NULL, 1);
INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (22, 'countersign', 'countersign', NULL, '提交会签', 'primary', 0, 1, '提交会签', 1, 1, 0);
INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (23, 'apply_countersign', 'first_approve', '', '单位会签', 'primary', 1, 1, '发起会签', 0, NULL, 1);


CREATE TABLE `negative_countersign` (
                                        `id` int NOT NULL AUTO_INCREMENT,
                                        `countersign_apply_id` int NOT NULL,
                                        `negative_id` varchar(40)  NOT NULL,
                                        `comments` text ,
                                        `files` text ,
                                        `depart_id` varchar(40)  DEFAULT NULL,
                                        `depart_name` varchar(255)  DEFAULT NULL,
                                        `create_time` datetime DEFAULT NULL,
                                        `creator` varchar(255)  DEFAULT NULL,
                                        `creator_name` varchar(255)  DEFAULT NULL,
                                        `state` varchar(255)  DEFAULT NULL,
                                        `update_time` datetime DEFAULT NULL,
                                        PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1  COMMENT='单位会签表';

CREATE TABLE `negative_countersign_apply` (
                                              `id` int NOT NULL AUTO_INCREMENT,
                                              `negative_id` varchar(40)  NOT NULL,
                                              `requirement` text  NOT NULL,
                                              `create_time` datetime NOT NULL,
                                              `creator` varchar(255) CHARACTER SET utf8mb4  DEFAULT NULL,
                                              `creator_name` varchar(255) CHARACTER SET utf8mb4  DEFAULT NULL,
                                              `create_depart_name` varchar(255)  DEFAULT NULL,
                                              PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1  COMMENT='单位会签申请表';