diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/NearbyARCapsuleSummaryResponse.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/NearbyARCapsuleSummaryResponse.java index 66eaa0398..fe4777a1d 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/NearbyARCapsuleSummaryResponse.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/NearbyARCapsuleSummaryResponse.java @@ -34,6 +34,7 @@ public record NearbyARCapsuleSummaryResponse( @Schema(description = "캑슐 νƒ€μž…") CapsuleType capsuleType ) { + public NearbyARCapsuleSummaryResponse { if (dueDate != null) { dueDate = dueDate.withZoneSameInstant(ResponseMappingConstant.ZONE_ID); diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/data/dto/MySecreteCapsuleDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/data/dto/MySecreteCapsuleDto.java index 9b3c37704..19d661802 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/data/dto/MySecreteCapsuleDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/data/dto/MySecreteCapsuleDto.java @@ -4,7 +4,6 @@ import java.util.function.Function; import site.timecapsulearchive.core.domain.capsule.entity.CapsuleType; import site.timecapsulearchive.core.domain.capsule.secret_capsule.data.response.MySecreteCapsuleResponse; -import site.timecapsulearchive.core.global.common.response.ResponseMappingConstant; public record MySecreteCapsuleDto( Long capsuleId, diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/data/dto/GroupDetailDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/data/dto/GroupDetailDto.java index c45a8a46e..d97da178e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/data/dto/GroupDetailDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/data/dto/GroupDetailDto.java @@ -5,7 +5,6 @@ import java.util.function.Function; import site.timecapsulearchive.core.domain.group.data.response.GroupDetailResponse; import site.timecapsulearchive.core.domain.group.data.response.GroupMemberResponse; -import site.timecapsulearchive.core.domain.group.data.response.GroupMemberSummaryResponse; public record GroupDetailDto( String groupName, diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepository.java deleted file mode 100644 index b61fcf46c..000000000 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepository.java +++ /dev/null @@ -1,34 +0,0 @@ -package site.timecapsulearchive.core.domain.group.repository; - -import static com.querydsl.core.group.GroupBy.groupBy; -import static com.querydsl.core.group.GroupBy.list; -import static site.timecapsulearchive.core.domain.group.entity.QGroup.group; -import static site.timecapsulearchive.core.domain.group.entity.QMemberGroup.memberGroup; -import static site.timecapsulearchive.core.domain.member.entity.QMember.member; - -import com.querydsl.core.types.Projections; -import com.querydsl.jpa.impl.JPAQueryFactory; -import java.time.ZonedDateTime; -import java.util.List; -import java.util.Optional; -import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Pageable; -import org.springframework.data.domain.Slice; -import org.springframework.data.domain.SliceImpl; -import org.springframework.stereotype.Repository; -import site.timecapsulearchive.core.domain.group.data.dto.GroupDetailDto; -import site.timecapsulearchive.core.domain.group.data.dto.GroupMemberDto; -import site.timecapsulearchive.core.domain.group.data.dto.GroupSummaryDto; - - -public interface GroupQueryRepository { - - Slice findGroupsSlice( - final Long memberId, - final int size, - final ZonedDateTime createdAt - ); - - Optional findGroupDetailByGroupId(final Long groupId); - -} diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepository.java similarity index 64% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepository.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepository.java index e9abf2cf4..757acc930 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepository.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.groupInviteRepository; import java.util.List; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepositoryImpl.java similarity index 95% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepositoryImpl.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepositoryImpl.java index 3fdf1ef9c..8d71332c7 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteQueryRepositoryImpl.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.groupInviteRepository; import java.sql.PreparedStatement; import java.sql.SQLException; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteRepository.java similarity index 76% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteRepository.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteRepository.java index 585a107ca..87d2cce84 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupInviteRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupInviteRepository/GroupInviteRepository.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.groupInviteRepository; import org.springframework.data.repository.Repository; import site.timecapsulearchive.core.domain.group.entity.GroupInvite; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepository.java new file mode 100644 index 000000000..0ce6327a9 --- /dev/null +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepository.java @@ -0,0 +1,20 @@ +package site.timecapsulearchive.core.domain.group.repository.groupRepository; + +import java.time.ZonedDateTime; +import java.util.Optional; +import org.springframework.data.domain.Slice; +import site.timecapsulearchive.core.domain.group.data.dto.GroupDetailDto; +import site.timecapsulearchive.core.domain.group.data.dto.GroupSummaryDto; + + +public interface GroupQueryRepository { + + Slice findGroupsSlice( + final Long memberId, + final int size, + final ZonedDateTime createdAt + ); + + Optional findGroupDetailByGroupId(final Long groupId); + +} diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepositoryImpl.java similarity index 97% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepositoryImpl.java index 56f49b38e..21ff3e10b 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupQueryRepositoryImpl.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.groupRepository; import static com.querydsl.core.group.GroupBy.groupBy; import static com.querydsl.core.group.GroupBy.list; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupRepository.java similarity index 80% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupRepository.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupRepository.java index 47b09d6f6..24eb4c0c7 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/groupRepository/GroupRepository.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.groupRepository; import java.util.Optional; import org.springframework.data.repository.Repository; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepository.java similarity index 74% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepository.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepository.java index e0cca98db..c39ef58b2 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepository.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.memberGroupRepository; import java.util.Optional; import site.timecapsulearchive.core.domain.group.data.dto.GroupOwnerSummaryDto; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepositoryImpl.java similarity index 94% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryImpl.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepositoryImpl.java index ac36d55a0..6e240515a 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupQueryRepositoryImpl.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.memberGroupRepository; import static site.timecapsulearchive.core.domain.group.entity.QGroup.group; import static site.timecapsulearchive.core.domain.group.entity.QMemberGroup.memberGroup; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupRepository.java similarity index 64% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupRepository.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupRepository.java index bb5c4cd12..d5ded67da 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/memberGroupRepository/MemberGroupRepository.java @@ -1,9 +1,10 @@ -package site.timecapsulearchive.core.domain.group.repository; +package site.timecapsulearchive.core.domain.group.repository.memberGroupRepository; import org.springframework.data.repository.Repository; import site.timecapsulearchive.core.domain.group.entity.MemberGroup; -public interface MemberGroupRepository extends Repository, MemberGroupQueryRepository{ +public interface MemberGroupRepository extends Repository, + MemberGroupQueryRepository { void save(MemberGroup memberGroup); } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupService.java index 5c04d6a01..5fa63bedf 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupService.java @@ -1,5 +1,8 @@ package site.timecapsulearchive.core.domain.group.service; +import site.timecapsulearchive.core.domain.group.service.read.GroupReadService; +import site.timecapsulearchive.core.domain.group.service.write.GroupWriteService; + public interface GroupService extends GroupReadService, GroupWriteService { } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupServiceImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupServiceImpl.java index b765342d7..9d6342b83 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupServiceImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupServiceImpl.java @@ -8,6 +8,8 @@ import site.timecapsulearchive.core.domain.group.data.dto.GroupDetailDto; import site.timecapsulearchive.core.domain.group.data.dto.GroupSummaryDto; import site.timecapsulearchive.core.domain.group.entity.Group; +import site.timecapsulearchive.core.domain.group.service.read.GroupReadService; +import site.timecapsulearchive.core.domain.group.service.write.GroupWriteService; @Service @RequiredArgsConstructor diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadService.java similarity index 90% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadService.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadService.java index df5824887..635b1dbb1 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadService.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.service; +package site.timecapsulearchive.core.domain.group.service.read; import java.time.ZonedDateTime; import org.springframework.data.domain.Slice; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadServiceImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadServiceImpl.java similarity index 91% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadServiceImpl.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadServiceImpl.java index 65808e608..2d833a0ca 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupReadServiceImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/read/GroupReadServiceImpl.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.service; +package site.timecapsulearchive.core.domain.group.service.read; import java.time.ZonedDateTime; import lombok.RequiredArgsConstructor; @@ -9,7 +9,7 @@ import site.timecapsulearchive.core.domain.group.data.dto.GroupSummaryDto; import site.timecapsulearchive.core.domain.group.entity.Group; import site.timecapsulearchive.core.domain.group.exception.GroupNotFoundException; -import site.timecapsulearchive.core.domain.group.repository.GroupRepository; +import site.timecapsulearchive.core.domain.group.repository.groupRepository.GroupRepository; @Service @RequiredArgsConstructor diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteService.java similarity index 80% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteService.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteService.java index de57f7747..891dc13d9 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteService.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.service; +package site.timecapsulearchive.core.domain.group.service.write; import site.timecapsulearchive.core.domain.group.data.dto.GroupCreateDto; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteServiceImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteServiceImpl.java similarity index 91% rename from backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteServiceImpl.java rename to backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteServiceImpl.java index 0f43f8ea0..f2da391e7 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/GroupWriteServiceImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/service/write/GroupWriteServiceImpl.java @@ -1,4 +1,4 @@ -package site.timecapsulearchive.core.domain.group.service; +package site.timecapsulearchive.core.domain.group.service.write; import java.util.List; import lombok.RequiredArgsConstructor; @@ -13,9 +13,9 @@ import site.timecapsulearchive.core.domain.group.entity.MemberGroup; import site.timecapsulearchive.core.domain.group.exception.GroupNotFoundException; import site.timecapsulearchive.core.domain.group.exception.GroupOwnerAuthenticateException; -import site.timecapsulearchive.core.domain.group.repository.GroupInviteRepository; -import site.timecapsulearchive.core.domain.group.repository.GroupRepository; -import site.timecapsulearchive.core.domain.group.repository.MemberGroupRepository; +import site.timecapsulearchive.core.domain.group.repository.groupInviteRepository.GroupInviteRepository; +import site.timecapsulearchive.core.domain.group.repository.groupRepository.GroupRepository; +import site.timecapsulearchive.core.domain.group.repository.memberGroupRepository.MemberGroupRepository; import site.timecapsulearchive.core.domain.member.entity.Member; import site.timecapsulearchive.core.domain.member.exception.MemberNotFoundException; import site.timecapsulearchive.core.domain.member.repository.MemberRepository; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/entity/Member.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/entity/Member.java index 17abf213c..a99bd8fff 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/entity/Member.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/entity/Member.java @@ -19,7 +19,6 @@ import site.timecapsulearchive.core.domain.capsule.entity.Capsule; import site.timecapsulearchive.core.domain.friend.entity.FriendInvite; import site.timecapsulearchive.core.domain.friend.entity.MemberFriend; -import site.timecapsulearchive.core.domain.group.entity.GroupInvite; import site.timecapsulearchive.core.domain.group.entity.MemberGroup; import site.timecapsulearchive.core.domain.history.entity.History; import site.timecapsulearchive.core.global.entity.BaseEntity; diff --git a/backend/core/src/test/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryTest.java b/backend/core/src/test/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryTest.java index b2356e25b..08f0234d4 100644 --- a/backend/core/src/test/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryTest.java +++ b/backend/core/src/test/java/site/timecapsulearchive/core/domain/group/repository/MemberGroupQueryRepositoryTest.java @@ -26,6 +26,8 @@ import site.timecapsulearchive.core.domain.group.data.dto.GroupSummaryDto; import site.timecapsulearchive.core.domain.group.entity.Group; import site.timecapsulearchive.core.domain.group.entity.MemberGroup; +import site.timecapsulearchive.core.domain.group.repository.groupRepository.GroupQueryRepository; +import site.timecapsulearchive.core.domain.group.repository.groupRepository.GroupQueryRepositoryImpl; import site.timecapsulearchive.core.domain.member.entity.Member; @TestConstructor(autowireMode = AutowireMode.ALL)