package cn.fateverse.workflow.entity.bo;

import lombok.Builder;
import lombok.Data;

import java.util.Map;

/**
 * 流程参数业务数数据
 *
 * @author Clay
 * @date 2023/1/11
 */
@Data
@Builder
public class VariablesBo {
    //流程中携带的参数信息
    private Map<String, Object> variables;
    //是否进行了表单权限的过滤
    private Boolean flag;


    public static VariablesBo ok(Map<String, Object> variables) {
        return VariablesBo.builder()
                .variables(variables)
                .flag(Boolean.TRUE)
                .build();
    }

    public static VariablesBo no(Map<String, Object> variables) {
        return VariablesBo.builder()
                .variables(variables)
                .flag(Boolean.FALSE)
                .build();
    }
}
