20 lines
741 B
C#
20 lines
741 B
C#
using AccountManagement.Domain.ClientResponseAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace AccountMangement.Infrastructure.EFCore.Mappings;
|
|
public class ClientResponseMapping:IEntityTypeConfiguration<ClientResponse>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ClientResponse> 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);
|
|
}
|
|
} |