using Deal.Infrastructure.Persistence.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Deal.Infrastructure.Persistence.Configurations;
///
/// EF-конфигурация очереди обучающих сигналов ML
///
public sealed class MlOutboxConfiguration : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.ToTable("MlOutbox");
builder.HasKey(x => x.Id);
// Очистка/выборка outbox идёт по времени создания.
builder.HasIndex(x => x.CreatedAt);
}
}