package com.njcn.rdms.module.project.controller.admin.workreport.team.vo;

import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

@Schema(description = "管理后台 - 团队工作报告统计 Response VO")
@Data
public class TeamReportSummaryRespVO {

    @Schema(description = "实际查询周期起始日期")
    private LocalDate periodStartDate;

    @Schema(description = "实际查询周期结束日期")
    private LocalDate periodEndDate;

    @Schema(description = "应填报告数", requiredMode = Schema.RequiredMode.REQUIRED, example = "18")
    private Integer expectedReportCount;

    @Schema(description = "已提交报告数", requiredMode = Schema.RequiredMode.REQUIRED, example = "12")
    private Integer submittedReportCount;

    @Schema(description = "未提交报告数", requiredMode = Schema.RequiredMode.REQUIRED, example = "6")
    private Integer unsubmittedReportCount;

    @Schema(description = "待审批报告数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
    private Integer pendingApprovalReportCount;

    @Schema(description = "未提交报告槽位列表")
    private List<UnsubmittedReport> unsubmittedReports;

    @Schema(description = "未提交报告槽位")
    @Data
    public static class UnsubmittedReport {

        @Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2042074259501088770")
        @com.fasterxml.jackson.databind.annotation.JsonSerialize(using = ToStringSerializer.class)
        private Long userId;

        @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "戴坤")
        private String userNickname;

        @Schema(description = "周期主键", requiredMode = Schema.RequiredMode.REQUIRED,
                example = "weekly-2026-06-22-2026-06-28")
        private String periodKey;

        @Schema(description = "周期名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026-06-22 至 2026-06-28")
        private String periodLabel;

        @Schema(description = "项目 ID，仅项目半月报返回", example = "2042074259501088770")
        @com.fasterxml.jackson.databind.annotation.JsonSerialize(using = ToStringSerializer.class)
        private Long projectId;

        @Schema(description = "项目名称，仅项目半月报返回", example = "RDMS")
        private String projectName;
    }
}
