package jnpf.model.attendance.vo;

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

/**
 * 提醒打卡时间点vo
 *
 * @author yanwenfu
 * @create 2023-12-04
 */
@Getter
@Setter
@NoArgsConstructor
public class RemindClockInVo {

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

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

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

    /** 工作时间(上班/下班) */
    private String workTime;

    /** 提醒时间 */
    private String remindTime;

    /** 是否处理(1: 是, 0: 否) */
    private Integer deal;

    /** 版本(排班后ruleId不变会导致v+=1)[考勤提醒暂未使用] */
    private Integer v;

    public RemindClockInVo(String userId, String ruleId, Integer clockInType, String workTime, String remindTime) {
        this.userId = userId;
        this.ruleId = ruleId;
        this.clockInType = clockInType;
        this.workTime = workTime;
        this.remindTime = remindTime;
        this.deal = ConstantUtil.NUM_FALSE;
    }

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