package com.mortals.xhx.module.news.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.news.model.vo.NewsUpVo;
import lombok.Data;
/**
* 新闻点赞记录信息实体对象
*
* @author zxfei
* @date 2024-12-04
*/
@Data
public class NewsUpEntity extends NewsUpVo {
    private static final long serialVersionUID = 1L;

    /**
    * 新闻ID
    */
    private Long newsId;
    /**
    * 点赞人ID
    */
    private Long upId;
    /**
    * 点赞人名称
    */
    private String upName;
    /**
    * 累计分享次数
    */
    private Integer sumUp;
    /**
    * 备注
    */
    private String remark;
    /**
    * 点赞时间
    */
    private Date upTime;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof NewsUpEntity) {
            NewsUpEntity tmp = (NewsUpEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.newsId = null;
            this.upId = null;
            this.upName = "";
            this.sumUp = 0;
            this.remark = "";
            this.upTime = null;
    }
}