using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace OliverBooth.Common.Data.Web.Configuration;
///
/// Represents the configuration for the entity.
///
internal sealed class TemplateConfiguration : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.ToTable("Template");
builder.HasKey(e => new { e.Name, e.Variant });
builder.Property(e => e.Name).HasMaxLength(50).IsRequired();
builder.Property(e => e.Variant).HasMaxLength(50).IsRequired();
builder.Property(e => e.FormatString).IsRequired();
}
}