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.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * 日历视图响应
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "日历视图响应")
public class CalendarViewResponse {

    @Schema(description = "开始日期")
    private LocalDate startDate;

    @Schema(description = "结束日期")
    private LocalDate endDate;

    @Schema(description = "按日期分组的排课数据")
    private Map<String, List<DayScheduleItem>> schedules;

    /**
     * 日历项
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "日历项")
    public static class DayScheduleItem {

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

        @Schema(description = "班级名称")
        private String className;

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

        @Schema(description = "课程类型代码 (如 DOMAIN_HEALTH)")
        private String lessonType;

        @Schema(description = "课程类型名称")
        private String lessonTypeName;

        @Schema(description = "教师名称")
        private String teacherName;

        @Schema(description = "时间段")
        private String scheduledTime;

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