package com.lesingle.edu.entity;

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

import java.time.LocalDateTime;

/**
 * 任务完成实体
 */
@Schema(description = "任务完成实体")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("task_completion")
public class TaskCompletion extends BaseEntity {

    @Schema(description = "任务 ID")
    private Long taskId;

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

    @Schema(description = "完成状态：PENDING-待提交/SUBMITTED-已提交/REVIEWED-已评价")
    private String status;

    @Schema(description = "照片URL数组（JSON格式）")
    private String photos;

    @Schema(description = "视频URL")
    private String videoUrl;

    @Schema(description = "语音URL")
    private String audioUrl;

    @Schema(description = "完成内容/阅读心得")
    private String content;

    @Schema(description = "提交时间")
    private LocalDateTime submittedAt;

    @Schema(description = "评价时间")
    private LocalDateTime reviewedAt;

    @Schema(description = "完成时间（兼容旧字段）")
    private LocalDateTime completedAt;

    @Schema(description = "附件（JSON 数组）")
    private String attachments;

    @Schema(description = "评分（家长自评）")
    private Integer rating;

    @Schema(description = "反馈（家长反馈）")
    private String feedback;

}
