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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;
import java.util.Map;

@Schema(description = "管理后台 - 日志实例的拓展 Response VO")
@Data
@ExcelIgnoreUnannotated
public class LogInstanceRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20649")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "日志发起人的用户编号",  example = "146")
    private Long startUserId;

    @Schema(description = "日志发起人的部门编号", example = "128")
    private Long deptId;

    @Schema(description = "日志发起人的用户名称", example = "张三")
    private String startUserName;

    @Schema(description = "日志发起人的用户头像", example = "https://www.iocoder.cn/xxx.png")
    private String avatar;

    @Schema(description = "日志实例的名字", example = "张三的XX日报")
    private String name;

    @Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
    private Integer type;

    @Schema(description = "模板编号", example = "11857")
    private Long formId;

    @Schema(description = "模板值")
    private String formVariables;

    @Schema(description = "工作日志内容(部分) | 分页列表使用")
    private String workLogContent;

    @Schema(description = "工作日志内容详情")
    private List<Map<String, String>> logDetail;

    @Schema(description = "附件信息")
    private String fileItems ;

    @Schema(description = "日志日期")
    private String time;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    @Schema(description = "阅读状态， 0:未读、1:已读", example = "0")
    private String readStatus;

    @Schema(description = "评论数", example = "10")
    private Integer comment;

    @Schema(description = "已读人数", example = "10")
    private Integer readCount;

    @Schema(description = "未读人数", example = "10")
    private Integer unreadCount;

}