package com.lesingle.creation.vo.student;

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

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

/**
 * 学生响应 VO
 */
@Data
@Schema(description = "学生响应")
public class StudentVO {

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

    @Schema(description = "用户 ID")
    private Long userId;

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

    @Schema(description = "行政班级 ID")
    private Long classId;

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

    @Schema(description = "联系电话")
    private String phone;

    @Schema(description = "身份证号")
    private String idCard;

    @Schema(description = "性别：1-男，2-女")
    private Integer gender;

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

    @Schema(description = "入学日期")
    private LocalDate enrollmentDate;

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

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

    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "学生描述")
    private String description;

    @Schema(description = "有效状态")
    private Integer validState;

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

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

    @Schema(description = "用户信息")
    private UserInfo userInfo;

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

    /**
     * 用户信息嵌套 VO
     */
    @Data
    @Schema(description = "用户信息")
    public static class UserInfo {
        @Schema(description = "用户名")
        private String username;
        @Schema(description = "昵称")
        private String nickname;
        @Schema(description = "邮箱")
        private String email;
        @Schema(description = "头像 URL")
        private String avatar;
    }

    /**
     * 班级信息嵌套 VO
     */
    @Data
    @Schema(description = "班级信息")
    public static class ClassInfo {
        @Schema(description = "班级 ID")
        private Long id;
        @Schema(description = "班级名称")
        private String name;
        @Schema(description = "班级编码")
        private String code;
    }
}
