using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using RAG.Domain.Entities; namespace RAG.Infrastructure.Persistence.Configurations; public class ChatMessageConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("chat_messages"); builder.HasKey(m => m.Id); builder.Property(m => m.Id).ValueGeneratedNever(); builder.Property(m => m.Content).IsRequired(); builder.Property(m => m.Role).IsRequired(); builder.Property(m => m.CreatedBy).HasMaxLength(100); builder.Property(m => m.UpdatedBy).HasMaxLength(100); } }