create table flow_his_task ( id bigint not null comment '主键id' primary key, definition_id bigint not null comment '对应flow_definition表的id', instance_id bigint not null comment '对应flow_instance表的id', task_id bigint not null comment '对应flow_task表的id', node_code varchar(100) null comment '开始节点编码', node_name varchar(100) null comment '开始节点名称', node_type tinyint(1) null comment '开始节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)', target_node_code varchar(200) null comment '目标节点编码', target_node_name varchar(200) null comment '结束节点名称', approver varchar(40) null comment '审批者', cooperate_type tinyint(1) default 0 not null comment '协作方式(1审批 2转办 3委派 4会签 5票签 6加签 7减签)', collaborator varchar(40) null comment '协作人', skip_type varchar(10) not null comment '流转类型(PASS通过 REJECT退回 NONE无动作)', flow_status varchar(20) not null comment '流程状态(0待提交 1审批中 2审批通过 4终止 5作废 6撤销 8已完成 9已退回 10失效 11拿回)', form_custom char default 'N' null comment '审批表单是否自定义(Y是 N否)', form_path varchar(100) null comment '审批表单路径', message varchar(500) null comment '审批意见', variable text null comment '任务变量', ext text null comment '业务详情 存业务表对象json字符串', create_time datetime null comment '任务开始时间', update_time datetime null comment '审批完成时间', del_flag char default '0' null comment '删除标志', tenant_id varchar(40) null comment '租户id' ) comment '历史任务记录表';