package com.yeshi.fanli.entity.bus.clazz;
|
|
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 com.google.gson.annotations.Expose;
|
|
/**
|
* 商品二级分类
|
*
|
* @author Administrator
|
*
|
*/
|
@Entity
|
@Table(name = "yeshi_ec_second_class")
|
public class GoodsSecondClass {
|
@Id
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
@Column(name = "id")
|
@Expose
|
private long id;
|
@Expose
|
@Column(name = "`name`", length = 50)
|
private String name;
|
@Expose
|
@Column(name = "`picture`", length = 1024)
|
private String picture;
|
private int orderby;
|
private long createtime;
|
@ManyToOne(fetch = FetchType.EAGER)
|
@JoinColumn(name = "pid")
|
private GoodsClass parent;
|
@Column(name = "`key`", length = 10)
|
private String key;
|
|
public GoodsSecondClass() {
|
}
|
|
public GoodsSecondClass(long id) {
|
super();
|
this.id = id;
|
}
|
|
public GoodsSecondClass(String name, String picture, int orderby,
|
long createtime, GoodsClass parent) {
|
super();
|
this.name = name;
|
this.picture = picture;
|
this.orderby = orderby;
|
this.createtime = createtime;
|
this.parent = parent;
|
}
|
|
public String getKey() {
|
return key;
|
}
|
|
public void setKey(String key) {
|
this.key = key;
|
}
|
|
public GoodsClass getParent() {
|
return parent;
|
}
|
|
public void setParent(GoodsClass parent) {
|
this.parent = parent;
|
}
|
|
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 int getOrderby() {
|
return orderby;
|
}
|
|
public void setOrderby(int orderby) {
|
this.orderby = orderby;
|
}
|
|
public long getCreatetime() {
|
return createtime;
|
}
|
|
public void setCreatetime(long createtime) {
|
this.createtime = createtime;
|
}
|
}
|