package com.lesingle.modules.biz.review.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_contest_work_score", autoResultMap = true)
@Schema(description = "活动作品评分实体")
public class BizContestWorkScore extends BaseEntity {

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

    @Schema(description = "活动ID")
    @TableField("contest_id")
    private Long contestId;

    @Schema(description = "作品ID")
    @TableField("work_id")
    private Long workId;

    @Schema(description = "分配ID")
    @TableField("assignment_id")
    private Long assignmentId;

    @Schema(description = "评委ID")
    @TableField("judge_id")
    private Long judgeId;

    @Schema(description = "评委姓名")
    @TableField("judge_name")
    private String judgeName;

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