package com.prolog.rdc.tms.app.constant.enums;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

/**
 * 事件反馈状态枚举
 * @author hongbo.pan
 * @date 2023/1/17
 */
@AllArgsConstructor
@Getter
public enum EventFeedbackStatusEnum {

    CHECKING("10", "待审核"),
    CHECKED("20", "已审核"),
    INVALID("30", "作废"),
    ;

    private static Map<String, EventFeedbackStatusEnum> enumMap = Maps.newHashMap();
    private String code;
    private String desc;

    static {
        for(EventFeedbackStatusEnum as : EventFeedbackStatusEnum.values()) {
            enumMap.put(as.code, as);
        }
    }

    public static EventFeedbackStatusEnum getByCode(String code) {
        return  enumMap.get(code);
    }

}
