using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace OliverBooth.Data.Web.Configuration;
///
/// Represents the configuration for the entity.
///
internal sealed class TutorialFolderConfiguration : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.ToTable("TutorialFolder");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).IsRequired();
builder.Property(e => e.Parent);
builder.Property(e => e.Slug).IsRequired();
builder.Property(e => e.Title).IsRequired();
builder.Property(e => e.PreviewImageUrl).HasConversion();
}
}