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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.project.domain.BusAttendance;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 考勤视图对象 bus_attendance
 *
 * @author lcj
 * @date 2025-04-07
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BusAttendance.class)
public class BusAttendanceVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 人员id
     */
    private Long userId;

    /**
     * 人员姓名
     */
    @ExcelProperty(value = "人员姓名")
    private String userName;

    /**
     * 班组id
     */
    private Long teamId;

    /**
     * 工种
     */
    @ExcelProperty(value = "工种", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "type_of_work")
    private String typeOfWork;

    /**
     * 人脸照
     */
    private String facePic;

    /**
     * 项目id
     */
    @ExcelProperty(value = "项目id")
    private Long projectId;

    /**
     * 打卡时间
     */
    @ExcelProperty(value = "打卡时间")
    private Date clockTime;

    /**
     * 打卡日期
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING,
        pattern = "yyyy-MM-dd",
        timezone = "GMT+8")
    @ExcelProperty(value = "打卡日期")
    private Date clockDate;

    /**
     * 打卡状态(1正常,2迟到,3早退,4缺勤,5补卡)
     */
    @ExcelProperty(value = "打卡状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "clock_status_type")
    private String clockStatus;

    /**
     * 代打人员id
     */
    private Long pinchUserId;

    /**
     * 多次打卡时间记录
     */
    @ExcelProperty(value = "多次打卡时间记录")
    private String clockRecord;

    /**
     * 上下班（1上班,2下班）
     */
    @ExcelProperty(value = "上下班", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "commuter_type")
    private String commuter;

    /**
     * 打卡范围
     */
    @ExcelProperty(value = "打卡范围")
    private String punchRange;

    /**
     * 日薪
     */
    @ExcelProperty(value = "日薪")
    private Long dailyWage;

    /**
     * 经度
     */
    @ExcelProperty(value = "经度")
    private String lng;

    /**
     * 纬度
     */
    @ExcelProperty(value = "纬度")
    private String lat;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

}
