package cn.axzo.workflow.common.enums;

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

/**
 * 签署确认节点的审批人层级范围限制
 *
 * @author wangli
 * @since 2025-03-26 14:30
 */
public enum SignApproverRoleLimitEnum {
    LEADER("LEADER", "负责人"),
    ;

    private final String type;

    private final String desc;

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

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

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