using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using PnvPanel.Domain.Configs; namespace PnvPanel.Infrastructure.Persistence.Configurations; public class TrafficSampleConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("TrafficSamples"); builder.HasKey(x => x.Id); builder.Property(x => x.Id).ValueGeneratedOnAdd(); builder.HasIndex(x => new { x.ConfigId, x.Timestamp }); } }