package com.iformall.enums;

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

    COUPON_CHANNEL_ID_LIST(1, "列表"),
    COUPON_CHANNEL_ID_TIMED(2, "限时抢购"),
    COUPON_CHANNEL_ID_CAMPAIN(3, "幻灯片"), // banner图, 宣传页，轮播图，走马灯
    COUPON_CHANNEL_ID_GAME(4, "游戏"),
    COUPON_CHANNEL_ID_CARD(5, "卡频道"),
    COUPON_CHANNEL_ID_PRESS(6, "砍价频道"),
    COUPON_CHANNEL_ID_ORDER_GROUP(7, "拼团频道"),
    COUPON_CHANNEL_ID_TOPIC(8, "专题"),
    COUPON_CHANNEL_ID_CREDIT(50, "积分商城")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
