using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using PnvPanel.Domain.Media; namespace PnvPanel.Infrastructure.Persistence.Configurations; public class MediaImageConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("MediaImages"); builder.HasKey(x => x.Id); builder.Property(x => x.FileName).IsRequired().HasMaxLength(255); builder.Property(x => x.StoredFileName).IsRequired().HasMaxLength(100); builder.Property(x => x.ContentType).IsRequired().HasMaxLength(100); builder.HasIndex(x => x.StoredFileName).IsUnique(); } }