yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
package com.yeshi.fanli.entity.bus.clazz;
 
import java.io.Serializable;
import java.util.Date;
 
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
 
import com.google.gson.annotations.Expose;
 
/**
 * 商品二级分类
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "yeshi_ec_sub_class")
@org.yeshi.utils.mybatis.Table("yeshi_ec_sub_class")
public class GoodsSubClass implements Serializable{
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
 
    @Id
    @Expose
    @Column(name = "sub_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    @org.yeshi.utils.mybatis.Column(name="sub_id")
    private Long id;
    
    @Expose
    @Column(name = "sub_name")
    @org.yeshi.utils.mybatis.Column(name="sub_name")
    private String name;  // 名称
    
    @Expose
    @Column(name = "sub_picture")
    @org.yeshi.utils.mybatis.Column(name="sub_picture")
    private String picture; // 图片路径
    
    @Expose
    @Column(name = "sub_weight")
    @org.yeshi.utils.mybatis.Column(name="sub_weight")
    private Integer weight; // 权重-排序
    
    @Expose
    @Column(name = "sub_state")
    @org.yeshi.utils.mybatis.Column(name="sub_state")
    private Integer state;  // 状态 1启用  0停用
    
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "sub_root_id")
    @org.yeshi.utils.mybatis.Column(name="sub_root_id")
    private GoodsClass rootClass; // 一级类别
    
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "sub_pid")
    @org.yeshi.utils.mybatis.Column(name="sub_pid")
    private GoodsSubClass parent ; // 上级:对应的二级以下分类  用于3级、4级、5级
    
    
    @Expose
    @Column(name = "sub_level")
    @org.yeshi.utils.mybatis.Column(name="sub_level")
    private Integer level;  // 具体等级
    
    @Expose
    @Column(name = "sub_key")
    @org.yeshi.utils.mybatis.Column(name="sub_key")
    private String key;  // 搜索关键词
    
 
    @Expose
    @Column(name = "sub_search_json")
    @org.yeshi.utils.mybatis.Column(name="sub_search_json")
    private String searchJson;  // 搜索条件
    
    
    @Expose
    @Column(name = "sub_ios_click")
    @org.yeshi.utils.mybatis.Column(name="sub_ios_click")
    private Long iosClick = 0l;  
    
    @Expose
    @Column(name = "sub_android_click")
    @org.yeshi.utils.mybatis.Column(name="sub_android_click")
    private Long androidClick = 0l;  
    
    @Expose
    @Column(name = "sub_createtime")
    @org.yeshi.utils.mybatis.Column(name="sub_createtime")
    private Date createtime; // 创建时间
    
    @Expose
    @Column(name = "sub_updatetime")
    @org.yeshi.utils.mybatis.Column(name="sub_updatetime")
    private Date updatetime; // 创建时间
    
    @Transient
    private Long CountClick = 0l;  
    @Transient // 关联标签数量
    private int countlabel = 0; 
    
    
    public GoodsSubClass(){}
    
    public GoodsSubClass(Long id) {
        this.id = id;
    }
    
    
    
    
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getPicture() {
        return picture;
    }
 
    public void setPicture(String picture) {
        this.picture = picture;
    }
 
    public Integer getWeight() {
        return weight;
    }
 
    public void setWeight(Integer weight) {
        this.weight = weight;
    }
 
    public Date getCreatetime() {
        return createtime;
    }
 
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
 
 
    public GoodsSubClass getParent() {
        return parent;
    }
 
    public void setParent(GoodsSubClass parent) {
        this.parent = parent;
    }
 
    public GoodsClass getRootClass() {
        return rootClass;
    }
 
    public void setRootClass(GoodsClass rootClass) {
        this.rootClass = rootClass;
    }
 
    public Long getIosClick() {
        return iosClick;
    }
 
    public void setIosClick(Long iosClick) {
        this.iosClick = iosClick;
    }
 
    public Long getAndroidClick() {
        return androidClick;
    }
 
    public void setAndroidClick(Long androidClick) {
        this.androidClick = androidClick;
    }
 
    public Long getCountClick() {
        return CountClick;
    }
 
    public void setCountClick(Long countClick) {
        CountClick = countClick;
    }
 
    public Integer getLevel() {
        return level;
    }
 
    public void setLevel(Integer level) {
        this.level = level;
    }
 
    public int getCountlabel() {
        return countlabel;
    }
 
    public void setCountlabel(int countlabel) {
        this.countlabel = countlabel;
    }
 
    public String getKey() {
        return key;
    }
 
    public void setKey(String key) {
        this.key = key;
    }
 
    public Date getUpdatetime() {
        return updatetime;
    }
 
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
 
    public String getSearchJson() {
        return searchJson;
    }
 
    public void setSearchJson(String searchJson) {
        this.searchJson = searchJson;
    }
 
    public Integer getState() {
        return state;
    }
 
    public void setState(Integer state) {
        this.state = state;
    }
    
}