/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50743
 Source Host           : 127.0.0.1:3309
 Source Schema         : zero_v5

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

 Date: 10/07/2025 00:07:09
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for workflow_node_record
-- ----------------------------
DROP TABLE IF EXISTS `workflow_node_record`;
CREATE TABLE `workflow_node_record`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务id',
  `f_node_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点id',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编码',
  `f_node_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点名称',
  `f_node_status` int(11) NULL DEFAULT NULL COMMENT '节点状态',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '节点流转' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_node_record
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_operator
-- ----------------------------
DROP TABLE IF EXISTS `workflow_operator`;
CREATE TABLE `workflow_operator`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_node_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点名称',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编码',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务id',
  `f_node_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点id（对应引擎的任务id）',
  `f_parent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '加签经办父级id',
  `f_handle_time` datetime NULL DEFAULT NULL COMMENT '处理时间',
  `f_handle_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人id',
  `f_handle_all` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '全部处理人',
  `f_handle_status` int(11) NULL DEFAULT NULL COMMENT '处理状态',
  `f_handle_parameter` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理参数',
  `f_start_handle_time` datetime NULL DEFAULT NULL COMMENT '开始处理时间',
  `f_duedate` datetime NULL DEFAULT NULL COMMENT '截止时间',
  `f_sign_time` datetime NULL DEFAULT NULL COMMENT '签收时间',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态',
  `f_instance_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程引擎任务id',
  `f_engine_type` int(11) NULL DEFAULT NULL COMMENT '流程引擎类型;1.flowable,2,activity,3.canmda',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  `f_draft_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '草稿数据',
  `f_completion` int(11) NULL DEFAULT NULL COMMENT '是否完成',
  `f_is_processing` int(11) NULL DEFAULT NULL COMMENT '是否办理节点(0否 1是)',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE,
  INDEX `i_fto_fhi`(`f_node_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程经办' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_operator
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_record
-- ----------------------------
DROP TABLE IF EXISTS `workflow_record`;
CREATE TABLE `workflow_record`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务主键',
  `f_operator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经办主键',
  `f_node_id` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点id',
  `f_node_code` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编号',
  `f_node_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点名称',
  `f_handle_type` int(11) NULL DEFAULT NULL COMMENT '经办类型',
  `f_handle_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经办人员',
  `f_handle_time` datetime NULL DEFAULT NULL COMMENT '经办时间',
  `f_handle_opinion` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经办理由',
  `f_handle_user_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流转操作人',
  `f_sign_img` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '签名图片',
  `f_file_list` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '经办文件',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态',
  `f_expand_field` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '拓展字段',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE,
  INDEX `i_ftor_ftid`(`f_task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程记录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_record
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_reject_data
-- ----------------------------
DROP TABLE IF EXISTS `workflow_reject_data`;
CREATE TABLE `workflow_reject_data`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_task_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '任务json',
  `f_operator_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '经办json',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编码',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '冻结审批' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_reject_data
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_revoke
-- ----------------------------
DROP TABLE IF EXISTS `workflow_revoke`;
CREATE TABLE `workflow_revoke`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务主键',
  `f_revoke_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '撤销任务主键',
  `f_form_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '表单数据',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程撤销' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_revoke
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_subtask_data
-- ----------------------------
DROP TABLE IF EXISTS `workflow_subtask_data`;
CREATE TABLE `workflow_subtask_data`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_subtask_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '子流程发起参数',
  `f_parent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父流程id',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编码',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '子流程发起参数(依次发起)' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_subtask_data
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_task
-- ----------------------------
DROP TABLE IF EXISTS `workflow_task`;
CREATE TABLE `workflow_task`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_en_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号',
  `f_full_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  `f_flow_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程名称',
  `f_flow_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程编号',
  `f_flow_category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程分类',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态',
  `f_flow_type` int(11) NULL DEFAULT NULL COMMENT '流程类型',
  `f_flow_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程版本',
  `f_is_async` int(11) NULL DEFAULT NULL COMMENT '同步异步（0：同步，1：异步）',
  `f_sub_parameter` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子流程参数',
  `f_parent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父级实例id',
  `f_urgent` int(11) NULL DEFAULT NULL COMMENT '紧急程度',
  `f_template_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程主键',
  `f_flow_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程版本主键',
  `f_instance_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程引擎实例id',
  `f_engine_type` int(11) NULL DEFAULT NULL COMMENT '流程引擎类型;1.flowable,2,activity,3.canmda',
  `f_delegate_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '委托用户',
  `f_start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `f_end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `f_current_node_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前节点名称',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  `f_engine_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程引擎id',
  `f_current_node_code` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前节点编码',
  `f_reject_data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '冻结审批',
  `f_sub_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子流程节点编码',
  `f_global_parameter` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '全局参数',
  `f_his_status` int(11) NULL DEFAULT NULL COMMENT '历史状态',
  `f_restore` int(11) NULL DEFAULT NULL COMMENT '是否能恢复（0：能，1：不能）',
  `f_is_file` int(11) NULL DEFAULT NULL COMMENT '是否归档（null：未配置，0：未归档，1：已归档）',
  `f_type` int(11) NULL DEFAULT NULL COMMENT '类型(0-功能 1-发起)',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程任务' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_task
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_task_line
-- ----------------------------
DROP TABLE IF EXISTS `workflow_task_line`;
CREATE TABLE `workflow_task_line`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务主键',
  `f_line_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '线的键',
  `f_line_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '线的值',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务条件' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_task_line
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_template
-- ----------------------------
DROP TABLE IF EXISTS `workflow_template`;
CREATE TABLE `workflow_template`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_flow_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程主版本id',
  `f_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程主版本',
  `f_en_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程编码',
  `f_full_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程名称',
  `f_type` int(11) NULL DEFAULT NULL COMMENT '流程类型',
  `f_category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程分类',
  `f_icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标',
  `f_icon_background` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标背景色',
  `f_configuration` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '流程参数设置',
  `f_activiti_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'activiti部署id',
  `f_flowable_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'flowable部署id',
  `f_camunda_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'camunda部署id',
  `f_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述或说明',
  `f_enabled_mark` int(11) NULL DEFAULT NULL COMMENT '有效标志(0-禁用，1-启用)',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  `f_visible_type` int(11) NULL DEFAULT NULL COMMENT '流程权限（1全局  2权限）',
  `f_flow_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '流程设置',
  `f_show_type` int(11) NULL DEFAULT NULL COMMENT '流程显示类型（0-全局 1-流程 2-菜单）',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态(0.未上架,1.上架,2.下架-继续审批，3.下架-隐藏审批)',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程定义' ROW_FORMAT = DYNAMIC;


-- ----------------------------
-- Table structure for workflow_trigger_record
-- ----------------------------
DROP TABLE IF EXISTS `workflow_trigger_record`;
CREATE TABLE `workflow_trigger_record`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_trigger_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '触发主键',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准任务主键',
  `f_node_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点id',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编号',
  `f_node_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点名称',
  `f_start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `f_end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态（0-通过 1-异常）',
  `f_error_tip` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '错误提示',
  `f_error_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '错误数据',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE,
  INDEX `i_ftor_ftid`(`f_task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '触发记录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_trigger_record
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_trigger_task
-- ----------------------------
DROP TABLE IF EXISTS `workflow_trigger_task`;
CREATE TABLE `workflow_trigger_task`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务名称',
  `f_parent_time` datetime NULL DEFAULT NULL COMMENT '重试任务开始时间',
  `f_parent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '重试任务主键id',
  `f_task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准任务主键',
  `f_node_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点编码',
  `f_node_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点id',
  `f_is_async` int(11) NULL DEFAULT NULL COMMENT '0-同步 1-异步',
  `f_start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `f_flow_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模板id',
  `f_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '数据',
  `f_data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据主键',
  `f_instance_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '引擎主键',
  `f_engine_type` int(11) NULL DEFAULT NULL COMMENT '流程引擎类型;1.flowable,2,activity,3.canmda',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态(0-进行中 1-通过 2-异常 3-终止)',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '触发任务' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of workflow_trigger_task
-- ----------------------------

-- ----------------------------
-- Table structure for workflow_version
-- ----------------------------
DROP TABLE IF EXISTS `workflow_version`;
CREATE TABLE `workflow_version`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_template_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程定义主键',
  `f_flowable_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'flowable部署id',
  `f_activiti_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'activiti部署id',
  `f_camunda_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'camunda部署id',
  `f_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程版本',
  `f_xml` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '流程xml',
  `f_status` int(11) NULL DEFAULT NULL COMMENT '状态(0.设计,1.启用,2.历史)',
  `f_sort_code` bigint(20) NULL DEFAULT NULL COMMENT '排序',
  `f_send_config_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '消息配置id',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int(11) NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`f_id`, `f_tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '流程定义版本' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;