package com.iformall.enums;

/**
 * Created by luozukai
 */
public enum EnumMsgRecordType {
    SMS(1, "短信"),
    SMS_CALLBACK(2, "业务短信"),
    EMAIL(3, "邮件"),
    SMART_APP(4, "小程序"),
    PUBLIC(5, "公众号"),
    SYSTEM(6, "系统通知"),
    SMART_APP_UNIFORM(7, "小程序统一消息"),
    WEBSOCKET_APP(8, "小程序websocket"),
    INSIDE_ORDER_SUCCESS(100, "下订单成功"),
    INSIDE_COUPON_VERIFY(101, "券核销"),
    INSIDE_C_LOGIN(102, "C端用户登录"),
    INSIDE_NOTIFY_PAY_SUCCESS(103, "微信支付回调"),
    INSIDE_NOTIFY_REFUND_SUCCESS(104, "微信退款回调"),
    ;

    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;
    }
}
