package cn.axzo.workflow.common.enums;

import java.util.Arrays;
import java.util.Objects;

/**
 * 签署方式
 *
 * @author wangli
 * @since 2025-03-25 17:00
 */
public enum BpmnSignType {

    SINGLE("SINGLE", "指定人群，所有人共同签署一份文件"),
    MULTI("MULTI", "指定人群，每人签署一份文件"),
    ;

    private final String type;
    private final String desc;

    BpmnSignType(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public String getType() {
        return type;
    }


    public String getDesc() {
        return desc;
    }

    public static BpmnSignType valueOfType(String type) {
        return Arrays.stream(BpmnSignType.values())
                .filter(i -> Objects.equals(i.getType(), type))
                .findAny()
                .orElse(null);
    }

}
