using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using mws.backend.dotnet.domain.MasterData; namespace mws.backend.dotnet.infrastructure.Persistence.Configuration; public class MasterDataEntryConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder e) { e.ToTable("master_data"); e.HasKey(m => m.Id); e.Property(m => m.Group).HasMaxLength(100).IsRequired(); e.Property(m => m.Label).HasMaxLength(200).IsRequired(); e.Property(m => m.Value).HasMaxLength(100).IsRequired(); e.HasIndex(m => new { m.Group, m.Value }).IsUnique(); } }