package com.sptg.estate.api.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * Created By lidexi in 2021/1/5
 * 访客信息登记
 **/
@Setter
@Getter
@TableName(value = "estate_guest_record")
public class GuestRecord {

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

    /**
     * 要访问的小区id
     */
    @TableField(value = "l_residential_id")
    private Long residentialId;

    /**
     * 要访问的小区名称
     */
    @TableField(value = "s_residential_name")
    private String residentialName;

    /**
     * 来访日期
     */
    @TableField(value = "t_guest_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date guestTime;

    /**
     * 访问的住户的id
     */
    @TableField(value = "l_user_id")
    private Long userId;

    /**
     * 要访问的住户姓名
     */
    @TableField(value = "s_user_name")
    private String userName;

    /**
     * 访客的手机号码
     */
    @TableField(value = "s_guest_name")
    private String guestName;
    /**
     * 访客的手机号码
     */
    @TableField(value = "s_guest_tel")
    private String guestTel;

    /**
     * 访客的身份证号码
     */
    @TableField(value = "s_guest_idcard")
    private String guestIdcard;

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

    /**
     * 创建时间
     */
    @TableField(value = "t_create_date")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createDate;

    /**
     * 创建时间
     */
    @TableField(value = "t_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date endTime;
    /**
     * 组织id
     */
    @TableField(value = "l_org_id")
    private Long orgId;

    /**
     * 所属根组织id
     */
    @TableField(value = "l_root_org_id")
    private Long rootOrgId;

    /**
     * 存储位置（通过该字段快速查询，所有的子节点）
     */
    @TableField(value = "s_org_position")
    private String orgPosition;

    /**
     * 审核状态
     */
    @TableField(value = "i_audit_status")
    private Integer auditStatus;

    /**
     * 所属授权记录id
     */
    @TableField(value = "l_guest_auth_id")
    private Long guestAuthId;

    /**
     * 访客访问的房间具体位置
     */
    @TableField(value = "s_guest_position")
    private String guestPosition;


/**
 * 访客openId
 */
    @TableField(value = "s_open_id")
    private String openId;

}
