package com.lesingle.edu.dto.response;

import com.fasterxml.jackson.annotation.JsonProperty;
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;

/**
 * 家长端成长档案响应
 * 对齐前端 GrowthRecord 结构：images 为数组，recordType，class
 */
@Data
@Builder
@Schema(description = "家长端成长档案响应")
public class GrowthRecordForParentResponse {

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

    @Schema(description = "标题")
    private String title;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "图片URL列表")
    private List<String> images;

    @Schema(description = "记录日期")
    private LocalDate recordDate;

    @Schema(description = "记录类型")
    private String recordType;

    @JsonProperty("class")
    @Schema(description = "班级信息")
    private ClassInfo classInfo;

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

    @Data
    @Builder
    @Schema(description = "班级信息")
    public static class ClassInfo {
        @Schema(description = "班级ID")
        private Long id;

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