package com.mortals.xhx.module.favorites.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.favorites.model.vo.FavoritesBusinesscardVo;
import lombok.Data;
/**
 * 收藏名片实体对象
 *
 * @author zxfei
 * @date 2024-12-10
 */
@Data
public class FavoritesBusinesscardEntity extends FavoritesBusinesscardVo {
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID,
     */
    private Long userId;
    /**
     * 名片ID, 关联到名片表中的ID，表示这是哪个名片的收藏
     */
    private Long bussinesscardId;
    /**
     * 备注
     */
    private String remark;
    /**
     * 收藏时间
     */
    private Date favoriteTime;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof FavoritesBusinesscardEntity) {
            FavoritesBusinesscardEntity tmp = (FavoritesBusinesscardEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.userId = null;
        this.bussinesscardId = null;
        this.remark = "";
        this.favoriteTime = new Date();
    }
}