package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

/**
 * 动态表单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
@ExcelIgnoreUnannotated
@Accessors(chain = false)
public class LogStatisticsExcelVO {
    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "名称")
    @ExcelProperty("名称")
    private String nickname;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "部门id")
    private Long deptId;

    @Schema(description = "部门名称")
    @ExcelProperty("部门名称")
    private String deptName;

    @Schema(description = "日志id", example = "30875")
    private Long logInstanceExtId;

    @Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
    @ExcelProperty(value = "提交状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.WORK_LOG_SUBMIT_STATUS)
    private Integer status;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    @ExcelProperty(value = "提交时间")
    private Date createTime;
}

