package cn.freemud.enums;

public enum CouponRedeemChannel {

    PICKUP("saas","pickup"),
    DELIVERY("saasdelivery","delivery");
    String type;
    String channel;
    CouponRedeemChannel(String type,String channel) {
        this.type = type;
        this.channel = channel;
    }

    public static String getChannelByType(String type) {
        String channel = "";
        for (CouponRedeemChannel value : CouponRedeemChannel.values()) {
            if (value.getType().equals(type)) {
                channel = value.getChannel();
                break;
            }
        }
        return channel;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }
}
