package com.njcn.enums;

/**
 * @Auther denghuajun
 * @Date 2021/8/27
 * @describe
 */
public enum TerminalLogsEnum {
    webUser("6de42219-1a0f-4ccc-891c-748c9215f4c6","web新增用户日志"),
    appUser("3eecef8d-3bcd-41f6-b487-83922b4bcdc8","app新增用户日志"),
    flowLogs("384b20f1-6374-4d75-b873-385b8c2e743f","流量日志"),
    deviceLogs("36512048-d98a-4d80-afaf-ca8b3618553a","终端状态日志"),
    lineLogs("3035bd96-69dd-42f2-a298-471c08d51c87","监测点参数日志"),
    constantValueOutLog("e33387f2-ad59-4af6-9318-2e40456bca27","外部定值下发日志"),
    constantValueInLog("1bbb8c65-60ff-4cd0-bb17-aa5dad4268d4","内部定值下发日志"),
    versonDevLog("7f65a99f-449a-47fa-9358-27334a535645","版本下装日志"),
    repairInteginte("8d94c745-d093-4588-9f81-86323397d110","监测点数据完整性补招")
    ;
    private String terminalIndex;

    private String name;

    public String getTerminalIndex() {
        return terminalIndex;
    }

    public void setTerminalIndex(String terminalIndex) {
        this.terminalIndex = terminalIndex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    TerminalLogsEnum(String terminalIndex, String name){
        this.terminalIndex=terminalIndex;
        this.name=name;
    }

    public static String getValue(String type) {
        TerminalLogsEnum[] carTypeEnums = values();
        for (TerminalLogsEnum carTypeEnum : carTypeEnums) {
            if (carTypeEnum.getTerminalIndex().equals(type)) {
                return carTypeEnum.getName();
            }
        }
        return null;
    }

    public static String getType(String desc) {
        TerminalLogsEnum[] carTypeEnums = values();
        for (TerminalLogsEnum carTypeEnum : carTypeEnums) {
            if (carTypeEnum.getName().equals(desc)) {
                return carTypeEnum.getTerminalIndex();
            }
        }
        return null;
    }

}
