package com.tofly.gpsboot.common.system;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.StringUtils;

/**
 * 隐患上报类型
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum TroubleReportTypeEnum {
    /**
     *
     */
    TROUBLE_REPORT_TYPE_MOBILE_TERMINAL_SCENE("0","手机端现场上报"),
    TROUBLE_REPORT_TYPE_INDUSTRY("1","内业上报"),

    ;
    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;
    public static String getCodeForValue(String code) {
        String path = "";
        if (StringUtils.isEmpty(code)) {
            return path;
        }

        for (TroubleReportTypeEnum e : TroubleReportTypeEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                path = e.value;
                break;
            }
        }
        return path;
    }
}
