添加项目文件。
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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 });
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user