package cn.iocoder.yudao.module.system.service.attendance.punch.dto;

import cn.hutool.core.date.LocalDateTimeUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;

@Data
public class AttendanceOnTheDayDTO {

    /**
     * 打卡状态 0正常 1迟到 2早退 3缺卡 4未打卡(还没到打卡时间)
     */
    public static final Integer PUNCH_STATUS_NORMAL = 0;
    public static final Integer PUNCH_STATUS_LATE = 1;
    public static final Integer PUNCH_STATUS_LEAVE_EARLY = 2;
    public static final Integer PUNCH_STATUS_MISS = 3;
    public static final Integer PUNCH_STATUS_UN_PUNCH = 4;

    @Schema(description = "子表id")
    private Long id;

    @Schema(description = "类型 0上班 1下班")
    private Integer type;

    @Schema(description = "级别 从1到～ 排序用")
    private Integer level;

    @Schema(description = "应该打卡时间 HH:mm")
    private String time;

    @Schema(description = "打卡时间 HH:mm")
    private String punchTime;

    @Schema(description = "前打卡时间（分钟） 默认 120分钟")
    private Integer beforePunchTime;

    @Schema(description = "后打卡时间（分钟） 默认 120分钟")
    private Integer afterPunchTime;

    @Schema(description = "打卡状态 0正常 1迟到 2早退 3缺卡 4未打卡(还没到打卡时间)")
    private Integer punchStatus;

    @Schema(description = "是否外勤 0否 1是", example = "1")
    private Integer fieldServiceFlag;

    @Schema(description = "用户打卡地点")
    private String punchAddress;

    @Schema(description = "打卡备注", example = "你说的对")
    private String remark;

    @Schema(description = "图片")
    private String image;

    @Schema(description = "应打卡时间")
    private LocalDateTime shouldPunchTime;

    @Schema(description = "打卡时间")
    private LocalDateTime punchLocalDateTime;


    @Schema(description = "迟到时长时间戳")
    private Long lateTime;

    @Schema(description = "早退时长时间戳")
    private Long leaveEarlyTime;

}