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;

/**
 * 家长端孩子详情响应
 * 对齐前端 ChildProfile 结构（ChildInfo + stats）
 */
@Data
@Builder
@Schema(description = "家长端孩子详情响应")
public class ChildProfileResponse {

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

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

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

    @Schema(description = "出生日期")
    private LocalDate birthDate;

    @Schema(description = "与家长关系")
    private String relationship;

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

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

    @Schema(description = "上课次数")
    private Integer lessonCount;

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

    @Data
    @Builder
    @Schema(description = "统计信息")
    public static class StatsInfo {
        @Schema(description = "阅读记录数")
        private Integer lessonRecords;

        @Schema(description = "成长档案数")
        private Integer growthRecords;

        @Schema(description = "任务完成数")
        private Integer taskCompletions;
    }
}
