package com.lesingle.edu.dto.response;

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

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 学生响应
 * 用于返回学生信息给前端
 */
@Data
@Builder
@Schema(description = "学生响应")
public class StudentResponse {

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

    @Schema(description = "租户 ID")
    private Long tenantId;

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

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

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

    @Schema(description = "头像 URL")
    private String avatarUrl;

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

    @Schema(description = "学号")
    private String studentNo;

    @Schema(description = "阅读水平")
    private String readingLevel;

    @Schema(description = "兴趣爱好")
    private String interests;

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

    @Schema(description = "状态")
    private String status;

    @Schema(description = "所在班级 ID（从 student_class_history 当前关联获取）")
    private Long classId;

    @Schema(description = "所在班级名称（从 student_class_history 当前关联获取）")
    private String className;

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

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "家长姓名")
    private String parentName;

    @Schema(description = "家长电话")
    private String parentPhone;

    @Schema(description = "阅读/上课次数（student_record 条数）")
    private Integer readingCount;

    @Schema(description = "上课次数（同 readingCount）")
    private Integer lessonCount;

    @Schema(description = "平均得分（专注度+参与度平均后 1-5 转 0-100 百分比）")
    private Integer avgScore;
}
