using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace OliverBooth.Data.Blog.Configuration; internal sealed class LegacyCommentConfiguration : IEntityTypeConfiguration { /// public void Configure(EntityTypeBuilder builder) { builder.ToTable("LegacyComment"); builder.HasKey(e => e.Id); builder.Property(e => e.Id).IsRequired(); builder.Property(e => e.PostId).IsRequired(); builder.Property(e => e.Author).IsRequired().HasMaxLength(50); builder.Property(e => e.Avatar).IsRequired(false).HasMaxLength(32767); builder.Property(e => e.Body).IsRequired().HasMaxLength(32767); builder.Property(e => e.ParentComment).IsRequired(false); } }