package com.yc.ship.module.trade.controller.admin.report.vo;

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

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

/**
 * 客源地分析看板响应 VO
 */
@Schema(description = "管理后台 - 客源地分析看板响应")
@Data
public class VisitorSourceDashboardRespVO {

    @Schema(description = "国内客源地列表（按省份分组，按人数降序）")
    private List<VisitorSourceItemVO> domesticSourceList;

    @Schema(description = "国际客源地列表（按国家分组，按人数降序）")
    private List<VisitorSourceItemVO> internationalSourceList;

    @Schema(description = "省份来源排行（省份名称列表，按人数降序）")
    private List<String> provinceRankList;

    @Schema(description = "全国城市来源排行（城市名称列表，按人数降序）")
    private List<String> nationalCityRankList;

    @Schema(description = "省份-城市排行映射（key=省份名称, value=该省份按人数排序的城市名称列表）")
    private Map<String, List<String>> provinceCityRankMap;

    @Schema(description = "国内总人数")
    private Integer domesticTotal;

    @Schema(description = "国际总人数")
    private Integer internationalTotal;

    /**
     * 客源地单项 VO
     */
    @Schema(description = "客源地单项")
    @Data
    public static class VisitorSourceItemVO {

        @Schema(description = "名称（省份/国家）")
        private String name;

        @Schema(description = "人数")
        private Integer count;

        @Schema(description = "占比，如 60.00%")
        private String ratio;

    }

}
