Разбить Infrastructure и корень Deal.Api по назначению
Integrations -> Abstractions/Exceptions/Extensions/Models/Options/ Services (включая Storage); Persistence-конфигурации -> Configurations; корень Deal.Api (оркестратор/планировщики/DTO) -> Services/Dtos. namespace приведён к путям, using добавлены/дедуплицированы, FQN обновлены.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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: таблица DiscCandidates (модель без схемы; Ruling 9).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 1:1 db.py L159–177. Marks/Topics — JSON-массивы в text. Составной индекс (TaskId, Status) — python
|
||||
/// idx_disc_cand_task L177: выборка кандидатов задачи по статусу (списки воркера/вкладки). Без FK на DiscTasks:
|
||||
/// удаление задачи чистит кандидатов каскадом в коде сервиса (delete_task L314–318).
|
||||
/// </remarks>
|
||||
public sealed class DiscCandidateConfiguration : IEntityTypeConfiguration<DiscCandidateEntity>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<DiscCandidateEntity> builder)
|
||||
{
|
||||
builder.ToTable("DiscCandidates");
|
||||
|
||||
builder.HasKey(x => x.DialogId);
|
||||
|
||||
builder.Property(x => x.MarksJson).HasColumnType("text");
|
||||
builder.Property(x => x.TopicsJson).HasColumnType("text");
|
||||
|
||||
builder.HasIndex(x => new { x.TaskId, x.Status });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user