package com.mortals.xhx.module.bussinesscard.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.bussinesscard.model.vo.BussinesscardRecordVo;
import lombok.Data;
/**
 * 名片访问记录信息实体对象
 *
 * @author zxfei
 * @date 2024-11-21
 */
@Data
public class BussinesscardRecordEntity extends BussinesscardRecordVo {
    private static final long serialVersionUID = 1L;

    /**
     * 名片ID
     */
    private Long bussinesscardId;
    /**
     * 查看人id
     */
    private Long viewId;
    /**
     * 查看人名称
     */
    private String viewName;
    /**
     * 累计查看次数
     */
    private Integer sumViews;
    /**
     * 备注
     */
    private String remark;
    /**
     * 最后浏览时间
     */
    private Date viewTime;
    /**
     * 头像地址
     */
    private String photoPath;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof BussinesscardRecordEntity) {
            BussinesscardRecordEntity tmp = (BussinesscardRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.bussinesscardId = null;
        this.viewId = null;
        this.viewName = "";
        this.sumViews = 0;
        this.remark = "";
        this.viewTime = null;
        this.photoPath = "";
    }
}