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

import java.util.Objects;

/**
 * @Description: 授权配置类型
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/4/26
 */
public enum AuthEnum {

    ON_LINE("在线激活"),

    OFF_LINE("离线激活");

    AuthEnum(String title) {
        this.title = title;
    }

    private String title;

    public String getTitle() {
        return title;
    }

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