package com.mortals.xhx.module.person.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.person.model.vo.PersonVo;
import lombok.Data;
/**
 * 注册人员实体对象
 *
 * @author zxfei
 * @date 2023-04-24
 */
@Data
public class PersonEntity extends PersonVo {
    private static final long serialVersionUID = 1L;

    /**
     * 站点Id
     */
    @Excel(name = "站点ID")
    private Long siteId;
    /**
     * 站点名称
     */
    @Excel(name = "站点名称")
    private String siteName;
    /**
     * 用户名称
     */
    @Excel(name = "姓名")
    private String name;
    /**
     * 身份证号码
     */
    @Excel(name = "身份证号码")
    private String idCard;
    /**
     * 性别(0.男,1.女)
     */
    @Excel(name = "性别", readConverterExp = "0=男,1=女")
    private Integer gender;
    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    private String phone;
    /**
     * 出生日期
     */
    @Excel(name = "出生日期",width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthday;
    /**
     * 家庭住址
     */
    @Excel(name = "家庭住址")
    private String address;
    /**
     * 本地照片路径
     */
    private String photo;
    /**
     * 原始照片路径
     */
    private String sourcePhotoUri;
    /**
     * Php原始注册用户id
     */
    private Long sourceId;
    /**
     * 备注
     */
    private String remark;
    /**
     * 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,3.海康,99.其它)
     */
    @Excel(name = "注册人员来源", readConverterExp = "0=预约系统,1=排队叫号系统,2=自助服务系统,3=海康,99=其它")
    private Integer source;
    /**
     * 是否添加到海康人脸库(0.否，1.是)
     */
    @Excel(name = "是否添加到海康人脸库", readConverterExp = "0=否,1=是")
    private Integer inFaceHk;
    /**
     * 人脸的唯一标识
     */
    private String indexCode;
    /**
     * 人脸所属的人脸分组的唯一标识
     */
    private String ifaceGroupIndexCode;
    /**
     * 海康人脸图片url
     */
    private String picUrl;
    /**
     * 海康人脸服务标识
     */
    private String serverIndexCode;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PersonEntity) {
            PersonEntity tmp = (PersonEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.siteId = null;

        this.siteName = "";

        this.name = "";

        this.idCard = "";

        this.gender = 0;

        this.phone = "";

        this.birthday = null;

        this.address = "";

        this.photo = "";

        this.sourcePhotoUri = "";

        this.sourceId = null;

        this.remark = "";

        this.source = 0;

        this.inFaceHk = 0;

        this.indexCode = "";

        this.ifaceGroupIndexCode = "";

        this.picUrl = "";

        this.serverIndexCode = "";
    }
}