package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumCouponSendSendType {

    // -1: 未知 0：精准发券 1：主动(保留) 2：停车发券 3：核销发券 4: B端刷卡发券 5:商户发卷 6:定时发券 7:商户发券 8:会员生日券
    UNKNOWN(-1, "未知"),
    INJECT(0, "精准发券"),
    ACTIVE(1, "主动(保留)"),
    CAR_STOP(2, "停车发券"),
    COUPON_VERIFY(3, "核销发券"),
    B_MICROPAY(4, "B端刷卡发券"),
    C_ORDER(5, "购买发券"),
    TIMED(6, "定时发券"),
    MERCHANT(7, "商户发券"),
    BIRTHDAY(8, "会员生日券"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
