enhance rag retrieval + summary
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.aiteacher.topic;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "topic_summary")
|
||||
public class TopicSummaryEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.UUID)
|
||||
private UUID id;
|
||||
|
||||
@Column(name = "topic_id", nullable = false)
|
||||
private String topicId;
|
||||
|
||||
@Column(name = "summary_number", nullable = false)
|
||||
private int summaryNumber;
|
||||
|
||||
@Column(nullable = false, columnDefinition = "TEXT")
|
||||
private String summary;
|
||||
|
||||
@Column(name = "sources_json", nullable = false, columnDefinition = "TEXT")
|
||||
private String sourcesJson;
|
||||
|
||||
@Column(name = "generated_at", nullable = false)
|
||||
private Instant generatedAt;
|
||||
|
||||
protected TopicSummaryEntity() {}
|
||||
|
||||
public TopicSummaryEntity(String topicId, int summaryNumber, String summary,
|
||||
String sourcesJson, Instant generatedAt) {
|
||||
this.topicId = topicId;
|
||||
this.summaryNumber = summaryNumber;
|
||||
this.summary = summary;
|
||||
this.sourcesJson = sourcesJson;
|
||||
this.generatedAt = generatedAt;
|
||||
}
|
||||
|
||||
public UUID getId() { return id; }
|
||||
public String getTopicId() { return topicId; }
|
||||
public int getSummaryNumber() { return summaryNumber; }
|
||||
public String getSummary() { return summary; }
|
||||
public String getSourcesJson() { return sourcesJson; }
|
||||
public Instant getGeneratedAt() { return generatedAt; }
|
||||
}
|
||||
Reference in New Issue
Block a user