package com.zd.laboratory.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zd.common.core.annotation.Excel;
import com.zd.common.core.web.domain.BaseEntity;

/**
 * 实验室进出记录对象 lab_subject_access_record
 *
 * @author zd
 * @date 2021-08-30
 */
@ApiModel("实验室进出记录表")
public class LabSubjectAccessRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /**
     * 出进人员id
     */
    @ApiModelProperty("出进人员id")
    private Long joinUserId;

    /**
     * 实验室id
     */
    @ApiModelProperty("实验室id")
    private Long subjectId;

    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty("部门名称")
    @Excel(name = "院系",sort = 2)
    private String deptName;

    /**
     * 进入时间
     */
    @ApiModelProperty("进入时间")
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    @Excel(name = "进入时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 4)
    private Date inTime;

    /**
     * 离开时间
     */
    @ApiModelProperty("离开时间")
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    @Excel(name = "离开时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 5)
    private Date outTime;

    /**
     * 创建人（用于数据权限）
     */
    @ApiModelProperty("创建人（用于数据权限）")
    private Long userId;

    /**
     * 状态（1是打卡进入，2是打卡离开，3是异常（离开未打卡））
     */
    private Long accessStatus;

    /**
     * 是否是初始化
     */
    private Boolean initFlag;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setJoinUserId(Long joinUserId) {
        this.joinUserId = joinUserId;
    }

    public Long getJoinUserId() {
        return joinUserId;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setInTime(Date inTime) {
        this.inTime = inTime;
    }

    public Date getInTime() {
        return inTime;
    }

    public void setOutTime(Date outTime) {
        this.outTime = outTime;
    }

    public Date getOutTime() {
        return outTime;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public Long getAccessStatus() {
        return accessStatus;
    }

    public void setAccessStatus(Long accessStatus) {
        this.accessStatus = accessStatus;
    }

    public Boolean getInitFlag() {
        return initFlag;
    }

    public void setInitFlag(Boolean initFlag) {
        this.initFlag = initFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("joinUserId", getJoinUserId())
                .append("subjectId", getSubjectId())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("inTime", getInTime())
                .append("outTime", getOutTime())
                .append("createTime", getCreateTime())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("accessStatus", getAccessStatus())
                .toString();
    }
}
