using AccountManagement.Domain.ClientResponseAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace AccountMangement.Infrastructure.EFCore.Mappings; public class ClientResponseMapping:IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("ClientResponses"); builder.HasKey(x => x.id); builder.Property(x => x.Response).HasColumnType("ntext"); builder.HasMany(x => x.ClientResponseMedias).WithOne(x => x.ClientResponse).HasForeignKey(x => x.ClientResponseId); builder.HasOne(x => x.Ticket).WithMany(x => x.ClientResponses).HasForeignKey(x => x.TicketId); } }