package com.lesingle.edu.dto.response;

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

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

/**
 * 课程套餐响应（两层结构-最上层）
 */
@Data
@Builder
@Schema(description = "课程套餐响应")
public class CourseCollectionResponse {

    @Schema(description = "ID")
    private Long id;

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

    @Schema(description = "描述")
    private String description;

    @Schema(description = "价格（分）")
    private Long price;

    @Schema(description = "折后价格（分）")
    private Long discountPrice;

    @Schema(description = "折扣类型")
    private String discountType;

    @Schema(description = "年级水平（数组）")
    private String[] gradeLevels;

    @Schema(description = "课程包数量")
    private Integer packageCount;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "提交时间")
    private LocalDateTime submittedAt;

    @Schema(description = "提交人ID")
    private Long submittedBy;

    @Schema(description = "审核时间")
    private LocalDateTime reviewedAt;

    @Schema(description = "审核人ID")
    private Long reviewedBy;

    @Schema(description = "审核意见")
    private String reviewComment;

    @Schema(description = "发布时间")
    private LocalDateTime publishedAt;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "开始日期（租户套餐）")
    private LocalDate startDate;

    @Schema(description = "结束日期（租户套餐）")
    private LocalDate endDate;

    @Schema(description = "包含的课程包列表")
    private List<CoursePackageItem> packages;

    /**
     * 课程包项
     */
    @Data
    @Schema(description = "课程包项")
    public static class CoursePackageItem {
        @Schema(description = "课程包ID")
        private Long id;

        @Schema(description = "课程包名称")
        private String name;

        @Schema(description = "课程包描述")
        private String description;

        @Schema(description = "适用年级")
        private String[] gradeLevels;

        @Schema(description = "课程数量")
        private Integer courseCount;

        @Schema(description = "排序号")
        private Integer sortOrder;
    }
}
