package com.qmth.teachcloud.common.enums;

import java.util.Objects;

/**
 * @Description: app应用来源
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/6/29
 */
public enum AppSourceEnum {

    SYSTEM("自身应用系统"),

    WHU_THIRD("武汉大学"),

    PRINT_THIRD("知学知考-分布式印刷");

    private String title;

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

    public String getTitle() {
        return title;
    }

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