View Javadoc
1   package com.foxinmy.weixin4j.model.card;
2   
3   import com.alibaba.fastjson.annotation.JSONField;
4   import com.foxinmy.weixin4j.type.card.CardType;
5   
6   /**
7    * 普通优惠券
8    * 
9    * @className GeneralCoupon
10   * @author jinyu(foxinmy@gmail.com)
11   * @date 2016年8月4日
12   * @since JDK 1.6
13   */
14  public class GeneralCoupon extends CardCoupon {
15  	/**
16  	 * 优惠详情
17  	 */
18  	@JSONField(name = "default_detail")
19  	private final String explain;
20  
21  	/**
22  	 * 构造普通优惠券
23  	 * 
24  	 * @param couponBaseInfo
25  	 *            基础信息
26  	 * @param explain
27  	 *            优惠详情 如:音乐木盒
28  	 */
29  	public GeneralCoupon(CouponBaseInfo couponBaseInfo, String explain) {
30  		super(couponBaseInfo);
31  		this.explain = explain;
32  	}
33  
34  	public String getExplain() {
35  		return explain;
36  	}
37  
38  	@JSONField(serialize = false)
39  	@Override
40  	public CardType getCardType() {
41  		return CardType.GENERAL_COUPON;
42  	}
43  
44  	@Override
45  	public String toString() {
46  		return "GrouponCoupon [explain=" + explain + ", " + super.toString()
47  				+ "]";
48  	}
49  }