SendModelEnum.java 1 KB
package com.yoho.unions.constant;

public enum SendModelEnum {
    ONLY_COUPON("1","只发优惠券"),ONLY_MONEY("2","只返现"),COUPON_AND_MONEY("3","优惠券和返现");
    String code;
    String desc;
    private SendModelEnum(){}

    SendModelEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public static boolean containCoupon(String code) {
        if ( ONLY_COUPON.getCode().equals(code) || COUPON_AND_MONEY.getCode().equals(code)) {
            return true;
        }
        return false;
    }
    public static boolean containMoney(String code) {
        if ( ONLY_MONEY.getCode().equals(code) || COUPON_AND_MONEY.getCode().equals(code)) {
            return true;
        }
        return false;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}