package net.northking.cctp.testbug.enums;

/**
 * @author: puchao.ma
 * @date: 2021/10/11 16:01
 */
public enum Emergency {

    HIGH("1", "高"),
    MIDDLE("2", "中"),
    LOW("3", "低");

    private final String code;

    private final String msg;

    Emergency(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static Emergency getEmergency(String code) {
        for (Emergency value : Emergency.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
