package com.iformall.enums;

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

    // 1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券,6.通用券, 8.砍价券
    // 100.消费卡
    COUPON_MANJIAN(1, "满减券"),
    COUPON_DAIJIN(2, "代金券"),
    COUPON_TUANGOU(3, "团购券"),//弃用
    COUPON_LIPIN(4, "礼品券"),
    COUPON_TINGCHE(5, "停车券"),
    COUPON_MULTIMCH(6, "通用券"),
    COUPON_PRESS(8, "砍价券"),
    COUPON_GROUP(9, "团购券"),
    COUPON_CREDIT(50,"积分券"),
    COUPON_CREDIT_PARK(51,"积分停车券"),
    CARD_MULTIMCH(100, "消费卡"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
