package com.openhis.common.enums.ybenums;

import com.github.pagehelper.util.StringUtil;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 反馈类型
 *
 * @author Thanking
 */
@Getter
@AllArgsConstructor
public enum YbWarnType {

    /**
     * 事前
     */
    PRE("1", "事前"),
    /**
     * 事中
     */
    MID("2", "事中");

    private String value;
    private String description;

    public static YbWarnType getByValue(String value) {
        if (StringUtil.isEmpty(value)) {
            return null;
        }
        for (YbWarnType val : values()) {
            if (val.getValue().equals(value)) {
                return val;
            }
        }
        return null;
    }
}
