package jnpf.model.attendance.vo;

import jnpf.util.ConstantUtil;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.HashSet;
import java.util.Set;

/**
 * 缺卡时间点vo
 *
 * @author yanwenfu
 * @create 2023-12-04
 */
@Getter
@Setter
@NoArgsConstructor
public class AbsenceClockInVo {

    /** 用户id */
    private String userId;

    /** 出勤规则(普班/加班) */
    private String ruleId;

    /** 打卡类型(1: 上班, 2: 下班) */
    private Integer clockInType;

    /** 缺卡时间 */
    private String absenceTime;

    /** 是否处理(2: 完成, 1: 处理中, 0: 待处理) */
    private Integer deal;

    /** 版本(排班后ruleId不变会导致v+=1) */
    private Integer v;

    public AbsenceClockInVo(String userId, String ruleId, Integer clockInType, String absenceTime) {
        this.userId = userId;
        this.ruleId = ruleId;
        this.clockInType = clockInType;
        this.absenceTime = absenceTime;
        this.deal = ConstantUtil.NUM_FALSE;
        this.v = ConstantUtil.ZERO;
    }

    public Integer getOrDefaultV() {
        return null == v ? 0 : v;
    }
}
