package com.jpsoft.shinestar.modules.business.entity;

import java.io.Serializable;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.math.BigDecimal;

import com.jpsoft.shinestar.modules.common.utils.TypeNameUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
  描述:business_guest_info_record的实体类
 */
@Data
public class GuestInfoRecord {
	private String id;
	private String name;
	private String mobilePhone;
	private String unit;
	private String idCard;

	private String visitReasons;
	private String numberPlate;
	private Long intervieweeId;

	private String intervieweeName;
	private String intervieweePhone;
	private String openId;

	private Integer status;
	private String statusN;
	private Boolean delFlag;

	private String createBy;
	private Date updateTime;
	private String updateBy;
	private String photo;
	private BigDecimal temperature;
	private BigDecimal temperatureBack;

	private String companyId;
	private Long personId;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	private Date createTime;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	private Date confirmationTime;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	private Date auditTime;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	private Date comeInTime;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	@ApiModelProperty(value = "离开时间")

	private Date outTime;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	@ApiModelProperty(value = "邀请时间")
	private Date visitDate;

	@ApiModelProperty(value = "下发设备ID（多个设备ID以逗号隔开）")
	private String issueDevice;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
	@ApiModelProperty(value = "过期时间")
	private Date expirationTime;

    @ApiModelProperty(value = "是否上传登记照")
    private Boolean isUpPhoto;


	public String getStatusN(){
		String text = TypeNameUtil.getExamineTypeName(String.valueOf(status));
		return text;
		/*String statusN="";
		if(status==0){
			statusN="待确认";
		}
		else if(status==1){
			statusN="已确认";
		}
		else if(status==2){
			statusN="已过期";
		}
		return statusN;*/
	}

}