package com.mortals.xhx.module.care.model;
import java.util.List;
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.care.model.vo.CareConstraintVo;
import com.mortals.xhx.module.care.model.CareConstraintTrackEntity;
/**
* 主动关怀服务约束实体对象
*
* @author zxfei
* @date 2023-04-09
*/

public class CareConstraintEntity extends CareConstraintVo {
    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 idCard;
    /**
    * 服务频次
    */
    @Excel(name = "服务频次")
    private Long serviceFrequency;
    /**
    * 跟踪时间
    */
    @Excel(name = "跟踪时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date trackingTime;
    /**
    * 创建方式(1.人工创建,2.系统推荐)
    */
    @Excel(name = "创建方式", readConverterExp = "1=人工创建,2=系统推荐")
    private Integer createWay;
    /**
    * 操作人员
    */
    @Excel(name = "操作人员")
    private String operator;
    /**
    * 是否追踪 (0.否，1.是)
    */
    @Excel(name = "是否追踪 ", readConverterExp = "0=否,1=是")
    private Integer track;

    /**
    * 主动关怀服务追踪信息
    */
    private List<CareConstraintTrackEntity> careConstraintTrackList=new ArrayList<>();;


    public CareConstraintEntity(){}
    /**
    * 获取 站点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 getIdCard(){
        return idCard;
    }
    /**
    * 设置 身份证号码
    * @param idCard
    */
    public void setIdCard(String idCard){
        this.idCard = idCard;
    }
    /**
    * 获取 服务频次
    * @return Long
    */
    public Long getServiceFrequency(){
        return serviceFrequency;
    }
    /**
    * 设置 服务频次
    * @param serviceFrequency
    */
    public void setServiceFrequency(Long serviceFrequency){
        this.serviceFrequency = serviceFrequency;
    }
    /**
    * 获取 跟踪时间
    * @return Date
    */
    public Date getTrackingTime(){
        return trackingTime;
    }
    /**
    * 设置 跟踪时间
    * @param trackingTime
    */
    public void setTrackingTime(Date trackingTime){
        this.trackingTime = trackingTime;
    }
    /**
    * 获取 创建方式(1.人工创建,2.系统推荐)
    * @return Integer
    */
    public Integer getCreateWay(){
        return createWay;
    }
    /**
    * 设置 创建方式(1.人工创建,2.系统推荐)
    * @param createWay
    */
    public void setCreateWay(Integer createWay){
        this.createWay = createWay;
    }
    /**
    * 获取 操作人员
    * @return String
    */
    public String getOperator(){
        return operator;
    }
    /**
    * 设置 操作人员
    * @param operator
    */
    public void setOperator(String operator){
        this.operator = operator;
    }
    /**
    * 获取 是否追踪 (0.否，1.是)
    * @return Integer
    */
    public Integer getTrack(){
        return track;
    }
    /**
    * 设置 是否追踪 (0.否，1.是)
    * @param track
    */
    public void setTrack(Integer track){
        this.track = track;
    }


    public List<CareConstraintTrackEntity> getCareConstraintTrackList(){
      return careConstraintTrackList;
    }

    public void setCareConstraintTrackList(List<CareConstraintTrackEntity> careConstraintTrackList){
        this.careConstraintTrackList = careConstraintTrackList;
    }


    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof CareConstraintEntity) {
            CareConstraintEntity tmp = (CareConstraintEntity) 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(",idCard:").append(getIdCard());
        sb.append(",serviceFrequency:").append(getServiceFrequency());
        sb.append(",trackingTime:").append(getTrackingTime());
        sb.append(",createWay:").append(getCreateWay());
        sb.append(",operator:").append(getOperator());
        sb.append(",track:").append(getTrack());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.siteName = "";

            this.personId = null;

            this.name = "";

            this.contact = "";

            this.idCard = "";

            this.serviceFrequency = 0L;

            this.trackingTime = null;

            this.createWay = 1;

            this.operator = "";

            this.track = 0;
    }
}