package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumMsgStatus {
    MSG_STATUS_DRAFT(2, "草稿"),
    MSG_STATUS_NOT_SEND(0, "未发送"),
    MSG_STATUS_SENDED(1, "已发送")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
