package com.reading.platform.dto.response;

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

/**
 * 孩子详情响应
 */
@Data
@Schema(description = "孩子详情响应")
public class ChildDetailResponse {

    @Schema(description = "孩子 ID", example = "1")
    private String id;

    @Schema(description = "孩子姓名", example = "张三")
    private String name;

    @Schema(description = "性别", example = "male")
    private String gender;

    @Schema(description = "出生日期", example = "2018-01-01")
    private String birthDate;

    @Schema(description = "阅读次数", example = "10")
    private Integer readingCount;

    @Schema(description = "课时数", example = "20")
    private Integer lessonCount;

    @Schema(description = "统计信息")
    private ChildStats stats;

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

    @Schema(description = "关系", example = "parent")
    private String relationship;

    /**
     * 统计信息内部类
     */
    @Data
    @Schema(description = "孩子统计信息")
    public static class ChildStats {
        @Schema(description = "课时记录数", example = "20")
        private Integer lessonRecords;
        @Schema(description = "成长记录数", example = "5")
        private Integer growthRecords;
        @Schema(description = "任务完成数", example = "15")
        private Integer taskCompletions;
    }

    /**
     * 班级信息内部类
     */
    @Data
    @Schema(description = "班级信息")
    public static class ClassInfo {
        @Schema(description = "班级 ID")
        private String id;
        @Schema(description = "班级名称")
        private String name;
        @Schema(description = "年级")
        private String grade;
    }
}
