using Deal.Infrastructure.Persistence.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Deal.Infrastructure.Persistence.Configurations; /// /// EF-конфигурация глобальной /// public sealed class GlobalSettingConfiguration : IEntityTypeConfiguration { private const int KeyMaxLength = 200; public void Configure(EntityTypeBuilder builder) { builder.ToTable("global_settings", "public"); builder.HasKey(x => x.Key); builder.Property(x => x.Key).HasMaxLength(KeyMaxLength); builder.Property(x => x.Value).HasColumnType("text").IsRequired(); builder.Property(x => x.UpdatedAt).IsRequired(); } }