package com.iformall.enums;

/**
 * Created by luozukai
 */
public enum EnumMsgRecordType {
    SMS(1, "短信"),
    SMS_CALLBACK(2, "业务短信"),
    EMAIL(3, "邮件"),
    SMART_APP(4, "小程序"),
    PUBLIC(5, "公众号"),
    SYSTEM(6, "系统通知"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
