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.BussinesscardVo;
import lombok.Data;
/**
 * 名片基本信息实体对象
 *
 * @author zxfei
 * @date 2024-11-19
 */
@Data
public class BussinesscardEntity extends BussinesscardVo {
    private static final long serialVersionUID = 1L;

    /**
     * 名片所属关联员工ID
     */
    private Long staffId;
    /**
     * 名片所属关联员工姓名
     */
    private String staffName;
    /**
     * 名片姓名
     */
    private String name;
    /**
     * 性别(1.男,2.女)
     */
    private Integer gender;
    /**
     * 出生日期
     */
    private Date birthday;
    /**
     * 照片
     */
    private String photoPath;
    /**
     * 邮件地址
     */
    private String email;
    /**
     * 联系电话
     */
    private String phoneNumber;
    /**
     * 身份证号码
     */
    private String idCard;
    /**
     * 记录名片持有者所在公司或组织的名称ID
     */
    private Long companyId;
    /**
     * 记录名片持有者所在公司或组织的名称
     */
    private String companyName;
    /**
     * 职位ID
     */
    private Long positionId;
    /**
     * 职位名称
     */
    private String positionName;
    /**
     * 简介
     */
    private String bio;
    /**
     * 社交媒体链接, 可以是一个包含社交媒体账号的JSON对象或单独的字段
     */
    private String socialMedia;
    /**
     * 二维码图片, 可以是一个图片链接或存储路径
     */
    private String qRCode;
    /**
     * 备注
     */
    private String remark;
    /**
     * 累计查看次数
     */
    private Integer sumViews;
    /**
     * 当日查看次数
     */
    private Integer viewsByDay;
    /**
     * 发送名片次数
     */
    private Integer sendBusinessCardTimes;
    /**
     * 名片展示设置
     */
    private String setting;
    /**
     * 公司地址
     */
    private String companyAdress;
    /**
     * 名片背景
     */
    private String backdrop;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof BussinesscardEntity) {
            BussinesscardEntity tmp = (BussinesscardEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.staffId = null;
        this.staffName = "";
        this.name = "";
        this.gender = 1;
        this.birthday = new Date();
        this.photoPath = "";
        this.email = "";
        this.phoneNumber = "";
        this.idCard = "";
        this.companyId = null;
        this.companyName = "";
        this.positionId = null;
        this.positionName = "";
        this.bio = "";
        this.socialMedia = "";
        this.qRCode = "";
        this.remark = "";
        this.sumViews = 0;
        this.viewsByDay = 0;
        this.sendBusinessCardTimes = 0;
        this.setting = "";
        this.companyAdress = "";
        this.backdrop = "";
    }
}