oliverbooth.dev/OliverBooth/Data/Blog/Configuration/LegacyCommentConfiguration.cs
Oliver Booth a7426b008b
feat: show legacy disqus comments beneath gisqus
No Disqus connection here. I just saved them to DB
2024-05-01 16:47:31 +01:00

22 lines
809 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace OliverBooth.Data.Blog.Configuration;
internal sealed class LegacyCommentConfiguration : IEntityTypeConfiguration<LegacyComment>
{
/// <inheritdoc />
public void Configure(EntityTypeBuilder<LegacyComment> 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);
}
}