package com.mortals.xhx.module.appointment.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.appointment.model.vo.AppointmentConstraintVo;
/**
* 预约自动签到服务约束实体对象
*
* @author zxfei
* @date 2023-04-09
*/

public class AppointmentConstraintEntity extends AppointmentConstraintVo {
    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 idCardType;
    /**
    * 证件号码
    */
    @Excel(name = "证件号码")
    private String idCardNo;
    /**
    * 累计次数
    */
    @Excel(name = "累计次数")
    private Long accumulative;
    /**
    * 约束时间
    */
    @Excel(name = "约束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date constraintTime;
    /**
    * 创建方式(0.手动创建，1.系统推荐)
    */
    @Excel(name = "创建方式", readConverterExp = "0=手动创建,1=系统推荐")
    private Integer createMethod;
    /**
    * 操作人员
    */
    @Excel(name = "操作人员")
    private String operator;
    /**
    * 是否约束 (0.否，1.是)
    */
    @Excel(name = "是否约束 ", readConverterExp = "0=否,1=是")
    private Integer constraint;



    public AppointmentConstraintEntity(){}
    /**
    * 获取 站点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 getIdCardType(){
        return idCardType;
    }
    /**
    * 设置 证件类型
    * @param idCardType
    */
    public void setIdCardType(String idCardType){
        this.idCardType = idCardType;
    }
    /**
    * 获取 证件号码
    * @return String
    */
    public String getIdCardNo(){
        return idCardNo;
    }
    /**
    * 设置 证件号码
    * @param idCardNo
    */
    public void setIdCardNo(String idCardNo){
        this.idCardNo = idCardNo;
    }
    /**
    * 获取 累计次数
    * @return Long
    */
    public Long getAccumulative(){
        return accumulative;
    }
    /**
    * 设置 累计次数
    * @param accumulative
    */
    public void setAccumulative(Long accumulative){
        this.accumulative = accumulative;
    }
    /**
    * 获取 约束时间
    * @return Date
    */
    public Date getConstraintTime(){
        return constraintTime;
    }
    /**
    * 设置 约束时间
    * @param constraintTime
    */
    public void setConstraintTime(Date constraintTime){
        this.constraintTime = constraintTime;
    }
    /**
    * 获取 创建方式(0.手动创建，1.系统推荐)
    * @return Integer
    */
    public Integer getCreateMethod(){
        return createMethod;
    }
    /**
    * 设置 创建方式(0.手动创建，1.系统推荐)
    * @param createMethod
    */
    public void setCreateMethod(Integer createMethod){
        this.createMethod = createMethod;
    }
    /**
    * 获取 操作人员
    * @return String
    */
    public String getOperator(){
        return operator;
    }
    /**
    * 设置 操作人员
    * @param operator
    */
    public void setOperator(String operator){
        this.operator = operator;
    }
    /**
    * 获取 是否约束 (0.否，1.是)
    * @return Integer
    */
    public Integer getConstraint(){
        return constraint;
    }
    /**
    * 设置 是否约束 (0.否，1.是)
    * @param constraint
    */
    public void setConstraint(Integer constraint){
        this.constraint = constraint;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AppointmentConstraintEntity) {
            AppointmentConstraintEntity tmp = (AppointmentConstraintEntity) 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(",idCardType:").append(getIdCardType());
        sb.append(",idCardNo:").append(getIdCardNo());
        sb.append(",accumulative:").append(getAccumulative());
        sb.append(",constraintTime:").append(getConstraintTime());
        sb.append(",createMethod:").append(getCreateMethod());
        sb.append(",operator:").append(getOperator());
        sb.append(",constraint:").append(getConstraint());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.siteName = "";

            this.personId = null;

            this.name = "";

            this.contact = "";

            this.idCardType = "居民身份证";

            this.idCardNo = "";

            this.accumulative = 0L;

            this.constraintTime = null;

            this.createMethod = 1;

            this.operator = "";

            this.constraint = 0;
    }
}