package com.mortals.xhx.module.monitor.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.monitor.model.vo.MonitorAlarmVo;
/**
* 监测预警记录实体对象
*
* @author zxfei
* @date 2023-04-15
*/

public class MonitorAlarmEntity extends MonitorAlarmVo {
    private static final long serialVersionUID = 1L;

    /**
    * 站点Id
    */
    private Long siteId;
    /**
    * 站点名称
    */
    private String siteName;
    /**
    * 人员id
    */
    @Excel(name = "人员id")
    private Long personId;
    /**
    * 姓名
    */
    @Excel(name = "姓名")
    private String name;
    /**
    * 联系方式
    */
    @Excel(name = "联系方式")
    private String contact;
    /**
    * 身份证号码
    */
    @Excel(name = "身份证号码")
    private String idNumber;
    /**
    * 识别频次
    */
    private Integer identifyNum;
    /**
    * 最后识别时间
    */
    @Excel(name = "最后识别时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastIdentifyTime;
    /**
    * 年
    */
    private Integer year;
    /**
    * 月
    */
    private Integer month;
    /**
    * 日
    */
    private Integer day;



    public MonitorAlarmEntity(){}
    /**
    * 获取 站点Id
    * @return Long
    */
    public Long getSiteId(){
        return siteId;
    }
    /**
    * 设置 站点Id
    * @param siteId
    */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
    * 获取 站点名称
    * @return String
    */
    public String getSiteName(){
        return siteName;
    }
    /**
    * 设置 站点名称
    * @param siteName
    */
    public void setSiteName(String siteName){
        this.siteName = siteName;
    }
    /**
    * 获取 人员id
    * @return Long
    */
    public Long getPersonId(){
        return personId;
    }
    /**
    * 设置 人员id
    * @param personId
    */
    public void setPersonId(Long personId){
        this.personId = personId;
    }
    /**
    * 获取 姓名
    * @return String
    */
    public String getName(){
        return name;
    }
    /**
    * 设置 姓名
    * @param name
    */
    public void setName(String name){
        this.name = name;
    }
    /**
    * 获取 联系方式
    * @return String
    */
    public String getContact(){
        return contact;
    }
    /**
    * 设置 联系方式
    * @param contact
    */
    public void setContact(String contact){
        this.contact = contact;
    }
    /**
    * 获取 身份证号码
    * @return String
    */
    public String getIdNumber(){
        return idNumber;
    }
    /**
    * 设置 身份证号码
    * @param idNumber
    */
    public void setIdNumber(String idNumber){
        this.idNumber = idNumber;
    }
    /**
    * 获取 识别频次
    * @return Integer
    */
    public Integer getIdentifyNum(){
        return identifyNum;
    }
    /**
    * 设置 识别频次
    * @param identifyNum
    */
    public void setIdentifyNum(Integer identifyNum){
        this.identifyNum = identifyNum;
    }
    /**
    * 获取 最后识别时间
    * @return Date
    */
    public Date getLastIdentifyTime(){
        return lastIdentifyTime;
    }
    /**
    * 设置 最后识别时间
    * @param lastIdentifyTime
    */
    public void setLastIdentifyTime(Date lastIdentifyTime){
        this.lastIdentifyTime = lastIdentifyTime;
    }
    /**
    * 获取 年
    * @return Integer
    */
    public Integer getYear(){
        return year;
    }
    /**
    * 设置 年
    * @param year
    */
    public void setYear(Integer year){
        this.year = year;
    }
    /**
    * 获取 月
    * @return Integer
    */
    public Integer getMonth(){
        return month;
    }
    /**
    * 设置 月
    * @param month
    */
    public void setMonth(Integer month){
        this.month = month;
    }
    /**
    * 获取 日
    * @return Integer
    */
    public Integer getDay(){
        return day;
    }
    /**
    * 设置 日
    * @param day
    */
    public void setDay(Integer day){
        this.day = day;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof MonitorAlarmEntity) {
            MonitorAlarmEntity tmp = (MonitorAlarmEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",siteName:").append(getSiteName());
        sb.append(",personId:").append(getPersonId());
        sb.append(",name:").append(getName());
        sb.append(",contact:").append(getContact());
        sb.append(",idNumber:").append(getIdNumber());
        sb.append(",identifyNum:").append(getIdentifyNum());
        sb.append(",lastIdentifyTime:").append(getLastIdentifyTime());
        sb.append(",year:").append(getYear());
        sb.append(",month:").append(getMonth());
        sb.append(",day:").append(getDay());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.siteName = "";

            this.personId = null;

            this.name = "";

            this.contact = "";

            this.idNumber = "";

            this.identifyNum = 1;

            this.lastIdentifyTime = null;

            this.year = null;

            this.month = null;

            this.day = null;
    }
}