package com.njcn.rdms.module.project.controller.admin.project.task.vo.aggregate;

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

import java.time.LocalDateTime;
import java.util.List;

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

@Schema(description = "管理后台 - 项目级跨执行任务状态看板 Request VO(入参同 page 去掉分页 / statusCodes / sort)")
@Data
public class ProjectTaskAggregateStatusBoardReqVO {

    @Schema(description = "任务名称模糊匹配关键字")
    private String keyword;

    @Schema(description = "限定执行 id 列表;空数组 = 明确返空;不传 = 项目内全部执行")
    private List<Long> executionIds;

    @Schema(description = "限定任务所属执行的状态码多选;空数组 = 明确返空;不传 = 不按执行状态过滤")
    private List<String> executionStatusCodes;

    @Schema(description = "我参与语义;与 ownerId 二选一")
    private Long involveUserId;

    @Schema(description = "执行成员语义:该 userId 是执行 owner 或活跃执行协办;过滤其参与的执行下的任务。与 involveUserId(任务成员)正交,可同传;用户未参与任何执行时返空")
    private Long executionInvolveUserId;

    @Schema(description = "仅作为 owner 匹配;与 involveUserId 二选一")
    private Long ownerId;

    @Schema(description = "优先级")
    @Size(max = 8)
    private String priority;

    @Schema(description = "父任务 id")
    private Long parentTaskId;

    @Schema(description = "到期范围 chip:overdue / today / thisWeek")
    private String dueRange;

    @Schema(description = "更新时间范围")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] updateTime;
}
