Разбить 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,23 @@
|
||||
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-конфигурация превью-сообщений: таблица TgMessages (модель без схемы; Ruling 7, db.py L67–74).
|
||||
/// </summary>
|
||||
public sealed class TgMessageConfiguration : IEntityTypeConfiguration<TgMessageEntity>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TgMessageEntity> builder)
|
||||
{
|
||||
builder.ToTable("TgMessages");
|
||||
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
// Фолбэк превью диалога читается по диалогу в порядке времени (idx_messages_dialog db.py L74).
|
||||
builder.HasIndex(x => new { x.DialogId, x.MsgAt });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user