You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

64 lines
1.8 KiB

package com.mydreamjob.assessment;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 测评结果(V34/V35)。
*
* <p>仅 RIASEC 六维聚合分,不存储原始答案。{@code dimensionScoresText} / {@code typeRankingText}
* 以 TEXT 保存 JSON 字符串,保持 MySQL 8 与 H2 MODE=MySQL 兼容。</p>
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "assessment_results")
public class AssessmentResult {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "attempt_id", nullable = false)
private Long attemptId;
@Column(name = "primary_code", nullable = false, length = 3)
private String primaryCode;
@Column(name = "primary_type", nullable = false, length = 1)
private String primaryType;
@Column(name = "dimension_scores_text", columnDefinition = "TEXT")
private String dimensionScoresText;
@Column(name = "type_ranking_text", columnDefinition = "TEXT")
private String typeRankingText;
@Column(name = "answered_count", nullable = false)
private Integer answeredCount;
@Column(name = "completion_rate", nullable = false, precision = 5, scale = 2)
private BigDecimal completionRate;
@Column(name = "question_set_version", nullable = false, length = 40)
private String questionSetVersion;
@Column(name = "rules_version", nullable = false, length = 40)
private String rulesVersion;
@Column(name = "generated_at", nullable = false)
private LocalDateTime generatedAt;
@Version
@Column(nullable = false)
@Builder.Default
private Long version = 0L;
}