package jnpf.model.attendance.dto.scheduling;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 预排班生成主表请求体。
 *
 * @author xiaofeng
 * @create 2026-05-13
 */
@Data
@Schema(description = "预排班生成主表查询条件")
public class PreScheduleTableQueryDto {

    @NotBlank
    @Schema(description = "开始日期 yyyy-MM-dd", example = "2026-04-08", requiredMode = Schema.RequiredMode.REQUIRED)
    private String startDate;

    @NotBlank
    @Schema(description = "结束日期 yyyy-MM-dd，须 ≥ startDate", example = "2026-04-14", requiredMode = Schema.RequiredMode.REQUIRED)
    private String endDate;

    @NotNull
    @Schema(description = "人效目标（元/人）", example = "3600.5", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal effTarget;

    @NotBlank
    @Schema(description = "考勤组 ID", example = "group-uuid-001", requiredMode = Schema.RequiredMode.REQUIRED)
    private String groupId;

    /**
     * 区间内每个自然日一条，顺序可与日历一致；须与 {@code [startDate, endDate]} 闭区间日数一致且日期不重复、均在范围内。
     */
    @NotEmpty
    @Valid
    @Schema(description = "按日预估营业额（元），与界面「预估营业额」列一致，一日一项", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<PreScheduleDayRevenueDto> dailyRevenues;
}
