package com.yida.data.common.core.entity.school.visitor;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 访客管理-来访人员记录表 Entity
 *
 * @author zhanghaijun
 * @date 2021-11-09 15:04:42
 */
@Data
@TableName("edu_visitor_record")
public class EduVisitorRecord {

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 来访者姓名
     */
    @ApiModelProperty(value = "来访者姓名")
    @TableField("name")
    @NotNull
    private String name;

    /**
     * 身份证号
     */
    @ApiModelProperty(value = "身份证号")
    @TableField("id_card")
    @NotNull
    private String idCard;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @TableField("mobile")
    @NotNull
    private String mobile;

    /**
     * 来访原因
     */
    @ApiModelProperty(value = "来访原因")
    @TableField("reason")
    private String reason;

    /**
     * 来访原因附带图片
     */
    @ApiModelProperty(value = "来访原因附带图片")
    @TableField("reason_pic")
    private String reasonPic;

    /**
     * 体温(摄氏度)
     */
    @ApiModelProperty(value = "体温(摄氏度)")
    @TableField("temp")
    private Double temp;

    /**
     * 0-待处理，1-同意，2-拒绝，3-已取消
     */
    @ApiModelProperty(value = "0-待处理，1-同意，2-拒绝，3-已取消")
    @TableField("result")
    private Integer result;

    /**
     * 0-待访问，1-访问中，2-访问结束，3-已取消
     */
    @ApiModelProperty(value = "0-待访问，1-访问中，2-访问结束，3-已取消")
    @TableField("status")
    private Integer status;

    private String noReason;

    /**
     * 预约到访时间
     */
    @ApiModelProperty(value = "预约到访时间")
    @TableField("appointment_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime appointmentTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inSchoolTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outSchoolTime;
    /**
     * 受访职工
     */
    @ApiModelProperty(value = "受访职工")
    @TableField("staff_id")
    @NotNull
    private Long staffId;

    /**
     * 进校安保人员id
     */
    @ApiModelProperty(value = "进校安保人员id")
    @TableField("in_school_security_id")
    private Long inSchoolSecurityId;

    @ApiModelProperty(value = "出校安保人员id")
    private Long outSchoolSecurityId;

    /**
     * 学校id
     */
    @ApiModelProperty(value = "学校id")
    @TableField("school_id")
    @NotNull
    private Long schoolId;

    @ApiModelProperty("邀请码，13位时间戳+4位随机串(a-z,A-Z,0-9)")
    @NotNull
    @Size(max = 17, min = 17)
    private String inviteCode;

    @ApiModelProperty("访客微信公众号openId")
    private String visitorWxPublicOpenId;
}