package com.yh.saas.plugin.yiliangyiyun.entity;

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


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 com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 记录打卡信息
 * </p>
 *
 * @author Gdc
 * @since 2022-06-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("clock_info")
public class ClockInfo extends BaseModel<ClockInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 公司id
     */
    private String compId;
    /**
     * 请假id
     */
    private String leaveId;
    /**
     * 用户id
     */
    private String commonId;
    /**
     * 部门
     */
    private String dept;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 员工姓名
     */
    private String empName;
    /**
     * 打卡原因(1上班3下班)
     */
    private String clockType;
    /**
     * 打卡距离
     */
    private Double clockDistance;
    /**
     * 早退标识(1是)
     */
    private String leaveEarlyFlag;
    /**
     * 迟到标识(1是)
     */
    private String lateFlag;
    /**
     * 目标位置
     */
    private String targetLocation;
    /**
     * 上班打卡时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date toClockDate;
    /**
     * 下班打卡时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date offClockDate;
    /**
     * 请假类型
     */
    private String leaveType;
    /**
     * 补卡原因(1上班3下班)
     */
    private String supplementClockType;
    /**
     * 申请理由
     */
    private String reasonForApplication;
    /**
     * 补卡状态
     */
    private String status;
    /**
     * 状态标识
     */
    private String statusFlag;
    /**
     * 审核状态
     */
    private String approveStatus;
    /**
     * 工作流ID
     */
    private String workflowId;
    /**
     * APP端(传0)
     */
    @TableField(exist = false)
    private String pcFlag;
    /**
     *
     */
    @TableField(exist = false)
    private List<ClockInfo> clockInfoList;
    /**
     * 通过1驳回2
     */
    @TableField(exist = false)
    private Integer examineFlag;
    /**
     * 模糊查询
     */
    @TableField(exist = false)
    private String searchKeyWord;
    /**
     * 年月
     */
    @JsonFormat(pattern = "yyyy-MM")
    @DateTimeFormat(pattern = "yyyy-MM")
    @TableField(exist = false)
    private Date yearMonth;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date startDate;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date endDate;

    @TableField(exist = false)
    private String taskId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
