package com.agent.management.model.entity;
import jakarta.persistence.*; import lombok.Data; import java.time.LocalDateTime;
@Data @Entity @Table(name="rag_knowledge_base")
public class RagKnowledgeBase { public enum Type { DOCUMENT_ONLY, STRUCTURED_ONLY, GRAPH_ONLY, HYBRID }
 @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; @Column(nullable=false) private String name; @Column(columnDefinition="TEXT") private String description; @Enumerated(EnumType.STRING) @Column(nullable=false) private Type type=Type.HYBRID; private boolean enabled=true; private LocalDateTime createdAt; private LocalDateTime updatedAt;
 @PrePersist void create(){createdAt=updatedAt=LocalDateTime.now();} @PreUpdate void update(){updatedAt=LocalDateTime.now();}}
