using AccountManagement.Domain.AdminResponseAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace AccountMangement.Infrastructure.EFCore.Mappings; public class AdminResponseMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("AdminResponses"); builder.HasKey(x => x.id); builder.Property(x => x.Response).HasColumnType("ntext"); builder.Property(x => x.IsActiveString).HasMaxLength(5); builder.HasMany(x => x.AdminResponseMedias).WithOne(x => x.AdminResponse).HasForeignKey(x => x.AdminResponseId); builder.HasOne(x => x.Ticket).WithMany(x => x.AdminResponses).HasForeignKey(x => x.TicketId); } }