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

import com.njcn.rdms.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

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

@Schema(description = "管理后台 - 执行分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class ProjectExecutionPageReqVO extends PageParam {

    @Schema(description = "关键词，匹配执行名称", example = "联调")
    private String keyword;

    @Schema(description = "执行类型", example = "feature")
    @Size(max = 32, message = "执行类型长度不能超过32个字符")
    private String executionType;

    @Schema(description = "执行负责人用户编号", example = "3001")
    private Long ownerId;

    @Schema(description = "执行状态编码", example = "pending")
    @Size(max = 32, message = "执行状态编码长度不能超过32个字符")
    private String statusCode;

    @Schema(description = "更新时间", example = "[2026-04-01 00:00:00, 2026-04-30 23:59:59]")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] updateTime;

}
