package com.qmth.distributed.print.business.enums;

import java.util.Objects;

/**
 * @Description: 自定义流程发起人指定选择人数
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/1/21
 */
public enum CustomFlowApproveUserCountTypeEnum {

    ONE("一个"),

    MORE("多个");

    private String title;

    private CustomFlowApproveUserCountTypeEnum(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    /**
     * 状态转换 toName
     *
     * @param title
     * @return
     */
    public static String convertToName(String title) {
        for (CustomFlowApproveUserCountTypeEnum e : CustomFlowApproveUserCountTypeEnum.values()) {
            if (Objects.equals(title, e.getTitle())) {
                return e.name();
            }
        }
        return null;
    }
}
