Skip to content

Commit

Permalink
feat : 그룹 초대 조회, 삭제 쿼리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-1116 committed Jun 6, 2024
1 parent 384c8d4 commit 68cc672
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package site.timecapsulearchive.core.domain.member_group.repository.group_invite_repository;

import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
Expand All @@ -12,6 +13,8 @@ public interface GroupInviteRepository extends Repository<GroupInvite, Long>,

void save(GroupInvite groupInvite);

void delete(GroupInvite groupInvite);

@Query("delete from GroupInvite gi "
+ "where gi.group.id =:groupId "
+ "and gi.groupOwner.id =:groupOwnerId "
Expand All @@ -27,5 +30,7 @@ int deleteGroupInviteByGroupIdAndGroupOwnerIdAndGroupMemberId(
@Query("delete from GroupInvite gi where gi.id in :groupInviteIds")
@Modifying
void bulkDelete(@Param("groupInviteIds") List<Long> groupInviteIds);

Optional<GroupInvite> findGroupInviteById(Long groupInviteId);
}

0 comments on commit 68cc672

Please sign in to comment.