package com.xueyi.system.api.digitalmans.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xueyi.common.core.annotation.Excel;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;

import static com.xueyi.common.core.constant.basic.EntityConstants.NAME;
import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK;
import static com.xueyi.common.core.constant.basic.EntityConstants.SORT;
import static com.xueyi.common.core.constant.basic.EntityConstants.STATUS;

/**
 * 访客 持久化对象
 *
 * @author xueyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dm_visit_records", excludeProperty = { STATUS, SORT, REMARK, NAME })
public class DmVisitRecordsPo extends TBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    public static final Integer STATUS_VISITING = 0;
    public static final Integer STATUS_VISITED = 8;
    public static final Integer STATUS_EXPIRED = 9;

    /** 访客ID */
    @Excel(name = "访客ID")
    protected Long visitorId;

    /** 人员ID */
    @Excel(name = "人员ID")
    protected Long userId;

    /** 访客数目 */
    @Excel(name = "访客数目")
    protected Integer num;

    /** 来访事由 */
    @Excel(name = "来访事由")
    protected String reason;

    /** 记录状态 */
    @Excel(name = "记录状态")
    protected Integer recordStatus;

    /** 邀约访问日期 */
    @Excel(name = "邀约访问日期")
    protected Date visitDate;

    /** 邀约访问时间 */
    @Excel(name = "邀约访问时间")
    protected Date visitTime;

    /** 邀约访问时长 */
    @Excel(name = "邀约访问时长")
    protected Integer duration;

    /** 所属组织ID */
    @Excel(name = "所属组织ID")
    protected Long deptId;


    protected String visitorCode;

    private String receiverName;

    private String receiverPhone;




    public String toString(){
        return  new StringBuilder("VisitorId: ").append(visitorId).append(", UserId: ").append(userId).append(", VisitDate: ").append(visitDate).append(", VisitTime: ").append(visitTime).append(", Duration: ").append(duration).append(", RecordStatus: ").append(recordStatus).append(", DeptId: ").append(deptId).append(", Num: ").append(num).toString();
    }
}