package jnpf.model.attendance.model;

import jnpf.enums.attendance.AttendanceNoticeEnum;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

/**
 * 缺卡/缺勤消息model
 *
 * @author yanwenfu
 * @create 2024-08-13
 */
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class NoClockInNoticeModel extends AttendanceNoticeModel {

    /** 工作时间(上班) */
    private Date onWorkTime;
    /** 工作时间(下班) */
    private Date offWorkTime;
    /** 打卡类型(1: 上班, 2: 下班) */
    private Integer clockInType;
    /** 是否缺勤(1: 是, 0: 否) 缺勤的时候上下班时间才同时有 */
    private Integer absence;
    /** 打卡结果id */
    private String clockInResultId;

    public void setAttendanceNoticeModel(String userId, String groupId, String tenantId, Date day, AttendanceNoticeEnum attendanceNoticeEnum) {
        super.setUserId(userId);
        super.setGroupId(groupId);
        super.setTenantId(tenantId);
        super.setDay(day);
        super.setAttendanceNoticeEnum(attendanceNoticeEnum);
    }
}
