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.
43 lines
1.1 KiB
43 lines
1.1 KiB
package com.mydreamjob.assessment;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import org.springframework.data.annotation.CreatedDate;
|
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* 单题答案(V34/V35)。
|
|
*
|
|
* <p>value 使用 1-5 Likert 量表(1=完全不感兴趣 … 5=非常感兴趣)。同 (attempt, question) 唯一,重复保存走 upsert。</p>
|
|
*/
|
|
@Data
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Entity
|
|
@Table(name = "assessment_answers")
|
|
@EntityListeners(AuditingEntityListener.class)
|
|
public class AssessmentAnswer {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(name = "attempt_id", nullable = false)
|
|
private Long attemptId;
|
|
|
|
@Column(name = "question_id", nullable = false)
|
|
private Long questionId;
|
|
|
|
@Column(name = "answer_value", nullable = false)
|
|
private Integer value;
|
|
|
|
@CreatedDate
|
|
@Column(name = "answered_at", nullable = false, updatable = false)
|
|
private LocalDateTime answeredAt;
|
|
}
|