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

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
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 ProjectReportDefaultDraftReqVO {

    @NotBlank(message = "周期编码不能为空")
    private String periodKey;

    @NotBlank(message = "周期名称不能为空")
    private String periodLabel;

    @NotNull(message = "周期开始日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate periodStartDate;

    @NotNull(message = "周期结束日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate periodEndDate;

    @NotNull(message = "上半月/下半月标记不能为空")
    private Integer flag;
}
