package com.qmth.paper.library.common.enums;

import java.util.Objects;

/**
 * @Description: 机构类型enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/7/29
 */
public enum FlushCacheTypeEnum {

    SYS_SETTING("学校参数"),

    SYS_SETTING_GLOBAL("全局参数");

    private String title;

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

    public String getTitle() {
        return title;
    }

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