package com.uas.search.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 类目简要信息，只用于索引的创建与查询
 * 
 * @author sunyj
 * @since 2016年7月7日 下午5:38:44
 */
@Entity
@Table(name = "product$kind")
public class Kind implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@Id
	@Column(name = "ki_id")
	private Long id;

	/**
	 * 类目名称
	 */
	@Column(name = "ki_name")
	private String nameCn;

	/**
	 * 类目的层级，从1开始，1、2、3
	 */
	@Column(name = "ki_level")
	private Short level;

	/**
	 * 是否为叶子类目 1是 0否
	 */
	@Column(name = "ki_isleaf")
	private Short isLeaf;

	/**
	 * 访问量
	 */
	@Column(name = "ki_visit_count")
	private Long visitCount;

	/**
	 * 搜索次数
	 */
	@Column(name = "ki_search_count")
	private Long searchCount;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNameCn() {
		return nameCn;
	}

	public void setNameCn(String nameCn) {
		this.nameCn = nameCn;
	}

	public Short getLevel() {
		return level;
	}

	public void setLevel(Short level) {
		this.level = level;
	}

	public Short getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(Short isLeaf) {
		this.isLeaf = isLeaf;
	}

	public Long getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Long visitCount) {
		this.visitCount = visitCount;
	}

	public Long getSearchCount() {
		return searchCount;
	}

	public void setSearchCount(Long searchCount) {
		this.searchCount = searchCount;
	}

	@Override
	public String toString() {
		return "Kind{" +
				"id=" + id +
				", nameCn='" + nameCn + '\'' +
				", level=" + level +
				", isLeaf=" + isLeaf +
				", visitCount=" + visitCount +
				", searchCount=" + searchCount +
				'}';
	}
}
