package org.dromara.project.domain.vo.attendance;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.project.domain.BusAttendance;

import java.util.Date;

/**
 * @author lcj
 * @date 2025/4/7 15:27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BusAttendanceListByDay {

    /**
     * 上下班（1上班,2下班）
     */
    private String commuter;

    /**
     * 打卡时间
     */
    private Date clockTime;

    /**
     * 打卡状态(1正常,2迟到,3早退,4缺勤,5补卡)
     */
    private String clockStatus;

    public static BusAttendanceListByDay build(BusAttendance attendance) {
        if (attendance == null) {
            return null;
        }
        BusAttendanceListByDay attendanceListByDay = new BusAttendanceListByDay();
        attendanceListByDay.setCommuter(attendance.getCommuter());
        attendanceListByDay.setClockTime(attendance.getClockTime());
        attendanceListByDay.setClockStatus(attendance.getClockStatus());
        return attendanceListByDay;
    }

}
