View Javadoc
1   package com.foxinmy.weixin4j.qy.model;
2   
3   import java.io.Serializable;
4   
5   import com.alibaba.fastjson.annotation.JSONField;
6   
7   /**
8    * 标签对象
9    * 
10   * @className Tag
11   * @author jinyu(foxinmy@gmail.com)
12   * @date 2014年11月24日
13   * @since JDK 1.6
14   * @see
15   */
16  public class Tag implements Serializable {
17  
18  	private static final long serialVersionUID = 5204620476267654921L;
19  
20  	/**
21  	 * 标签ID
22  	 */
23  	@JSONField(name = "tagid")
24  	private int id;
25  	/**
26  	 * 标签名称
27  	 */
28  	@JSONField(name = "tagname")
29  	private String name;
30  
31  	protected Tag() {
32  
33  	}
34  
35  	public Tag(String name) {
36  		this.name = name;
37  	}
38  
39  	public Tag(int id, String name) {
40  		this.id = id;
41  		this.name = name;
42  	}
43  
44  	public int getId() {
45  		return id;
46  	}
47  
48  	public String getName() {
49  		return name;
50  	}
51  
52  	// ---------- setter 应该全部去掉
53  
54  	public void setId(int id) {
55  		this.id = id;
56  	}
57  
58  	public void setName(String name) {
59  		this.name = name;
60  	}
61  
62  	@Override
63  	public String toString() {
64  		return "Tag [id=" + id + ", name=" + name + "]";
65  	}
66  }