package com.reading.platform.entity;

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

import java.time.LocalDateTime;

/**
 * 学生记录实体
 */
@Data
@TableName("t_student_record")
@Schema(description = "学生记录")
public class StudentRecord {

    @Schema(description = "记录 ID", accessMode = Schema.AccessMode.READ_ONLY)
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "课时 ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String lessonId;

    @Schema(description = "学生 ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String studentId;

    @Schema(description = "出勤状态 present/absent/late", example = "present")
    private String attendance;

    @Schema(description = "课堂表现评价")
    private String performance;

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

    @Schema(description = "专注力评分 (1-5)", example = "4", minimum = "1", maximum = "5")
    private Integer focus;

    @Schema(description = "参与度评分 (1-5)", example = "4", minimum = "1", maximum = "5")
    private Integer participation;

    @Schema(description = "兴趣评分 (1-5)", example = "4", minimum = "1", maximum = "5")
    private Integer interest;

    @Schema(description = "理解度评分 (1-5)", example = "4", minimum = "1", maximum = "5")
    private Integer understanding;

    @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;

    @Schema(description = "是否删除 0-未删除 1-已删除", accessMode = Schema.AccessMode.READ_ONLY)
    @TableLogic
    private Integer deleted;

}
