package com.lesingle.edu.dto.response;

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

import java.util.List;

/**
 * 套餐筛选元数据响应
 * 用于返回套餐下课程包的筛选选项（年级、课程配置）
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "套餐筛选元数据响应")
public class PackageFilterMetaResponse {

    @Schema(description = "年级选项列表")
    private List<GradeOption> grades;

    @Schema(description = "课程配置选项列表（导入课、集体课、健康、科学等）")
    private List<LessonTypeOption> lessonTypes;

    @Schema(description = "课程包主题选项列表")
    private List<ThemeOption> themes;

    /**
     * 年级选项
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "年级选项")
    public static class GradeOption {
        @Schema(description = "年级名称")
        private String label;

        @Schema(description = "该年级下的课程包数量")
        private Integer count;
    }

    /**
     * 课程配置选项（课程环节类型）
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "课程配置选项")
    public static class LessonTypeOption {
        @Schema(description = "课程类型编码，如 INTRODUCTION、COLLECTIVE、HEALTH")
        private String lessonType;

        @Schema(description = "课程类型中文名称，如 导入课、集体课、健康")
        private String name;

        @Schema(description = "包含该类型环节的课程包数量")
        private Integer count;
    }

    /**
     * 课程包主题选项
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "课程包主题选项")
    public static class ThemeOption {
        @Schema(description = "主题ID")
        private Long themeId;

        @Schema(description = "主题名称")
        private String name;

        @Schema(description = "该主题下的课程包数量")
        private Integer count;
    }
}
