Files
IM_NEW/MessageService.Infrastructure/Configs/ConversationConfig.cs
T
2026-05-09 17:06:30 +08:00

18 lines
497 B
C#

using MessageService.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace MessageService.Infrastructure.Configs
{
public class ConversationConfig : IEntityTypeConfiguration<Conversation>
{
public void Configure(EntityTypeBuilder<Conversation> builder)
{
builder.ToTable("conversations");
builder.HasKey(x => x.Id);
builder.HasIndex(x => x.UserId);
}
}
}