package com.reading.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 学生实体
 */
@Data
@TableName("t_student")
public class Student {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    private String tenantId;

    private String name;

    private String gender;

    private LocalDate birthDate;

    private String avatarUrl;

    private String grade;

    private String studentNo;

    private String readingLevel;

    private String interests;

    private String notes;

    private String status;

    /**
     * 班级 ID
     */
    private String classId;

    /**
     * 家长姓名
     */
    private String parentName;

    /**
     * 家长手机号
     */
    private String parentPhone;

    /**
     * 阅读次数
     */
    private Integer readingCount;

    /**
     * 课时数
     */
    private Integer lessonCount;

    @Schema(description = "创建人用户名", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @Schema(description = "更新人用户名", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    @Schema(description = "创建时间", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic
    private Integer deleted;

}
