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

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

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

    @Schema(description = "报告类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "weekly")
    @NotBlank(message = "报告类型不能为空")
    private String reportType;

    @Schema(description = "周期主键（单周期查询时使用，与日期区间二选一）", example = "weekly-2026-06-08-2026-06-14")
    private String periodKey;

    @Schema(description = "周期起始日期（区间查询时使用，与 periodKey 二选一）", example = "2026-06-15")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate periodStartDate;

    @Schema(description = "周期结束日期（区间查询时使用，与 periodKey 二选一）", example = "2026-06-28")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate periodEndDate;
}
