This commit is contained in:
2026-04-24 13:42:14 +03:30
parent 5efd41754a
commit e49c273171
9 changed files with 643 additions and 171 deletions
@@ -1,4 +1,3 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using xAiApi.AI.Models.Entities;
@@ -8,6 +7,13 @@ namespace xAiApi.AI.Configuration.Entities
public class XAiMessageConfiguration : IEntityTypeConfiguration<XAiMessage>
{
public void Configure(EntityTypeBuilder<XAiMessage> builder)
{ }
{
//
builder
.HasOne(x => x.Conversation)
.WithMany(x => x.Messages)
.HasForeignKey(x => x.ConversationId)
.OnDelete(DeleteBehavior.NoAction);
}
}
}