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;

/**
 * 家长端孩子列表响应
 * 对齐前端 ChildInfo 结构
 */
@Data
@Builder
@Schema(description = "家长端孩子列表响应")
public class ChildInfoResponse {

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

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

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

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

    @Schema(description = "与家长关系：FATHER/MOTHER/GRANDFATHER/GRANDMOTHER/OTHER")
    private String relationship;

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

    @Schema(description = "阅读次数（student_record 数量）")
    private Integer readingCount;

    @Schema(description = "上课次数（lesson 记录数）")
    private Integer lessonCount;

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

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

        @Schema(description = "年级")
        private String grade;
    }
}
