Files
Deal/src/core/Deal.Infrastructure/Persistence/Configurations/DiscLogConfiguration.cs
T
Rustam Khalimov 410194b0cb Разбить Infrastructure и корень Deal.Api по назначению
Integrations -> Abstractions/Exceptions/Extensions/Models/Options/
Services (включая Storage); Persistence-конфигурации -> Configurations;
корень Deal.Api (оркестратор/планировщики/DTO) -> Services/Dtos.
namespace приведён к путям, using добавлены/дедуплицированы, FQN
обновлены.
2026-09-11 13:20:10 +03:00

27 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
/// <summary>
/// EF-конфигурация лога Discovery: таблица DiscLog (модель без схемы; Ruling 9).
/// </summary>
/// <remarks>
/// 1:1 db.py L189196. Составной индекс (TaskId, CreatedAt) — python idx_disc_log_task L196: последние события
/// задачи (ORDER BY created_at DESC). Без FK на DiscTasks: лог чистится каскадом delete_task в коде сервиса.
/// </remarks>
public sealed class DiscLogConfiguration : IEntityTypeConfiguration<DiscLogEntity>
{
public void Configure(EntityTypeBuilder<DiscLogEntity> builder)
{
builder.ToTable("DiscLog");
builder.HasKey(x => x.Id);
builder.HasIndex(x => new { x.TaskId, x.CreatedAt });
}
}