View Javadoc
1   package com.foxinmy.weixin4j.model;
2   
3   import java.io.Serializable;
4   
5   import com.alibaba.fastjson.annotation.JSONCreator;
6   import com.alibaba.fastjson.annotation.JSONField;
7   
8   /**
9    * 微信账号信息
10   * 
11   * @className WeixinAccount
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2014年11月18日
14   * @since JDK 1.6
15   * @see
16   */
17  public class WeixinAccount implements Serializable {
18  
19  	private static final long serialVersionUID = -6001008896414323534L;
20  
21  	/**
22  	 * 唯一的身份标识
23  	 */
24  	private final String id;
25  	/**
26  	 * 调用接口的密钥
27  	 */
28  	private final String secret;
29  
30  	@JSONCreator
31  	public WeixinAccount(@JSONField(name = "id") String id,
32  			@JSONField(name = "secret") String secret) {
33  		this.id = id;
34  		this.secret = secret;
35  	}
36  
37  	public String getId() {
38  		return id;
39  	}
40  
41  	public String getSecret() {
42  		return secret;
43  	}
44  
45  	@Override
46  	public String toString() {
47  		return "id=" + id + ", secret=" + secret;
48  	}
49  }