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

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

import java.util.List;
import java.util.Map;

@Schema(description = "管理后台 - 产品入口页概览统计 Response VO")
@Data
public class ProductOverviewSummaryRespVO {

    @Schema(description = "产品状态数量，按当前启用的产品状态模型返回（兼容旧前端的过渡字段，前端改造完成后移除）")
    private Map<String, Long> statusCounts;

    @Schema(description = "「全部」口径总数 = items 各状态 count 之和（产品域当前无「全部」视图，口径同项目域：启用状态全集）", example = "12")
    private Long total;

    @Schema(description = "状态看板项列表，覆盖状态机全部启用状态，按 sort 升序；状态机新增启用状态自动进入清单")
    private List<StatusBoardItemVO> items;

    @Schema(description = "产品状态看板项")
    @Data
    public static class StatusBoardItemVO {

        @Schema(description = "状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "active")
        private String statusCode;
        @Schema(description = "状态名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "启用")
        private String statusName;
        @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
        private Long count;
        @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        private Integer sort;
        @Schema(description = "是否终态", example = "false")
        private Boolean terminal;
        @Schema(description = "是否计入「全部」（当前口径无排除项，恒为 true）", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
        private Boolean includeInAll;

    }

}
