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 GrouponCoupon
10   * @author jinyu(foxinmy@gmail.com)
11   * @date 2016年8月4日
12   * @since JDK 1.6
13   */
14  public class GrouponCoupon extends CardCoupon {
15  	/**
16  	 * 团购详情
17  	 */
18  	@JSONField(name = "deal_detail")
19  	private final String explain;
20  
21  	/**
22  	 * 构造团购券
23  	 * 
24  	 * @param couponBaseInfo
25  	 *            基础信息
26  	 * @param explain
27  	 *            团购详情 如:双人套餐\n -进口红酒一支。\n孜然牛肉一份。
28  	 */
29  	public GrouponCoupon(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.GROUPON;
42  	}
43  
44  	@Override
45  	public String toString() {
46  		return "GrouponCoupon [explain=" + explain + ", " + super.toString()
47  				+ "]";
48  	}
49  }