Files
Deal/src/core/Deal.Infrastructure/Persistence/Configurations/TgMessageConfiguration.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

24 lines
937 B
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-конфигурация превью-сообщений: таблица TgMessages (модель без схемы; Ruling 7, db.py L6774).
/// </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 });
}
}