Merge branch 'master' of https://gitea.nxsir.cn/nanxun/IM_NEW
This commit is contained in:
@@ -17,9 +17,21 @@ namespace GroupService.Infrastructure.Reposities
|
||||
{
|
||||
db.GroupInvitations.Add(invitation);
|
||||
}
|
||||
|
||||
public void CreateRange(IEnumerable<GroupInvitation> invitations)
|
||||
{
|
||||
db.GroupInvitations.AddRange(invitations);
|
||||
}
|
||||
|
||||
public async Task<GroupInvitation?> FindByIdAsync(Guid id)
|
||||
{
|
||||
return await db.GroupInvitations.FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
|
||||
public async Task<GroupInvitation?> FindByGroupIdAndUserIdAsync(Guid groupId, Guid userId)
|
||||
{
|
||||
return await db.GroupInvitations.FirstOrDefaultAsync(
|
||||
x => x.GroupId == groupId && x.UserId == userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user