package com.iformall.enums;

/**
 * Created by Stormeye
 * 消息限制类型
 */
public enum EnumMsgLimitType {
    // type,name
    SMS_VALID(1, "短信-验证码"),
    SMS_SALE(2, "短信-营销"),
    WEAPP_PREPAYID(11, "小程序prepayId"),
    WEAPP_FORMID(12, "小程序formId"),
    WEAPP_OPENID_SEND(21, "小程序发券统一消息"),
    WXCHAT_OPENID_SEND(31, "公众号发券消息"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
