package com.lesingle.modules.biz.homework.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.lesingle.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "t_biz_homework_score", autoResultMap = true)
@Schema(description = "作业评分实体")
public class BizHomeworkScore extends BaseEntity {

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

    @Schema(description = "提交ID")
    @TableField("submission_id")
    private Long submissionId;

    @Schema(description = "评审人ID")
    @TableField("reviewer_id")
    private Long reviewerId;

    @Schema(description = "各维度得分（JSON）")
    @TableField(value = "dimension_scores", typeHandler = JacksonTypeHandler.class)
    private Object dimensionScores;

    @Schema(description = "总分")
    @TableField("total_score")
    private BigDecimal totalScore;

    @Schema(description = "评语")
    private String comments;

    @Schema(description = "评分时间")
    @TableField("score_time")
    private LocalDateTime scoreTime;
}
