package com.mortals.xhx.module.hotword.model;

import com.mortals.xhx.module.hotword.model.vo.HotwordVo;
/**
* 热门词汇业务实体对象
*
* @author zxfei
* @date 2022-12-08
*/

public class HotwordEntity extends HotwordVo {
    private static final long serialVersionUID = 1L;

    /**
    * 站点ID
    */
    private Long siteId;
    /**
    * 热门词汇
    */
    private String hotwords;
    /**
    * 查询次数
    */
    private Integer searchCount;
    /**
    * 热门词汇来源（1.手动添加,2.查询添加）
    */
    private Integer wordsSource;



    public HotwordEntity(){}
    /**
    * 获取 站点ID
    * @return Long
    */
    public Long getSiteId(){
        return siteId;
    }
    /**
    * 设置 站点ID
    * @param siteId
    */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
    * 获取 热门词汇
    * @return String
    */
    public String getHotwords(){
        return hotwords;
    }
    /**
    * 设置 热门词汇
    * @param hotwords
    */
    public void setHotwords(String hotwords){
        this.hotwords = hotwords;
    }
    /**
    * 获取 查询次数
    * @return Integer
    */
    public Integer getSearchCount(){
        return searchCount;
    }
    /**
    * 设置 查询次数
    * @param searchCount
    */
    public void setSearchCount(Integer searchCount){
        this.searchCount = searchCount;
    }
    /**
    * 获取 热门词汇来源（1.手动添加,2.查询添加）
    * @return Integer
    */
    public Integer getWordsSource(){
        return wordsSource;
    }
    /**
    * 设置 热门词汇来源（1.手动添加,2.查询添加）
    * @param wordsSource
    */
    public void setWordsSource(Integer wordsSource){
        this.wordsSource = wordsSource;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof HotwordEntity) {
            HotwordEntity tmp = (HotwordEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",hotwords:").append(getHotwords());
        sb.append(",searchCount:").append(getSearchCount());
        sb.append(",wordsSource:").append(getWordsSource());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.hotwords = "";

            this.searchCount = 0;

            this.wordsSource = 1;
    }
}