using Deal.Infrastructure.Persistence.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Deal.Infrastructure.Persistence; using Deal.Infrastructure.Persistence.Configurations; namespace Deal.Infrastructure.Persistence.Configurations; /// /// EF-конфигурация лога Discovery: таблица DiscLog (модель без схемы; Ruling 9). /// /// /// 1:1 db.py L189–196. Составной индекс (TaskId, CreatedAt) — python idx_disc_log_task L196: последние события /// задачи (ORDER BY created_at DESC). Без FK на DiscTasks: лог чистится каскадом delete_task в коде сервиса. /// public sealed class DiscLogConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("DiscLog"); builder.HasKey(x => x.Id); builder.HasIndex(x => new { x.TaskId, x.CreatedAt }); } }