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

import java.util.Objects;

/**
 * @Description: 日志系统枚举
 * @Author: CaoZixuan
 * @Date: 2022-02-14
 */
public enum SystemEnum {
    DISTRIBUTED_PRINT("分布式印刷系统日志"),
    TEACH_CLOUD_REPORT("教研分析系统日志"),
    ;
    private final String desc;

    SystemEnum(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

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