package cn.com.oa.model;

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 lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 考勤记录表
 * @TableName hr_attendance_record
 */
@TableName(value ="hr_attendance_record")
@Data
public class AttendanceRecord implements Serializable {
    /**
     * 考勤记录id
     */
    @TableId(type = IdType.AUTO)
    private Long recordId;

    /**
     * 考勤用户编号
     */
    private String attUserId;

    /**
     * 考勤用户名称
     */
    private String attUserName;

    /**
     * 
     */
    private Long sysUserId;

    /**
     * 考勤记录时间
     */
    private Date attTime;

    /**
     * 出勤日期
     */
    private Date attDate;

    /**
     * 考勤类型
     */
    private String attTypeId;

    /**
     * 签到方式,1:考勤机数据导入;2:手工补签到;3:手机签到
     */
    private String signType;

    /**
     * 经度
     */
    private String longitude;

    /**
     * 纬度
     */
    private String latitude;

    /**
     * 位置
     */
    private String location;

    /**
     * 说明
     */
    private String remark;

    /**
     * 创建用户
     */
    private Long createUser;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 公司id
     */
    private Long unitId;

    /**
     * 外出类型(1出发，2到达，3返回)
     */
    private String outType;

    /**
     * 外出地点
     */
    private String outAddress;

    /**
     * 
     */
    private String allday;

    /**
     * 特殊考勤使用（1为可显示，设置0为不显示）
     */
    private String specialType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AttendanceRecord other = (AttendanceRecord) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getAttUserId() == null ? other.getAttUserId() == null : this.getAttUserId().equals(other.getAttUserId()))
            && (this.getAttUserName() == null ? other.getAttUserName() == null : this.getAttUserName().equals(other.getAttUserName()))
            && (this.getSysUserId() == null ? other.getSysUserId() == null : this.getSysUserId().equals(other.getSysUserId()))
            && (this.getAttTime() == null ? other.getAttTime() == null : this.getAttTime().equals(other.getAttTime()))
            && (this.getAttDate() == null ? other.getAttDate() == null : this.getAttDate().equals(other.getAttDate()))
            && (this.getAttTypeId() == null ? other.getAttTypeId() == null : this.getAttTypeId().equals(other.getAttTypeId()))
            && (this.getSignType() == null ? other.getSignType() == null : this.getSignType().equals(other.getSignType()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUnitId() == null ? other.getUnitId() == null : this.getUnitId().equals(other.getUnitId()))
            && (this.getOutType() == null ? other.getOutType() == null : this.getOutType().equals(other.getOutType()))
            && (this.getOutAddress() == null ? other.getOutAddress() == null : this.getOutAddress().equals(other.getOutAddress()))
            && (this.getAllday() == null ? other.getAllday() == null : this.getAllday().equals(other.getAllday()))
            && (this.getSpecialType() == null ? other.getSpecialType() == null : this.getSpecialType().equals(other.getSpecialType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getAttUserId() == null) ? 0 : getAttUserId().hashCode());
        result = prime * result + ((getAttUserName() == null) ? 0 : getAttUserName().hashCode());
        result = prime * result + ((getSysUserId() == null) ? 0 : getSysUserId().hashCode());
        result = prime * result + ((getAttTime() == null) ? 0 : getAttTime().hashCode());
        result = prime * result + ((getAttDate() == null) ? 0 : getAttDate().hashCode());
        result = prime * result + ((getAttTypeId() == null) ? 0 : getAttTypeId().hashCode());
        result = prime * result + ((getSignType() == null) ? 0 : getSignType().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUnitId() == null) ? 0 : getUnitId().hashCode());
        result = prime * result + ((getOutType() == null) ? 0 : getOutType().hashCode());
        result = prime * result + ((getOutAddress() == null) ? 0 : getOutAddress().hashCode());
        result = prime * result + ((getAllday() == null) ? 0 : getAllday().hashCode());
        result = prime * result + ((getSpecialType() == null) ? 0 : getSpecialType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", attUserId=").append(attUserId);
        sb.append(", attUserName=").append(attUserName);
        sb.append(", sysUserId=").append(sysUserId);
        sb.append(", attTime=").append(attTime);
        sb.append(", attDate=").append(attDate);
        sb.append(", attTypeId=").append(attTypeId);
        sb.append(", signType=").append(signType);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", location=").append(location);
        sb.append(", remark=").append(remark);
        sb.append(", createUser=").append(createUser);
        sb.append(", createDate=").append(createDate);
        sb.append(", unitId=").append(unitId);
        sb.append(", outType=").append(outType);
        sb.append(", outAddress=").append(outAddress);
        sb.append(", allday=").append(allday);
        sb.append(", specialType=").append(specialType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}