package com.reyun.saas.common.constants;


public enum WorkOrderExportEnum {

    //工单导出状态
    EXPORT_INIT("init","等待导出"),
    EXPORT_DOWNLOADING("downloading", "正在导出"),
    EXPORT_COMPLETE("complete", "导出完成"),
    EXPORT_FAILED("failed", "导出失败"),
    EXPORT_FILE_PAST("filePast","文件过期"),

    //工单类型
    TYPE_LOG("log","日志"),
    TYPE_REPORT("report","报表"),

    //所属模块
    MODEL_EQUIPMENT_INFO("equipmentInfo","设备信息"),
    MODEL_DATA_BOARD("dataBoard","数据看板"),
    MODEL_DATA_INFO("dataInfo","数据详情"),
    MODEL_FLOW_INFO("flowInfo","流量详情"),

    //报表对应的名称
    REPORT_CHANNEL_QUALITY_TOP("channel_quality_top","渠道质量排行");



    String code;
    String name;

    WorkOrderExportEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getNameByCode(String code) {
        WorkOrderExportEnum[] workOrderExportEnums = values();
        for (WorkOrderExportEnum workOrderExportEnum : workOrderExportEnums) {
            if (workOrderExportEnum.getCode().equals(code)) {
                return workOrderExportEnum.getName();
            }
        }
        return null;
    }
}
