View Javadoc
1   package org.oxerr.youzan.dto.item;
2   
3   import java.io.Serializable;
4   import java.time.Instant;
5   
6   import org.oxerr.youzan.dto.deserializer.InstantDeserializer;
7   
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10  
11  /**
12   * <a href="http://open.youzan.com/structparam?struct=GoodsTag">商品标签数据结构</a>.
13   */
14  public class GoodsTag implements Serializable {
15  
16  	private static final long serialVersionUID = 2016061901L;
17  
18  	/**
19  	 * 商品标签创建时间
20  	 */
21  	private Instant created;
22  
23  	/**
24  	 * 分享出去的商品标签展示地址
25  	 */
26  	private String shareUrl;
27  
28  	/**
29  	 * 商品标签的名称
30  	 */
31  	private String name;
32  
33  	/**
34  	 * 商品标签的ID
35  	 */
36  	private Long id;
37  
38  	/**
39  	 * 商品标签的展示的URL地址
40  	 */
41  	private String tagUrl;
42  
43  	/**
44  	 * 商品标签类型,0 自定义,1 未分类,2 最新,3 最热,4 隐藏。
45  	 */
46  	private Integer type;
47  
48  	/**
49  	 * 商品标签内的商品数量
50  	 */
51  	private Long itemNum;
52  
53  	/**
54  	 * 商品标签描述
55  	 */
56  	private String desc;
57  
58  	public GoodsTag() {
59  	}
60  
61  	public GoodsTag(
62  		@JsonProperty("created")
63  		@JsonDeserialize(using = InstantDeserializer.class)
64  		Instant created,
65  		@JsonProperty("share_url") String shareUrl,
66  		@JsonProperty("name") String name,
67  		@JsonProperty("id") Long id,
68  		@JsonProperty("tag_url") String tagUrl,
69  		@JsonProperty("type") Integer type,
70  		@JsonProperty("item_num") Long itemNum,
71  		@JsonProperty("desc") String desc
72  	) {
73  		this.created = created;
74  		this.shareUrl = shareUrl;
75  		this.name = name;
76  		this.id = id;
77  		this.tagUrl = tagUrl;
78  		this.type = type;
79  		this.itemNum = itemNum;
80  		this.desc = desc;
81  	}
82  
83  	public Instant getCreated() {
84  		return created;
85  	}
86  
87  	public void setCreated(Instant created) {
88  		this.created = created;
89  	}
90  
91  	public String getShareUrl() {
92  		return shareUrl;
93  	}
94  
95  	public void setShareUrl(String shareUrl) {
96  		this.shareUrl = shareUrl;
97  	}
98  
99  	public String getName() {
100 		return name;
101 	}
102 
103 	public void setName(String name) {
104 		this.name = name;
105 	}
106 
107 	public Long getId() {
108 		return id;
109 	}
110 
111 	public void setId(Long id) {
112 		this.id = id;
113 	}
114 
115 	public String getTagUrl() {
116 		return tagUrl;
117 	}
118 
119 	public void setTagUrl(String tagUrl) {
120 		this.tagUrl = tagUrl;
121 	}
122 
123 	public Integer getType() {
124 		return type;
125 	}
126 
127 	public void setType(Integer type) {
128 		this.type = type;
129 	}
130 
131 	public Long getItemNum() {
132 		return itemNum;
133 	}
134 
135 	public void setItemNum(Long itemNum) {
136 		this.itemNum = itemNum;
137 	}
138 
139 	public String getDesc() {
140 		return desc;
141 	}
142 
143 	public void setDesc(String desc) {
144 		this.desc = desc;
145 	}
146 
147 }