package com.iformall.enums;


/**
 * Created by luozukai
 */
public enum EnumMsgRecordStatus {
    DEFAULT(0, "默认"),
    SEND_SUCC(1, "发送成功"),
    CONSUME_SUCC(2, "消费成功"),
    CONSUME_FAIL(3, "消费失败"),
    SEND_FAIL(4, "发送失败"),
    ;

    public static EnumMsgRecordStatus getEnum(Integer code) {
        for (EnumMsgRecordStatus value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumMsgRecordStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
