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

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

import java.util.List;

/**
 * 看板视图任务分页 Response VO。
 * <p>每个 item 表示一列：列定义（statusCode/statusName/sort/terminal）+ 当前页切片（list）+ 该列在当前过滤条件下的总数（total）。
 * list 元素结构与 {@link ProjectTaskRespVO} 完全一致。
 */
@Schema(description = "管理后台 - 任务看板分页 Response VO")
@Data
public class ProjectTaskBoardPageRespVO {

    @Schema(description = "列数组（按 sort 升序）", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ColumnItemVO> items;

    @Schema(description = "任务看板单列分页")
    @Data
    public static class ColumnItemVO {

        @Schema(description = "状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "pending")
        private String statusCode;

        @Schema(description = "状态名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "待开始")
        private String statusName;

        @Schema(description = "排序权重（与 /status-board.items[].sort 同源）", requiredMode = Schema.RequiredMode.REQUIRED,
                example = "10")
        private Integer sort;

        @Schema(description = "是否终态", example = "false")
        private Boolean terminal;

        @Schema(description = "该列当前页切片；元素结构与 /tasks/page 的 list 元素一致",
                requiredMode = Schema.RequiredMode.REQUIRED)
        private List<ProjectTaskRespVO> list;

        @Schema(description = "该列在当前过滤条件下的总数", requiredMode = Schema.RequiredMode.REQUIRED, example = "12")
        private Long total;

    }

}
