36 lines
887 B
C#
36 lines
887 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Pgvector;
|
|
|
|
namespace NexusReader.Domain.Entities;
|
|
|
|
public class SemanticKnowledgeCache
|
|
{
|
|
[Key]
|
|
[MaxLength(128)]
|
|
public string ContentHash { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string JsonData { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string OriginalText { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string ModelId { get; set; } = "gemini-1.5-flash";
|
|
|
|
[Required]
|
|
[MaxLength(10)]
|
|
public string PromptVersion { get; set; } = "1.0";
|
|
|
|
[Required]
|
|
[MaxLength(128)]
|
|
public string TenantId { get; set; } = string.Empty;
|
|
|
|
// Vector embedding for semantic search (768 dimensions)
|
|
public Vector? Embedding { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|