17 lines
557 B
C#
17 lines
557 B
C#
using GroupService.Domain.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace GroupService.Infrastructure.Configs
|
|
{
|
|
public class GroupMemberConfig : IEntityTypeConfiguration<GroupMember>
|
|
{
|
|
public void Configure(EntityTypeBuilder<GroupMember> builder)
|
|
{
|
|
builder.ToTable("group_members");
|
|
builder.HasIndex(x => new { x.UserId, x.IsDeleted, x.GroupId });
|
|
builder.HasIndex(x => new { x.GroupId, x.IsDeleted, x.Role });
|
|
}
|
|
}
|
|
}
|