package com.qmth.teachcloud.exchange.common.enums.flow;

import java.util.Objects;

/**
 * @Description: 自定义流程类型enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/1/24
 */
public enum TFCustomModelTypeEnum {

    USER_FIXED("指定人员"),

    APPROVE_SET("发起人指定");

    private String title;

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

    public String getTitle() {
        return title;
    }

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