21 lines
526 B
C#
21 lines
526 B
C#
using ContactService.Domain.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ContactService.Infrastructure.Configs
|
|
{
|
|
public class FriendRequestConfig : IEntityTypeConfiguration<FriendRequest>
|
|
{
|
|
public void Configure(EntityTypeBuilder<FriendRequest> builder)
|
|
{
|
|
builder.ToTable("friend_requests");
|
|
|
|
builder.HasKey(x => x.Id);
|
|
|
|
builder.HasIndex(x => new { x.OwnerId, x.TargetId });
|
|
|
|
|
|
}
|
|
}
|
|
}
|