package com.lesingle.edu.dto.response;

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

import java.time.LocalDateTime;

/**
 * 家长端阅读记录响应（孩子在园上课记录）
 * 对齐前端 LessonRecord 结构
 */
@Data
@Builder
@Schema(description = "家长端阅读记录响应")
public class LessonRecordResponse {

    @Schema(description = "记录ID（student_record.id）")
    private Long id;

    @Schema(description = "课程信息")
    private LessonInfo lesson;

    @Schema(description = "专注度评分")
    private Integer focus;

    @Schema(description = "参与度评分")
    private Integer participation;

    @Schema(description = "兴趣度评分")
    private Integer interest;

    @Schema(description = "理解度评分")
    private Integer understanding;

    @Schema(description = "备注")
    private String notes;

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

    @Data
    @Builder
    @Schema(description = "课程信息")
    public static class LessonInfo {
        @Schema(description = "课程ID")
        private Long id;

        @Schema(description = "开始时间")
        private LocalDateTime startDatetime;

        @Schema(description = "结束时间")
        private LocalDateTime endDatetime;

        @Schema(description = "实际时长（分钟）")
        private Integer actualDuration;

        @Schema(description = "关联课程包")
        private CourseInfo course;
    }

    @Data
    @Builder
    @Schema(description = "课程包信息")
    public static class CourseInfo {
        @Schema(description = "课程包ID")
        private Long id;

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

        @Schema(description = "绘本名称")
        private String pictureBookName;
    }
}
