diff --git a/build.gradle b/build.gradle index eade7e24..1662f14b 100644 --- a/build.gradle +++ b/build.gradle @@ -120,7 +120,6 @@ def jacocoExcludePatterns = [ '**/jwt/**', '**/auth/**', '**/domain/*', - '**/domains/*', '**/fixture/*', '**/controller/**', '**/fixture/*', @@ -139,7 +138,6 @@ def jacocoExcludePatternsForVerify = [ '*.jwt.*', '*.auth.*', '*.domain.*', - '*.domains.*', '*.fixture.*', '*.controller.*', '*.fixture.*', diff --git a/src/main/java/com/somemore/center/usecase/command/CreatePreferItemUseCase.java b/src/main/java/com/somemore/center/usecase/command/CreatePreferItemUseCase.java deleted file mode 100644 index f500a624..00000000 --- a/src/main/java/com/somemore/center/usecase/command/CreatePreferItemUseCase.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.somemore.center.usecase.command; - -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.dto.response.PreferItemCreateResponseDto; - -import java.util.UUID; - -public interface CreatePreferItemUseCase { - - PreferItemCreateResponseDto createPreferItem(UUID userId, PreferItemCreateRequestDto requestDto); -} diff --git a/src/main/java/com/somemore/community/repository/mapper/CommunityBoardView.java b/src/main/java/com/somemore/community/repository/mapper/CommunityBoardView.java deleted file mode 100644 index a03f271a..00000000 --- a/src/main/java/com/somemore/community/repository/mapper/CommunityBoardView.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.somemore.community.repository.mapper; - -import com.somemore.community.domain.CommunityBoard; - -public record CommunityBoardView( - CommunityBoard communityBoard, - String writerNickname) { -} diff --git a/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java b/src/main/java/com/somemore/domains/center/controller/CenterProfileCommandApiController.java similarity index 89% rename from src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java rename to src/main/java/com/somemore/domains/center/controller/CenterProfileCommandApiController.java index cc5b8a47..1b101735 100644 --- a/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java +++ b/src/main/java/com/somemore/domains/center/controller/CenterProfileCommandApiController.java @@ -1,8 +1,8 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.usecase.command.UpdateCenterProfileUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; -import com.somemore.center.usecase.command.UpdateCenterProfileUseCase; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.imageupload.dto.ImageUploadRequestDto; import com.somemore.global.imageupload.usecase.ImageUploadUseCase; diff --git a/src/main/java/com/somemore/center/controller/CenterQueryApiController.java b/src/main/java/com/somemore/domains/center/controller/CenterQueryApiController.java similarity index 85% rename from src/main/java/com/somemore/center/controller/CenterQueryApiController.java rename to src/main/java/com/somemore/domains/center/controller/CenterQueryApiController.java index ef62e9d5..7f6b7d68 100644 --- a/src/main/java/com/somemore/center/controller/CenterQueryApiController.java +++ b/src/main/java/com/somemore/domains/center/controller/CenterQueryApiController.java @@ -1,7 +1,7 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; -import com.somemore.center.dto.response.CenterProfileResponseDto; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.dto.response.CenterProfileResponseDto; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/center/controller/CenterSignController.java b/src/main/java/com/somemore/domains/center/controller/CenterSignController.java similarity index 93% rename from src/main/java/com/somemore/center/controller/CenterSignController.java rename to src/main/java/com/somemore/domains/center/controller/CenterSignController.java index 30e53c90..371df5aa 100644 --- a/src/main/java/com/somemore/center/controller/CenterSignController.java +++ b/src/main/java/com/somemore/domains/center/controller/CenterSignController.java @@ -1,7 +1,7 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; +import com.somemore.domains.center.dto.request.CenterSignRequestDto; import com.somemore.global.auth.signout.usecase.SignOutUseCase; -import com.somemore.center.dto.request.CenterSignRequestDto; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java b/src/main/java/com/somemore/domains/center/controller/PreferItemCommandApiController.java similarity index 82% rename from src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java rename to src/main/java/com/somemore/domains/center/controller/PreferItemCommandApiController.java index f0cc8af4..fdb1e62d 100644 --- a/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java +++ b/src/main/java/com/somemore/domains/center/controller/PreferItemCommandApiController.java @@ -1,10 +1,10 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.dto.response.PreferItemCreateResponseDto; +import com.somemore.domains.center.usecase.command.CreatePreferItemUseCase; +import com.somemore.domains.center.usecase.command.DeletePreferItemUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.dto.response.PreferItemCreateResponseDto; -import com.somemore.center.usecase.command.CreatePreferItemUseCase; -import com.somemore.center.usecase.command.DeletePreferItemUseCase; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/center/domain/Center.java b/src/main/java/com/somemore/domains/center/domain/Center.java similarity index 94% rename from src/main/java/com/somemore/center/domain/Center.java rename to src/main/java/com/somemore/domains/center/domain/Center.java index 084a20b2..5fbc6291 100644 --- a/src/main/java/com/somemore/center/domain/Center.java +++ b/src/main/java/com/somemore/domains/center/domain/Center.java @@ -1,6 +1,6 @@ -package com.somemore.center.domain; +package com.somemore.domains.center.domain; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; import com.somemore.global.common.entity.BaseEntity; import jakarta.persistence.*; import lombok.*; diff --git a/src/main/java/com/somemore/center/domain/PreferItem.java b/src/main/java/com/somemore/domains/center/domain/PreferItem.java similarity index 95% rename from src/main/java/com/somemore/center/domain/PreferItem.java rename to src/main/java/com/somemore/domains/center/domain/PreferItem.java index 9cc93597..e8f418e1 100644 --- a/src/main/java/com/somemore/center/domain/PreferItem.java +++ b/src/main/java/com/somemore/domains/center/domain/PreferItem.java @@ -1,4 +1,4 @@ -package com.somemore.center.domain; +package com.somemore.domains.center.domain; import jakarta.persistence.*; import lombok.AccessLevel; diff --git a/src/main/java/com/somemore/center/dto/request/CenterProfileUpdateRequestDto.java b/src/main/java/com/somemore/domains/center/dto/request/CenterProfileUpdateRequestDto.java similarity index 95% rename from src/main/java/com/somemore/center/dto/request/CenterProfileUpdateRequestDto.java rename to src/main/java/com/somemore/domains/center/dto/request/CenterProfileUpdateRequestDto.java index e9ee61fc..76dea39e 100644 --- a/src/main/java/com/somemore/center/dto/request/CenterProfileUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/center/dto/request/CenterProfileUpdateRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.center.dto.request; +package com.somemore.domains.center.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/center/dto/request/CenterSignRequestDto.java b/src/main/java/com/somemore/domains/center/dto/request/CenterSignRequestDto.java similarity index 91% rename from src/main/java/com/somemore/center/dto/request/CenterSignRequestDto.java rename to src/main/java/com/somemore/domains/center/dto/request/CenterSignRequestDto.java index df982e41..fdaf32d5 100644 --- a/src/main/java/com/somemore/center/dto/request/CenterSignRequestDto.java +++ b/src/main/java/com/somemore/domains/center/dto/request/CenterSignRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.center.dto.request; +package com.somemore.domains.center.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/center/dto/request/PreferItemCreateRequestDto.java b/src/main/java/com/somemore/domains/center/dto/request/PreferItemCreateRequestDto.java similarity index 86% rename from src/main/java/com/somemore/center/dto/request/PreferItemCreateRequestDto.java rename to src/main/java/com/somemore/domains/center/dto/request/PreferItemCreateRequestDto.java index 29a26623..9165a120 100644 --- a/src/main/java/com/somemore/center/dto/request/PreferItemCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/center/dto/request/PreferItemCreateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.center.dto.request; +package com.somemore.domains.center.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/com/somemore/center/dto/response/CenterProfileResponseDto.java b/src/main/java/com/somemore/domains/center/dto/response/CenterProfileResponseDto.java similarity index 92% rename from src/main/java/com/somemore/center/dto/response/CenterProfileResponseDto.java rename to src/main/java/com/somemore/domains/center/dto/response/CenterProfileResponseDto.java index 5acb4713..3c2b34b5 100644 --- a/src/main/java/com/somemore/center/dto/response/CenterProfileResponseDto.java +++ b/src/main/java/com/somemore/domains/center/dto/response/CenterProfileResponseDto.java @@ -1,9 +1,8 @@ -package com.somemore.center.dto.response; +package com.somemore.domains.center.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.domain.Center; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.Center; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/center/dto/response/CenterSimpleInfoResponseDto.java b/src/main/java/com/somemore/domains/center/dto/response/CenterSimpleInfoResponseDto.java similarity index 91% rename from src/main/java/com/somemore/center/dto/response/CenterSimpleInfoResponseDto.java rename to src/main/java/com/somemore/domains/center/dto/response/CenterSimpleInfoResponseDto.java index 0e344330..e446e6d3 100644 --- a/src/main/java/com/somemore/center/dto/response/CenterSimpleInfoResponseDto.java +++ b/src/main/java/com/somemore/domains/center/dto/response/CenterSimpleInfoResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.center.dto.response; +package com.somemore.domains.center.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.domain.Center; +import com.somemore.domains.center.domain.Center; import io.swagger.v3.oas.annotations.media.Schema; import java.util.UUID; import lombok.Builder; diff --git a/src/main/java/com/somemore/center/dto/response/PreferItemCreateResponseDto.java b/src/main/java/com/somemore/domains/center/dto/response/PreferItemCreateResponseDto.java similarity index 90% rename from src/main/java/com/somemore/center/dto/response/PreferItemCreateResponseDto.java rename to src/main/java/com/somemore/domains/center/dto/response/PreferItemCreateResponseDto.java index faa0a8f2..32b794e4 100644 --- a/src/main/java/com/somemore/center/dto/response/PreferItemCreateResponseDto.java +++ b/src/main/java/com/somemore/domains/center/dto/response/PreferItemCreateResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.center.dto.response; +package com.somemore.domains.center.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/center/dto/response/PreferItemResponseDto.java b/src/main/java/com/somemore/domains/center/dto/response/PreferItemResponseDto.java similarity index 81% rename from src/main/java/com/somemore/center/dto/response/PreferItemResponseDto.java rename to src/main/java/com/somemore/domains/center/dto/response/PreferItemResponseDto.java index 85fa7474..7fdc900d 100644 --- a/src/main/java/com/somemore/center/dto/response/PreferItemResponseDto.java +++ b/src/main/java/com/somemore/domains/center/dto/response/PreferItemResponseDto.java @@ -1,6 +1,6 @@ -package com.somemore.center.dto.response; +package com.somemore.domains.center.dto.response; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import lombok.Builder; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/repository/center/CenterJpaRepository.java b/src/main/java/com/somemore/domains/center/repository/center/CenterJpaRepository.java similarity index 77% rename from src/main/java/com/somemore/center/repository/center/CenterJpaRepository.java rename to src/main/java/com/somemore/domains/center/repository/center/CenterJpaRepository.java index 8601f230..ef68ed2e 100644 --- a/src/main/java/com/somemore/center/repository/center/CenterJpaRepository.java +++ b/src/main/java/com/somemore/domains/center/repository/center/CenterJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.center.repository.center; +package com.somemore.domains.center.repository.center; -import com.somemore.center.domain.Center; +import com.somemore.domains.center.domain.Center; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; diff --git a/src/main/java/com/somemore/center/repository/center/CenterRepository.java b/src/main/java/com/somemore/domains/center/repository/center/CenterRepository.java similarity index 76% rename from src/main/java/com/somemore/center/repository/center/CenterRepository.java rename to src/main/java/com/somemore/domains/center/repository/center/CenterRepository.java index a0798bec..1d6af166 100644 --- a/src/main/java/com/somemore/center/repository/center/CenterRepository.java +++ b/src/main/java/com/somemore/domains/center/repository/center/CenterRepository.java @@ -1,7 +1,7 @@ -package com.somemore.center.repository.center; +package com.somemore.domains.center.repository.center; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; import org.springframework.stereotype.Repository; import java.util.List; diff --git a/src/main/java/com/somemore/center/repository/center/CenterRepositoryImpl.java b/src/main/java/com/somemore/domains/center/repository/center/CenterRepositoryImpl.java similarity index 91% rename from src/main/java/com/somemore/center/repository/center/CenterRepositoryImpl.java rename to src/main/java/com/somemore/domains/center/repository/center/CenterRepositoryImpl.java index fdde55c5..c8d03b14 100644 --- a/src/main/java/com/somemore/center/repository/center/CenterRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/center/repository/center/CenterRepositoryImpl.java @@ -1,11 +1,11 @@ -package com.somemore.center.repository.center; +package com.somemore.domains.center.repository.center; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.center.domain.Center; -import com.somemore.center.domain.QCenter; -import com.somemore.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.domain.QCenter; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/center/repository/mapper/CenterOverviewInfo.java b/src/main/java/com/somemore/domains/center/repository/mapper/CenterOverviewInfo.java similarity index 71% rename from src/main/java/com/somemore/center/repository/mapper/CenterOverviewInfo.java rename to src/main/java/com/somemore/domains/center/repository/mapper/CenterOverviewInfo.java index d770935a..e876366d 100644 --- a/src/main/java/com/somemore/center/repository/mapper/CenterOverviewInfo.java +++ b/src/main/java/com/somemore/domains/center/repository/mapper/CenterOverviewInfo.java @@ -1,4 +1,4 @@ -package com.somemore.center.repository.mapper; +package com.somemore.domains.center.repository.mapper; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/repository/preferitem/PreferItemJpaRepository.java b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemJpaRepository.java similarity index 68% rename from src/main/java/com/somemore/center/repository/preferitem/PreferItemJpaRepository.java rename to src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemJpaRepository.java index dbab2358..4b3189a6 100644 --- a/src/main/java/com/somemore/center/repository/preferitem/PreferItemJpaRepository.java +++ b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.center.repository.preferitem; +package com.somemore.domains.center.repository.preferitem; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; diff --git a/src/main/java/com/somemore/center/repository/preferitem/PreferItemRepository.java b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepository.java similarity index 76% rename from src/main/java/com/somemore/center/repository/preferitem/PreferItemRepository.java rename to src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepository.java index 3a89d923..abb63714 100644 --- a/src/main/java/com/somemore/center/repository/preferitem/PreferItemRepository.java +++ b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepository.java @@ -1,6 +1,6 @@ -package com.somemore.center.repository.preferitem; +package com.somemore.domains.center.repository.preferitem; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import org.springframework.stereotype.Repository; import java.util.List; diff --git a/src/main/java/com/somemore/center/repository/preferitem/PreferItemRepositoryImpl.java b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepositoryImpl.java similarity index 88% rename from src/main/java/com/somemore/center/repository/preferitem/PreferItemRepositoryImpl.java rename to src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepositoryImpl.java index 8ca805b8..b7e708f6 100644 --- a/src/main/java/com/somemore/center/repository/preferitem/PreferItemRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/center/repository/preferitem/PreferItemRepositoryImpl.java @@ -1,6 +1,6 @@ -package com.somemore.center.repository.preferitem; +package com.somemore.domains.center.repository.preferitem; -import com.somemore.center.domain.PreferItem; +import com.somemore.domains.center.domain.PreferItem; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/center/service/command/CreatePreferItemService.java b/src/main/java/com/somemore/domains/center/service/command/CreatePreferItemService.java similarity index 61% rename from src/main/java/com/somemore/center/service/command/CreatePreferItemService.java rename to src/main/java/com/somemore/domains/center/service/command/CreatePreferItemService.java index e1bb20a2..59afab41 100644 --- a/src/main/java/com/somemore/center/service/command/CreatePreferItemService.java +++ b/src/main/java/com/somemore/domains/center/service/command/CreatePreferItemService.java @@ -1,11 +1,11 @@ -package com.somemore.center.service.command; - -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.dto.response.PreferItemCreateResponseDto; -import com.somemore.center.repository.preferitem.PreferItemRepository; -import com.somemore.center.usecase.command.CreatePreferItemUseCase; -import com.somemore.center.usecase.query.CenterQueryUseCase; +package com.somemore.domains.center.service.command; + +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.dto.response.PreferItemCreateResponseDto; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; +import com.somemore.domains.center.usecase.command.CreatePreferItemUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/center/service/command/DeletePreferItemService.java b/src/main/java/com/somemore/domains/center/service/command/DeletePreferItemService.java similarity index 79% rename from src/main/java/com/somemore/center/service/command/DeletePreferItemService.java rename to src/main/java/com/somemore/domains/center/service/command/DeletePreferItemService.java index 246c1aef..6bec1a4f 100644 --- a/src/main/java/com/somemore/center/service/command/DeletePreferItemService.java +++ b/src/main/java/com/somemore/domains/center/service/command/DeletePreferItemService.java @@ -1,8 +1,8 @@ -package com.somemore.center.service.command; +package com.somemore.domains.center.service.command; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.repository.preferitem.PreferItemRepository; -import com.somemore.center.usecase.command.DeletePreferItemUseCase; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; +import com.somemore.domains.center.usecase.command.DeletePreferItemUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/center/service/command/UpdateCenterProfileService.java b/src/main/java/com/somemore/domains/center/service/command/UpdateCenterProfileService.java similarity index 71% rename from src/main/java/com/somemore/center/service/command/UpdateCenterProfileService.java rename to src/main/java/com/somemore/domains/center/service/command/UpdateCenterProfileService.java index 48e3d1de..93fc2d43 100644 --- a/src/main/java/com/somemore/center/service/command/UpdateCenterProfileService.java +++ b/src/main/java/com/somemore/domains/center/service/command/UpdateCenterProfileService.java @@ -1,9 +1,9 @@ -package com.somemore.center.service.command; +package com.somemore.domains.center.service.command; -import com.somemore.center.domain.Center; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.usecase.command.UpdateCenterProfileUseCase; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.usecase.command.UpdateCenterProfileUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/center/service/query/CenterQueryService.java b/src/main/java/com/somemore/domains/center/service/query/CenterQueryService.java similarity index 73% rename from src/main/java/com/somemore/center/service/query/CenterQueryService.java rename to src/main/java/com/somemore/domains/center/service/query/CenterQueryService.java index 71c89dae..ae0632d1 100644 --- a/src/main/java/com/somemore/center/service/query/CenterQueryService.java +++ b/src/main/java/com/somemore/domains/center/service/query/CenterQueryService.java @@ -1,12 +1,12 @@ -package com.somemore.center.service.query; - -import com.somemore.center.domain.Center; -import com.somemore.center.repository.mapper.CenterOverviewInfo; -import com.somemore.center.dto.response.CenterProfileResponseDto; -import com.somemore.center.dto.response.PreferItemResponseDto; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.usecase.query.CenterQueryUseCase; -import com.somemore.center.usecase.query.PreferItemQueryUseCase; +package com.somemore.domains.center.service.query; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.dto.response.CenterProfileResponseDto; +import com.somemore.domains.center.dto.response.PreferItemResponseDto; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.usecase.query.PreferItemQueryUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/center/service/query/CenterSignService.java b/src/main/java/com/somemore/domains/center/service/query/CenterSignService.java similarity index 84% rename from src/main/java/com/somemore/center/service/query/CenterSignService.java rename to src/main/java/com/somemore/domains/center/service/query/CenterSignService.java index 0c71a334..3221e09c 100644 --- a/src/main/java/com/somemore/center/service/query/CenterSignService.java +++ b/src/main/java/com/somemore/domains/center/service/query/CenterSignService.java @@ -1,7 +1,7 @@ -package com.somemore.center.service.query; +package com.somemore.domains.center.service.query; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.usecase.query.CenterSignUseCase; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.usecase.query.CenterSignUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/center/service/query/PreferItemQueryService.java b/src/main/java/com/somemore/domains/center/service/query/PreferItemQueryService.java similarity index 76% rename from src/main/java/com/somemore/center/service/query/PreferItemQueryService.java rename to src/main/java/com/somemore/domains/center/service/query/PreferItemQueryService.java index b46c0a44..9c907cde 100644 --- a/src/main/java/com/somemore/center/service/query/PreferItemQueryService.java +++ b/src/main/java/com/somemore/domains/center/service/query/PreferItemQueryService.java @@ -1,9 +1,9 @@ -package com.somemore.center.service.query; +package com.somemore.domains.center.service.query; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.response.PreferItemResponseDto; -import com.somemore.center.repository.preferitem.PreferItemRepository; -import com.somemore.center.usecase.query.PreferItemQueryUseCase; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.response.PreferItemResponseDto; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; +import com.somemore.domains.center.usecase.query.PreferItemQueryUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/domains/center/usecase/command/CreatePreferItemUseCase.java b/src/main/java/com/somemore/domains/center/usecase/command/CreatePreferItemUseCase.java new file mode 100644 index 00000000..1854b5b5 --- /dev/null +++ b/src/main/java/com/somemore/domains/center/usecase/command/CreatePreferItemUseCase.java @@ -0,0 +1,11 @@ +package com.somemore.domains.center.usecase.command; + +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.dto.response.PreferItemCreateResponseDto; + +import java.util.UUID; + +public interface CreatePreferItemUseCase { + + PreferItemCreateResponseDto createPreferItem(UUID userId, PreferItemCreateRequestDto requestDto); +} diff --git a/src/main/java/com/somemore/center/usecase/command/DeletePreferItemUseCase.java b/src/main/java/com/somemore/domains/center/usecase/command/DeletePreferItemUseCase.java similarity index 71% rename from src/main/java/com/somemore/center/usecase/command/DeletePreferItemUseCase.java rename to src/main/java/com/somemore/domains/center/usecase/command/DeletePreferItemUseCase.java index 6458c7da..9d9e8916 100644 --- a/src/main/java/com/somemore/center/usecase/command/DeletePreferItemUseCase.java +++ b/src/main/java/com/somemore/domains/center/usecase/command/DeletePreferItemUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.center.usecase.command; +package com.somemore.domains.center.usecase.command; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/usecase/command/UpdateCenterProfileUseCase.java b/src/main/java/com/somemore/domains/center/usecase/command/UpdateCenterProfileUseCase.java similarity index 57% rename from src/main/java/com/somemore/center/usecase/command/UpdateCenterProfileUseCase.java rename to src/main/java/com/somemore/domains/center/usecase/command/UpdateCenterProfileUseCase.java index df5905fc..8f90413d 100644 --- a/src/main/java/com/somemore/center/usecase/command/UpdateCenterProfileUseCase.java +++ b/src/main/java/com/somemore/domains/center/usecase/command/UpdateCenterProfileUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.center.usecase.command; +package com.somemore.domains.center.usecase.command; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/usecase/query/CenterQueryUseCase.java b/src/main/java/com/somemore/domains/center/usecase/query/CenterQueryUseCase.java similarity index 58% rename from src/main/java/com/somemore/center/usecase/query/CenterQueryUseCase.java rename to src/main/java/com/somemore/domains/center/usecase/query/CenterQueryUseCase.java index 3f381ec3..598ef72e 100644 --- a/src/main/java/com/somemore/center/usecase/query/CenterQueryUseCase.java +++ b/src/main/java/com/somemore/domains/center/usecase/query/CenterQueryUseCase.java @@ -1,7 +1,7 @@ -package com.somemore.center.usecase.query; +package com.somemore.domains.center.usecase.query; -import com.somemore.center.repository.mapper.CenterOverviewInfo; -import com.somemore.center.dto.response.CenterProfileResponseDto; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.dto.response.CenterProfileResponseDto; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/usecase/query/CenterSignUseCase.java b/src/main/java/com/somemore/domains/center/usecase/query/CenterSignUseCase.java similarity index 76% rename from src/main/java/com/somemore/center/usecase/query/CenterSignUseCase.java rename to src/main/java/com/somemore/domains/center/usecase/query/CenterSignUseCase.java index cc84cdcc..d572cabe 100644 --- a/src/main/java/com/somemore/center/usecase/query/CenterSignUseCase.java +++ b/src/main/java/com/somemore/domains/center/usecase/query/CenterSignUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.center.usecase.query; +package com.somemore.domains.center.usecase.query; import java.util.UUID; diff --git a/src/main/java/com/somemore/center/usecase/query/PreferItemQueryUseCase.java b/src/main/java/com/somemore/domains/center/usecase/query/PreferItemQueryUseCase.java similarity index 56% rename from src/main/java/com/somemore/center/usecase/query/PreferItemQueryUseCase.java rename to src/main/java/com/somemore/domains/center/usecase/query/PreferItemQueryUseCase.java index 46230cfc..64b09f3d 100644 --- a/src/main/java/com/somemore/center/usecase/query/PreferItemQueryUseCase.java +++ b/src/main/java/com/somemore/domains/center/usecase/query/PreferItemQueryUseCase.java @@ -1,7 +1,7 @@ -package com.somemore.center.usecase.query; +package com.somemore.domains.center.usecase.query; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.response.PreferItemResponseDto; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.response.PreferItemResponseDto; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java b/src/main/java/com/somemore/domains/community/controller/CommunityBoardCommandApiController.java similarity index 87% rename from src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java rename to src/main/java/com/somemore/domains/community/controller/CommunityBoardCommandApiController.java index 20a58a0a..47bdd49d 100644 --- a/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java +++ b/src/main/java/com/somemore/domains/community/controller/CommunityBoardCommandApiController.java @@ -1,11 +1,11 @@ -package com.somemore.community.controller; +package com.somemore.domains.community.controller; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; +import com.somemore.domains.community.usecase.board.DeleteCommunityBoardUseCase; +import com.somemore.domains.community.usecase.board.UpdateCommunityBoardUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; -import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; -import com.somemore.community.usecase.board.UpdateCommunityBoardUseCase; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.imageupload.dto.ImageUploadRequestDto; import com.somemore.global.imageupload.usecase.ImageUploadUseCase; diff --git a/src/main/java/com/somemore/community/controller/CommunityBoardQueryApiController.java b/src/main/java/com/somemore/domains/community/controller/CommunityBoardQueryApiController.java similarity index 92% rename from src/main/java/com/somemore/community/controller/CommunityBoardQueryApiController.java rename to src/main/java/com/somemore/domains/community/controller/CommunityBoardQueryApiController.java index a25fe29a..2133d853 100644 --- a/src/main/java/com/somemore/community/controller/CommunityBoardQueryApiController.java +++ b/src/main/java/com/somemore/domains/community/controller/CommunityBoardQueryApiController.java @@ -1,9 +1,9 @@ -package com.somemore.community.controller; +package com.somemore.domains.community.controller; -import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; -import com.somemore.community.dto.response.CommunityBoardResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardDetailResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardResponseDto; //import com.somemore.community.usecase.board.CommunityBoardDocumentUseCase; -import com.somemore.community.usecase.board.CommunityBoardQueryUseCase; +import com.somemore.domains.community.usecase.board.CommunityBoardQueryUseCase; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java b/src/main/java/com/somemore/domains/community/controller/CommunityCommentCommandApiController.java similarity index 84% rename from src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java rename to src/main/java/com/somemore/domains/community/controller/CommunityCommentCommandApiController.java index 6e16b564..a528d572 100644 --- a/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java +++ b/src/main/java/com/somemore/domains/community/controller/CommunityCommentCommandApiController.java @@ -1,11 +1,11 @@ -package com.somemore.community.controller; +package com.somemore.domains.community.controller; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.usecase.comment.CreateCommunityCommentUseCase; +import com.somemore.domains.community.usecase.comment.DeleteCommunityCommentUseCase; +import com.somemore.domains.community.usecase.comment.UpdateCommunityCommentUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; -import com.somemore.community.usecase.comment.CreateCommunityCommentUseCase; -import com.somemore.community.usecase.comment.DeleteCommunityCommentUseCase; -import com.somemore.community.usecase.comment.UpdateCommunityCommentUseCase; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/community/controller/CommunityCommentQueryApiController.java b/src/main/java/com/somemore/domains/community/controller/CommunityCommentQueryApiController.java similarity index 86% rename from src/main/java/com/somemore/community/controller/CommunityCommentQueryApiController.java rename to src/main/java/com/somemore/domains/community/controller/CommunityCommentQueryApiController.java index 25cec598..c0ceecd5 100644 --- a/src/main/java/com/somemore/community/controller/CommunityCommentQueryApiController.java +++ b/src/main/java/com/somemore/domains/community/controller/CommunityCommentQueryApiController.java @@ -1,7 +1,7 @@ -package com.somemore.community.controller; +package com.somemore.domains.community.controller; -import com.somemore.community.dto.response.CommunityCommentResponseDto; -import com.somemore.community.usecase.comment.CommunityCommentQueryUseCase; +import com.somemore.domains.community.dto.response.CommunityCommentResponseDto; +import com.somemore.domains.community.usecase.comment.CommunityCommentQueryUseCase; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/community/domain/CommunityBoard.java b/src/main/java/com/somemore/domains/community/domain/CommunityBoard.java similarity index 92% rename from src/main/java/com/somemore/community/domain/CommunityBoard.java rename to src/main/java/com/somemore/domains/community/domain/CommunityBoard.java index 58779325..04292cd3 100644 --- a/src/main/java/com/somemore/community/domain/CommunityBoard.java +++ b/src/main/java/com/somemore/domains/community/domain/CommunityBoard.java @@ -1,6 +1,6 @@ -package com.somemore.community.domain; +package com.somemore.domains.community.domain; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; import com.somemore.global.common.entity.BaseEntity; import static lombok.AccessLevel.PROTECTED; diff --git a/src/main/java/com/somemore/community/domain/CommunityBoardDocument.java b/src/main/java/com/somemore/domains/community/domain/CommunityBoardDocument.java similarity index 100% rename from src/main/java/com/somemore/community/domain/CommunityBoardDocument.java rename to src/main/java/com/somemore/domains/community/domain/CommunityBoardDocument.java diff --git a/src/main/java/com/somemore/community/domain/CommunityComment.java b/src/main/java/com/somemore/domains/community/domain/CommunityComment.java similarity index 92% rename from src/main/java/com/somemore/community/domain/CommunityComment.java rename to src/main/java/com/somemore/domains/community/domain/CommunityComment.java index 4705e3e6..929eee8d 100644 --- a/src/main/java/com/somemore/community/domain/CommunityComment.java +++ b/src/main/java/com/somemore/domains/community/domain/CommunityComment.java @@ -1,6 +1,6 @@ -package com.somemore.community.domain; +package com.somemore.domains.community.domain; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; import com.somemore.global.common.entity.BaseEntity; import jakarta.persistence.*; import lombok.Builder; diff --git a/src/main/java/com/somemore/community/dto/request/CommunityBoardCreateRequestDto.java b/src/main/java/com/somemore/domains/community/dto/request/CommunityBoardCreateRequestDto.java similarity index 90% rename from src/main/java/com/somemore/community/dto/request/CommunityBoardCreateRequestDto.java rename to src/main/java/com/somemore/domains/community/dto/request/CommunityBoardCreateRequestDto.java index 95227673..0c7b160b 100644 --- a/src/main/java/com/somemore/community/dto/request/CommunityBoardCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/community/dto/request/CommunityBoardCreateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.community.dto.request; +package com.somemore.domains.community.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityBoard; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Builder; diff --git a/src/main/java/com/somemore/community/dto/request/CommunityBoardUpdateRequestDto.java b/src/main/java/com/somemore/domains/community/dto/request/CommunityBoardUpdateRequestDto.java similarity index 94% rename from src/main/java/com/somemore/community/dto/request/CommunityBoardUpdateRequestDto.java rename to src/main/java/com/somemore/domains/community/dto/request/CommunityBoardUpdateRequestDto.java index 83077f43..cba23e5b 100644 --- a/src/main/java/com/somemore/community/dto/request/CommunityBoardUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/community/dto/request/CommunityBoardUpdateRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.community.dto.request; +package com.somemore.domains.community.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/community/dto/request/CommunityCommentCreateRequestDto.java b/src/main/java/com/somemore/domains/community/dto/request/CommunityCommentCreateRequestDto.java similarity index 90% rename from src/main/java/com/somemore/community/dto/request/CommunityCommentCreateRequestDto.java rename to src/main/java/com/somemore/domains/community/dto/request/CommunityCommentCreateRequestDto.java index 6185bfa4..648a7ae0 100644 --- a/src/main/java/com/somemore/community/dto/request/CommunityCommentCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/community/dto/request/CommunityCommentCreateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.community.dto.request; +package com.somemore.domains.community.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.community.domain.CommunityComment; +import com.somemore.domains.community.domain.CommunityComment; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.annotation.Nullable; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/com/somemore/community/dto/request/CommunityCommentUpdateRequestDto.java b/src/main/java/com/somemore/domains/community/dto/request/CommunityCommentUpdateRequestDto.java similarity index 91% rename from src/main/java/com/somemore/community/dto/request/CommunityCommentUpdateRequestDto.java rename to src/main/java/com/somemore/domains/community/dto/request/CommunityCommentUpdateRequestDto.java index 4eb3ca35..08bd105f 100644 --- a/src/main/java/com/somemore/community/dto/request/CommunityCommentUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/community/dto/request/CommunityCommentUpdateRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.community.dto.request; +package com.somemore.domains.community.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/community/dto/response/CommunityBoardDetailResponseDto.java b/src/main/java/com/somemore/domains/community/dto/response/CommunityBoardDetailResponseDto.java similarity index 93% rename from src/main/java/com/somemore/community/dto/response/CommunityBoardDetailResponseDto.java rename to src/main/java/com/somemore/domains/community/dto/response/CommunityBoardDetailResponseDto.java index 6bab4ff0..b4110604 100644 --- a/src/main/java/com/somemore/community/dto/response/CommunityBoardDetailResponseDto.java +++ b/src/main/java/com/somemore/domains/community/dto/response/CommunityBoardDetailResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.community.dto.response; +package com.somemore.domains.community.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityBoard; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/community/dto/response/CommunityBoardResponseDto.java b/src/main/java/com/somemore/domains/community/dto/response/CommunityBoardResponseDto.java similarity index 90% rename from src/main/java/com/somemore/community/dto/response/CommunityBoardResponseDto.java rename to src/main/java/com/somemore/domains/community/dto/response/CommunityBoardResponseDto.java index c0636518..35fb501d 100644 --- a/src/main/java/com/somemore/community/dto/response/CommunityBoardResponseDto.java +++ b/src/main/java/com/somemore/domains/community/dto/response/CommunityBoardResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.community.dto.response; +package com.somemore.domains.community.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.community.repository.mapper.CommunityBoardView; +import com.somemore.domains.community.repository.mapper.CommunityBoardView; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; diff --git a/src/main/java/com/somemore/community/dto/response/CommunityCommentResponseDto.java b/src/main/java/com/somemore/domains/community/dto/response/CommunityCommentResponseDto.java similarity index 93% rename from src/main/java/com/somemore/community/dto/response/CommunityCommentResponseDto.java rename to src/main/java/com/somemore/domains/community/dto/response/CommunityCommentResponseDto.java index 19983bb2..9e33779d 100644 --- a/src/main/java/com/somemore/community/dto/response/CommunityCommentResponseDto.java +++ b/src/main/java/com/somemore/domains/community/dto/response/CommunityCommentResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.community.dto.response; +package com.somemore.domains.community.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.community.repository.mapper.CommunityCommentView; +import com.somemore.domains.community.repository.mapper.CommunityCommentView; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; diff --git a/src/main/java/com/somemore/community/event/CommentAddedEvent.java b/src/main/java/com/somemore/domains/community/event/CommentAddedEvent.java similarity index 89% rename from src/main/java/com/somemore/community/event/CommentAddedEvent.java rename to src/main/java/com/somemore/domains/community/event/CommentAddedEvent.java index 79a648d5..0f0470fe 100644 --- a/src/main/java/com/somemore/community/event/CommentAddedEvent.java +++ b/src/main/java/com/somemore/domains/community/event/CommentAddedEvent.java @@ -1,10 +1,10 @@ -package com.somemore.community.event; +package com.somemore.domains.community.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.global.common.event.ServerEvent; import com.somemore.global.common.event.ServerEventType; -import com.somemore.notification.domain.NotificationSubType; import lombok.Getter; import lombok.experimental.SuperBuilder; diff --git a/src/main/java/com/somemore/community/repository/board/CommunityBoardDocumentRepository.java b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardDocumentRepository.java similarity index 100% rename from src/main/java/com/somemore/community/repository/board/CommunityBoardDocumentRepository.java rename to src/main/java/com/somemore/domains/community/repository/board/CommunityBoardDocumentRepository.java diff --git a/src/main/java/com/somemore/community/repository/board/CommunityBoardJpaRepository.java b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardJpaRepository.java similarity index 63% rename from src/main/java/com/somemore/community/repository/board/CommunityBoardJpaRepository.java rename to src/main/java/com/somemore/domains/community/repository/board/CommunityBoardJpaRepository.java index 00d96d29..eda62438 100644 --- a/src/main/java/com/somemore/community/repository/board/CommunityBoardJpaRepository.java +++ b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.community.repository.board; +package com.somemore.domains.community.repository.board; -import com.somemore.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityBoard; import org.springframework.data.jpa.repository.JpaRepository; public interface CommunityBoardJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/community/repository/board/CommunityBoardRepository.java b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepository.java similarity index 81% rename from src/main/java/com/somemore/community/repository/board/CommunityBoardRepository.java rename to src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepository.java index 0e179626..03d8ddb3 100644 --- a/src/main/java/com/somemore/community/repository/board/CommunityBoardRepository.java +++ b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepository.java @@ -1,7 +1,7 @@ -package com.somemore.community.repository.board; +package com.somemore.domains.community.repository.board; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.repository.mapper.CommunityBoardView; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.repository.mapper.CommunityBoardView; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/community/repository/board/CommunityBoardRepositoryImpl.java b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepositoryImpl.java similarity index 95% rename from src/main/java/com/somemore/community/repository/board/CommunityBoardRepositoryImpl.java rename to src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepositoryImpl.java index e0e2b075..902021d1 100644 --- a/src/main/java/com/somemore/community/repository/board/CommunityBoardRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/community/repository/board/CommunityBoardRepositoryImpl.java @@ -1,13 +1,13 @@ -package com.somemore.community.repository.board; +package com.somemore.domains.community.repository.board; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.repository.mapper.CommunityBoardView; -import com.somemore.community.domain.QCommunityBoard; -import com.somemore.volunteer.domain.QVolunteer; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.QCommunityBoard; +import com.somemore.domains.community.repository.mapper.CommunityBoardView; +import com.somemore.domains.volunteer.domain.QVolunteer; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/somemore/community/repository/comment/CommunityCommentJpaRepository.java b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentJpaRepository.java similarity index 56% rename from src/main/java/com/somemore/community/repository/comment/CommunityCommentJpaRepository.java rename to src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentJpaRepository.java index fd02cad5..e420f67f 100644 --- a/src/main/java/com/somemore/community/repository/comment/CommunityCommentJpaRepository.java +++ b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.community.repository.comment; +package com.somemore.domains.community.repository.comment; -import com.somemore.community.domain.CommunityComment; +import com.somemore.domains.community.domain.CommunityComment; import org.springframework.data.jpa.repository.JpaRepository; public interface CommunityCommentJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/community/repository/comment/CommunityCommentRepository.java b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepository.java similarity index 72% rename from src/main/java/com/somemore/community/repository/comment/CommunityCommentRepository.java rename to src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepository.java index 8075dd0f..fd4c285a 100644 --- a/src/main/java/com/somemore/community/repository/comment/CommunityCommentRepository.java +++ b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepository.java @@ -1,7 +1,7 @@ -package com.somemore.community.repository.comment; +package com.somemore.domains.community.repository.comment; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.repository.mapper.CommunityCommentView; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.repository.mapper.CommunityCommentView; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/community/repository/comment/CommunityCommentRepositoryImpl.java b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepositoryImpl.java similarity index 89% rename from src/main/java/com/somemore/community/repository/comment/CommunityCommentRepositoryImpl.java rename to src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepositoryImpl.java index a08c6da6..f9d2ef60 100644 --- a/src/main/java/com/somemore/community/repository/comment/CommunityCommentRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/community/repository/comment/CommunityCommentRepositoryImpl.java @@ -1,12 +1,12 @@ -package com.somemore.community.repository.comment; +package com.somemore.domains.community.repository.comment; import com.querydsl.core.types.Projections; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.domain.QCommunityComment; -import com.somemore.community.repository.mapper.CommunityCommentView; -import com.somemore.volunteer.domain.QVolunteer; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.domain.QCommunityComment; +import com.somemore.domains.community.repository.mapper.CommunityCommentView; +import com.somemore.domains.volunteer.domain.QVolunteer; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/domains/community/repository/mapper/CommunityBoardView.java b/src/main/java/com/somemore/domains/community/repository/mapper/CommunityBoardView.java new file mode 100644 index 00000000..69c3e7d1 --- /dev/null +++ b/src/main/java/com/somemore/domains/community/repository/mapper/CommunityBoardView.java @@ -0,0 +1,8 @@ +package com.somemore.domains.community.repository.mapper; + +import com.somemore.domains.community.domain.CommunityBoard; + +public record CommunityBoardView( + CommunityBoard communityBoard, + String writerNickname) { +} diff --git a/src/main/java/com/somemore/community/repository/mapper/CommunityCommentView.java b/src/main/java/com/somemore/domains/community/repository/mapper/CommunityCommentView.java similarity index 77% rename from src/main/java/com/somemore/community/repository/mapper/CommunityCommentView.java rename to src/main/java/com/somemore/domains/community/repository/mapper/CommunityCommentView.java index 48664c0a..9fdd20f3 100644 --- a/src/main/java/com/somemore/community/repository/mapper/CommunityCommentView.java +++ b/src/main/java/com/somemore/domains/community/repository/mapper/CommunityCommentView.java @@ -1,6 +1,6 @@ -package com.somemore.community.repository.mapper; +package com.somemore.domains.community.repository.mapper; -import com.somemore.community.domain.CommunityComment; +import com.somemore.domains.community.domain.CommunityComment; import lombok.Builder; @Builder diff --git a/src/main/java/com/somemore/community/scheduler/CommunityBoardUpdateScheduler.java b/src/main/java/com/somemore/domains/community/scheduler/CommunityBoardUpdateScheduler.java similarity index 100% rename from src/main/java/com/somemore/community/scheduler/CommunityBoardUpdateScheduler.java rename to src/main/java/com/somemore/domains/community/scheduler/CommunityBoardUpdateScheduler.java diff --git a/src/main/java/com/somemore/community/service/board/CommunityBoardDocumentService.java b/src/main/java/com/somemore/domains/community/service/board/CommunityBoardDocumentService.java similarity index 100% rename from src/main/java/com/somemore/community/service/board/CommunityBoardDocumentService.java rename to src/main/java/com/somemore/domains/community/service/board/CommunityBoardDocumentService.java diff --git a/src/main/java/com/somemore/community/service/board/CommunityBoardQueryService.java b/src/main/java/com/somemore/domains/community/service/board/CommunityBoardQueryService.java similarity index 78% rename from src/main/java/com/somemore/community/service/board/CommunityBoardQueryService.java rename to src/main/java/com/somemore/domains/community/service/board/CommunityBoardQueryService.java index 56a9bcea..4d6d9438 100644 --- a/src/main/java/com/somemore/community/service/board/CommunityBoardQueryService.java +++ b/src/main/java/com/somemore/domains/community/service/board/CommunityBoardQueryService.java @@ -1,11 +1,11 @@ -package com.somemore.community.service.board; - -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.repository.mapper.CommunityBoardView; -import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; -import com.somemore.community.dto.response.CommunityBoardResponseDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.CommunityBoardQueryUseCase; +package com.somemore.domains.community.service.board; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.repository.mapper.CommunityBoardView; +import com.somemore.domains.community.dto.response.CommunityBoardDetailResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardResponseDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.CommunityBoardQueryUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/somemore/community/service/board/CreateCommunityBoardService.java b/src/main/java/com/somemore/domains/community/service/board/CreateCommunityBoardService.java similarity index 66% rename from src/main/java/com/somemore/community/service/board/CreateCommunityBoardService.java rename to src/main/java/com/somemore/domains/community/service/board/CreateCommunityBoardService.java index 61bcf176..c4643801 100644 --- a/src/main/java/com/somemore/community/service/board/CreateCommunityBoardService.java +++ b/src/main/java/com/somemore/domains/community/service/board/CreateCommunityBoardService.java @@ -1,9 +1,9 @@ -package com.somemore.community.service.board; +package com.somemore.domains.community.service.board; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/community/service/board/DeleteCommunityBoardService.java b/src/main/java/com/somemore/domains/community/service/board/DeleteCommunityBoardService.java similarity index 83% rename from src/main/java/com/somemore/community/service/board/DeleteCommunityBoardService.java rename to src/main/java/com/somemore/domains/community/service/board/DeleteCommunityBoardService.java index ed9ff142..9d97be29 100644 --- a/src/main/java/com/somemore/community/service/board/DeleteCommunityBoardService.java +++ b/src/main/java/com/somemore/domains/community/service/board/DeleteCommunityBoardService.java @@ -1,8 +1,8 @@ -package com.somemore.community.service.board; +package com.somemore.domains.community.service.board; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.DeleteCommunityBoardUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/community/service/board/UpdateCommunityBoardService.java b/src/main/java/com/somemore/domains/community/service/board/UpdateCommunityBoardService.java similarity index 79% rename from src/main/java/com/somemore/community/service/board/UpdateCommunityBoardService.java rename to src/main/java/com/somemore/domains/community/service/board/UpdateCommunityBoardService.java index 89a5dfb8..0b276d3d 100644 --- a/src/main/java/com/somemore/community/service/board/UpdateCommunityBoardService.java +++ b/src/main/java/com/somemore/domains/community/service/board/UpdateCommunityBoardService.java @@ -1,9 +1,9 @@ -package com.somemore.community.service.board; +package com.somemore.domains.community.service.board; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.UpdateCommunityBoardUseCase; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.UpdateCommunityBoardUseCase; import com.somemore.global.exception.BadRequestException; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/service/comment/CommunityCommentQueryService.java b/src/main/java/com/somemore/domains/community/service/comment/CommunityCommentQueryService.java similarity index 87% rename from src/main/java/com/somemore/community/service/comment/CommunityCommentQueryService.java rename to src/main/java/com/somemore/domains/community/service/comment/CommunityCommentQueryService.java index 92936df9..0eca5c4a 100644 --- a/src/main/java/com/somemore/community/service/comment/CommunityCommentQueryService.java +++ b/src/main/java/com/somemore/domains/community/service/comment/CommunityCommentQueryService.java @@ -1,10 +1,10 @@ -package com.somemore.community.service.comment; +package com.somemore.domains.community.service.comment; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.response.CommunityCommentResponseDto; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.repository.mapper.CommunityCommentView; -import com.somemore.community.usecase.comment.CommunityCommentQueryUseCase; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.response.CommunityCommentResponseDto; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.repository.mapper.CommunityCommentView; +import com.somemore.domains.community.usecase.comment.CommunityCommentQueryUseCase; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; diff --git a/src/main/java/com/somemore/community/service/comment/CreateCommunityCommentService.java b/src/main/java/com/somemore/domains/community/service/comment/CreateCommunityCommentService.java similarity index 84% rename from src/main/java/com/somemore/community/service/comment/CreateCommunityCommentService.java rename to src/main/java/com/somemore/domains/community/service/comment/CreateCommunityCommentService.java index deb39a2c..bc5784c6 100644 --- a/src/main/java/com/somemore/community/service/comment/CreateCommunityCommentService.java +++ b/src/main/java/com/somemore/domains/community/service/comment/CreateCommunityCommentService.java @@ -1,15 +1,15 @@ -package com.somemore.community.service.comment; - -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.event.CommentAddedEvent; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.usecase.comment.CreateCommunityCommentUseCase; +package com.somemore.domains.community.service.comment; + +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.event.CommentAddedEvent; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.usecase.comment.CreateCommunityCommentUseCase; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; import com.somemore.global.exception.BadRequestException; -import com.somemore.notification.domain.NotificationSubType; import jakarta.persistence.EntityNotFoundException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/community/service/comment/DeleteCommunityCommentService.java b/src/main/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentService.java similarity index 82% rename from src/main/java/com/somemore/community/service/comment/DeleteCommunityCommentService.java rename to src/main/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentService.java index 03e00e35..1cfeb938 100644 --- a/src/main/java/com/somemore/community/service/comment/DeleteCommunityCommentService.java +++ b/src/main/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentService.java @@ -1,8 +1,8 @@ -package com.somemore.community.service.comment; +package com.somemore.domains.community.service.comment; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.usecase.comment.DeleteCommunityCommentUseCase; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.usecase.comment.DeleteCommunityCommentUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/community/service/comment/UpdateCommunityCommentService.java b/src/main/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentService.java similarity index 79% rename from src/main/java/com/somemore/community/service/comment/UpdateCommunityCommentService.java rename to src/main/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentService.java index a613c9bc..adb3bcfa 100644 --- a/src/main/java/com/somemore/community/service/comment/UpdateCommunityCommentService.java +++ b/src/main/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentService.java @@ -1,10 +1,10 @@ -package com.somemore.community.service.comment; +package com.somemore.domains.community.service.comment; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.usecase.comment.UpdateCommunityCommentUseCase; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.usecase.comment.UpdateCommunityCommentUseCase; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/community/usecase/board/CommunityBoardDocumentUseCase.java b/src/main/java/com/somemore/domains/community/usecase/board/CommunityBoardDocumentUseCase.java similarity index 100% rename from src/main/java/com/somemore/community/usecase/board/CommunityBoardDocumentUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/board/CommunityBoardDocumentUseCase.java diff --git a/src/main/java/com/somemore/community/usecase/board/CommunityBoardQueryUseCase.java b/src/main/java/com/somemore/domains/community/usecase/board/CommunityBoardQueryUseCase.java similarity index 61% rename from src/main/java/com/somemore/community/usecase/board/CommunityBoardQueryUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/board/CommunityBoardQueryUseCase.java index fddedb30..0edbd8bd 100644 --- a/src/main/java/com/somemore/community/usecase/board/CommunityBoardQueryUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/board/CommunityBoardQueryUseCase.java @@ -1,8 +1,8 @@ -package com.somemore.community.usecase.board; +package com.somemore.domains.community.usecase.board; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; -import com.somemore.community.dto.response.CommunityBoardResponseDto; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.response.CommunityBoardDetailResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardResponseDto; import org.springframework.data.domain.Page; import java.util.List; diff --git a/src/main/java/com/somemore/community/usecase/board/CreateCommunityBoardUseCase.java b/src/main/java/com/somemore/domains/community/usecase/board/CreateCommunityBoardUseCase.java similarity index 60% rename from src/main/java/com/somemore/community/usecase/board/CreateCommunityBoardUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/board/CreateCommunityBoardUseCase.java index 6df8878d..c30fec82 100644 --- a/src/main/java/com/somemore/community/usecase/board/CreateCommunityBoardUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/board/CreateCommunityBoardUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.community.usecase.board; +package com.somemore.domains.community.usecase.board; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/usecase/board/DeleteCommunityBoardUseCase.java b/src/main/java/com/somemore/domains/community/usecase/board/DeleteCommunityBoardUseCase.java similarity index 70% rename from src/main/java/com/somemore/community/usecase/board/DeleteCommunityBoardUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/board/DeleteCommunityBoardUseCase.java index 345936db..9abd0c7e 100644 --- a/src/main/java/com/somemore/community/usecase/board/DeleteCommunityBoardUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/board/DeleteCommunityBoardUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.community.usecase.board; +package com.somemore.domains.community.usecase.board; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/usecase/board/UpdateCommunityBoardUseCase.java b/src/main/java/com/somemore/domains/community/usecase/board/UpdateCommunityBoardUseCase.java similarity index 64% rename from src/main/java/com/somemore/community/usecase/board/UpdateCommunityBoardUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/board/UpdateCommunityBoardUseCase.java index 4014f5fe..6fe0287c 100644 --- a/src/main/java/com/somemore/community/usecase/board/UpdateCommunityBoardUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/board/UpdateCommunityBoardUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.community.usecase.board; +package com.somemore.domains.community.usecase.board; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/usecase/comment/CommunityCommentQueryUseCase.java b/src/main/java/com/somemore/domains/community/usecase/comment/CommunityCommentQueryUseCase.java similarity index 58% rename from src/main/java/com/somemore/community/usecase/comment/CommunityCommentQueryUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/comment/CommunityCommentQueryUseCase.java index 4cd3eb94..75f0048c 100644 --- a/src/main/java/com/somemore/community/usecase/comment/CommunityCommentQueryUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/comment/CommunityCommentQueryUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.community.usecase.comment; +package com.somemore.domains.community.usecase.comment; -import com.somemore.community.dto.response.CommunityCommentResponseDto; +import com.somemore.domains.community.dto.response.CommunityCommentResponseDto; import org.springframework.data.domain.Page; public interface CommunityCommentQueryUseCase { diff --git a/src/main/java/com/somemore/community/usecase/comment/CreateCommunityCommentUseCase.java b/src/main/java/com/somemore/domains/community/usecase/comment/CreateCommunityCommentUseCase.java similarity index 62% rename from src/main/java/com/somemore/community/usecase/comment/CreateCommunityCommentUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/comment/CreateCommunityCommentUseCase.java index 5a2a5ed9..479db8c2 100644 --- a/src/main/java/com/somemore/community/usecase/comment/CreateCommunityCommentUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/comment/CreateCommunityCommentUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.community.usecase.comment; +package com.somemore.domains.community.usecase.comment; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/usecase/comment/DeleteCommunityCommentUseCase.java b/src/main/java/com/somemore/domains/community/usecase/comment/DeleteCommunityCommentUseCase.java similarity index 73% rename from src/main/java/com/somemore/community/usecase/comment/DeleteCommunityCommentUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/comment/DeleteCommunityCommentUseCase.java index 7226cf34..49e38ae1 100644 --- a/src/main/java/com/somemore/community/usecase/comment/DeleteCommunityCommentUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/comment/DeleteCommunityCommentUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.community.usecase.comment; +package com.somemore.domains.community.usecase.comment; import java.util.UUID; diff --git a/src/main/java/com/somemore/community/usecase/comment/UpdateCommunityCommentUseCase.java b/src/main/java/com/somemore/domains/community/usecase/comment/UpdateCommunityCommentUseCase.java similarity index 65% rename from src/main/java/com/somemore/community/usecase/comment/UpdateCommunityCommentUseCase.java rename to src/main/java/com/somemore/domains/community/usecase/comment/UpdateCommunityCommentUseCase.java index acc15bf4..5a879128 100644 --- a/src/main/java/com/somemore/community/usecase/comment/UpdateCommunityCommentUseCase.java +++ b/src/main/java/com/somemore/domains/community/usecase/comment/UpdateCommunityCommentUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.community.usecase.comment; +package com.somemore.domains.community.usecase.comment; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java b/src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiController.java similarity index 83% rename from src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java rename to src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiController.java index 5fd1ff6f..c72ff2d5 100644 --- a/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java +++ b/src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiController.java @@ -1,11 +1,11 @@ -package com.somemore.interestcenter.controller; +package com.somemore.domains.interestcenter.controller; +import com.somemore.domains.interestcenter.usecase.CancelInterestCenterUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import com.somemore.interestcenter.usecase.CancelInterestCenterUseCase; -import com.somemore.interestcenter.usecase.RegisterInterestCenterUseCase; +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.usecase.RegisterInterestCenterUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java b/src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiController.java similarity index 83% rename from src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java rename to src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiController.java index c58b7e39..95479ab6 100644 --- a/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java +++ b/src/main/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiController.java @@ -1,9 +1,9 @@ -package com.somemore.interestcenter.controller; +package com.somemore.domains.interestcenter.controller; +import com.somemore.domains.interestcenter.usecase.InterestCenterQueryUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; -import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; +import com.somemore.domains.interestcenter.dto.response.InterestCentersResponseDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import java.util.List; diff --git a/src/main/java/com/somemore/interestcenter/domain/InterestCenter.java b/src/main/java/com/somemore/domains/interestcenter/domain/InterestCenter.java similarity index 94% rename from src/main/java/com/somemore/interestcenter/domain/InterestCenter.java rename to src/main/java/com/somemore/domains/interestcenter/domain/InterestCenter.java index 0ebeddae..2ee2fc6d 100644 --- a/src/main/java/com/somemore/interestcenter/domain/InterestCenter.java +++ b/src/main/java/com/somemore/domains/interestcenter/domain/InterestCenter.java @@ -1,4 +1,4 @@ -package com.somemore.interestcenter.domain; +package com.somemore.domains.interestcenter.domain; import com.somemore.global.common.entity.BaseEntity; import jakarta.persistence.*; diff --git a/src/main/java/com/somemore/interestcenter/dto/request/RegisterInterestCenterRequestDto.java b/src/main/java/com/somemore/domains/interestcenter/dto/request/RegisterInterestCenterRequestDto.java similarity index 84% rename from src/main/java/com/somemore/interestcenter/dto/request/RegisterInterestCenterRequestDto.java rename to src/main/java/com/somemore/domains/interestcenter/dto/request/RegisterInterestCenterRequestDto.java index 4e17b29d..1cb6a9e0 100644 --- a/src/main/java/com/somemore/interestcenter/dto/request/RegisterInterestCenterRequestDto.java +++ b/src/main/java/com/somemore/domains/interestcenter/dto/request/RegisterInterestCenterRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.interestcenter.dto.request; +package com.somemore.domains.interestcenter.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.domain.InterestCenter; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/com/somemore/interestcenter/dto/response/InterestCentersResponseDto.java b/src/main/java/com/somemore/domains/interestcenter/dto/response/InterestCentersResponseDto.java similarity index 88% rename from src/main/java/com/somemore/interestcenter/dto/response/InterestCentersResponseDto.java rename to src/main/java/com/somemore/domains/interestcenter/dto/response/InterestCentersResponseDto.java index 0584550b..3eb79cd3 100644 --- a/src/main/java/com/somemore/interestcenter/dto/response/InterestCentersResponseDto.java +++ b/src/main/java/com/somemore/domains/interestcenter/dto/response/InterestCentersResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.interestcenter.dto.response; +package com.somemore.domains.interestcenter.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/interestcenter/dto/response/RegisterInterestCenterResponseDto.java b/src/main/java/com/somemore/domains/interestcenter/dto/response/RegisterInterestCenterResponseDto.java similarity index 89% rename from src/main/java/com/somemore/interestcenter/dto/response/RegisterInterestCenterResponseDto.java rename to src/main/java/com/somemore/domains/interestcenter/dto/response/RegisterInterestCenterResponseDto.java index 797c485c..e6b0ff57 100644 --- a/src/main/java/com/somemore/interestcenter/dto/response/RegisterInterestCenterResponseDto.java +++ b/src/main/java/com/somemore/domains/interestcenter/dto/response/RegisterInterestCenterResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.interestcenter.dto.response; +package com.somemore.domains.interestcenter.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.domain.InterestCenter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java b/src/main/java/com/somemore/domains/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java similarity index 89% rename from src/main/java/com/somemore/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java rename to src/main/java/com/somemore/domains/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java index 5c840594..ccfd840d 100644 --- a/src/main/java/com/somemore/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java +++ b/src/main/java/com/somemore/domains/interestcenter/event/converter/CreateRecruitBoardMessageConverter.java @@ -1,10 +1,10 @@ -package com.somemore.interestcenter.event.converter; +package com.somemore.domains.interestcenter.event.converter; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import com.somemore.global.common.event.DomainEventSubType; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/com/somemore/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java b/src/main/java/com/somemore/domains/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java similarity index 89% rename from src/main/java/com/somemore/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java rename to src/main/java/com/somemore/domains/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java index 11732d13..92b0e749 100644 --- a/src/main/java/com/somemore/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java +++ b/src/main/java/com/somemore/domains/interestcenter/event/domain/InterestCenterCreateRecruitBoardEvent.java @@ -1,10 +1,10 @@ -package com.somemore.interestcenter.event.domain; +package com.somemore.domains.interestcenter.event.domain; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.global.common.event.ServerEvent; import com.somemore.global.common.event.ServerEventType; -import com.somemore.notification.domain.NotificationSubType; import lombok.Getter; import lombok.experimental.SuperBuilder; diff --git a/src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandler.java b/src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandler.java new file mode 100644 index 00000000..13b18cdb --- /dev/null +++ b/src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandler.java @@ -0,0 +1,9 @@ +package com.somemore.domains.interestcenter.event.handler; + +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; + +public interface CreateRecruitBoardHandler { + + void handle(CreateRecruitBoardEvent event); + +} diff --git a/src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java b/src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java similarity index 81% rename from src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java rename to src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java index 41500aca..7f334705 100644 --- a/src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java +++ b/src/main/java/com/somemore/domains/interestcenter/event/handler/CreateRecruitBoardHandlerImpl.java @@ -1,11 +1,11 @@ -package com.somemore.interestcenter.event.handler; +package com.somemore.domains.interestcenter.event.handler; +import com.somemore.domains.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; +import com.somemore.domains.interestcenter.usecase.InterestCenterQueryUseCase; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; -import com.somemore.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; -import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java b/src/main/java/com/somemore/domains/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java similarity index 69% rename from src/main/java/com/somemore/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java rename to src/main/java/com/somemore/domains/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java index 639a150b..2ba12a34 100644 --- a/src/main/java/com/somemore/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java +++ b/src/main/java/com/somemore/domains/interestcenter/event/subscriber/RedisCreateRecruitBoardSubscriber.java @@ -1,8 +1,8 @@ -package com.somemore.interestcenter.event.subscriber; +package com.somemore.domains.interestcenter.event.subscriber; -import com.somemore.interestcenter.event.converter.CreateRecruitBoardMessageConverter; -import com.somemore.interestcenter.event.handler.CreateRecruitBoardHandler; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; +import com.somemore.domains.interestcenter.event.converter.CreateRecruitBoardMessageConverter; +import com.somemore.domains.interestcenter.event.handler.CreateRecruitBoardHandler; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import lombok.RequiredArgsConstructor; import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.MessageListener; diff --git a/src/main/java/com/somemore/interestcenter/repository/InterestCenterJpaRepository.java b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterJpaRepository.java similarity index 56% rename from src/main/java/com/somemore/interestcenter/repository/InterestCenterJpaRepository.java rename to src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterJpaRepository.java index 34b9a37e..f2b09df7 100644 --- a/src/main/java/com/somemore/interestcenter/repository/InterestCenterJpaRepository.java +++ b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.interestcenter.repository; +package com.somemore.domains.interestcenter.repository; -import com.somemore.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.domain.InterestCenter; import org.springframework.data.jpa.repository.JpaRepository; public interface InterestCenterJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/interestcenter/repository/InterestCenterRepository.java b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepository.java similarity index 74% rename from src/main/java/com/somemore/interestcenter/repository/InterestCenterRepository.java rename to src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepository.java index fba374e5..0eea7642 100644 --- a/src/main/java/com/somemore/interestcenter/repository/InterestCenterRepository.java +++ b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepository.java @@ -1,7 +1,7 @@ -package com.somemore.interestcenter.repository; +package com.somemore.domains.interestcenter.repository; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.domain.InterestCenter; import java.util.List; import java.util.Optional; diff --git a/src/main/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImpl.java b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImpl.java similarity index 93% rename from src/main/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImpl.java rename to src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImpl.java index 4c30542c..97e6d5bb 100644 --- a/src/main/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImpl.java @@ -1,14 +1,16 @@ -package com.somemore.interestcenter.repository; +package com.somemore.domains.interestcenter.repository; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.domain.QInterestCenter; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.domain.QInterestCenter; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.domain.InterestCenter; + import java.util.List; import java.util.Optional; import java.util.UUID; + import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/interestcenter/service/CancelInterestCenterService.java b/src/main/java/com/somemore/domains/interestcenter/service/CancelInterestCenterService.java similarity index 74% rename from src/main/java/com/somemore/interestcenter/service/CancelInterestCenterService.java rename to src/main/java/com/somemore/domains/interestcenter/service/CancelInterestCenterService.java index 711214b5..54ee4b0e 100644 --- a/src/main/java/com/somemore/interestcenter/service/CancelInterestCenterService.java +++ b/src/main/java/com/somemore/domains/interestcenter/service/CancelInterestCenterService.java @@ -1,10 +1,11 @@ -package com.somemore.interestcenter.service; +package com.somemore.domains.interestcenter.service; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.interestcenter.usecase.CancelInterestCenterUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.repository.InterestCenterRepository; -import com.somemore.interestcenter.usecase.CancelInterestCenterUseCase; +import com.somemore.domains.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; + import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/interestcenter/service/InterestCenterQueryService.java b/src/main/java/com/somemore/domains/interestcenter/service/InterestCenterQueryService.java similarity index 71% rename from src/main/java/com/somemore/interestcenter/service/InterestCenterQueryService.java rename to src/main/java/com/somemore/domains/interestcenter/service/InterestCenterQueryService.java index 0645a470..a3fe9f0d 100644 --- a/src/main/java/com/somemore/interestcenter/service/InterestCenterQueryService.java +++ b/src/main/java/com/somemore/domains/interestcenter/service/InterestCenterQueryService.java @@ -1,10 +1,10 @@ -package com.somemore.interestcenter.service; +package com.somemore.domains.interestcenter.service; -import com.somemore.center.repository.mapper.CenterOverviewInfo; -import com.somemore.center.usecase.query.CenterQueryUseCase; -import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; -import com.somemore.interestcenter.repository.InterestCenterRepository; -import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.interestcenter.usecase.InterestCenterQueryUseCase; +import com.somemore.domains.interestcenter.dto.response.InterestCentersResponseDto; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/interestcenter/service/RegisterInterestCenterService.java b/src/main/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterService.java similarity index 67% rename from src/main/java/com/somemore/interestcenter/service/RegisterInterestCenterService.java rename to src/main/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterService.java index 11244c59..db389f84 100644 --- a/src/main/java/com/somemore/interestcenter/service/RegisterInterestCenterService.java +++ b/src/main/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterService.java @@ -1,12 +1,12 @@ -package com.somemore.interestcenter.service; +package com.somemore.domains.interestcenter.service; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; import com.somemore.global.exception.DuplicateException; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import com.somemore.interestcenter.repository.InterestCenterRepository; -import com.somemore.interestcenter.usecase.RegisterInterestCenterUseCase; +import com.somemore.domains.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; +import com.somemore.domains.interestcenter.usecase.RegisterInterestCenterUseCase; import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/interestcenter/usecase/CancelInterestCenterUseCase.java b/src/main/java/com/somemore/domains/interestcenter/usecase/CancelInterestCenterUseCase.java similarity index 72% rename from src/main/java/com/somemore/interestcenter/usecase/CancelInterestCenterUseCase.java rename to src/main/java/com/somemore/domains/interestcenter/usecase/CancelInterestCenterUseCase.java index 0924cf7e..ad47f8db 100644 --- a/src/main/java/com/somemore/interestcenter/usecase/CancelInterestCenterUseCase.java +++ b/src/main/java/com/somemore/domains/interestcenter/usecase/CancelInterestCenterUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.interestcenter.usecase; +package com.somemore.domains.interestcenter.usecase; import java.util.UUID; diff --git a/src/main/java/com/somemore/interestcenter/usecase/InterestCenterQueryUseCase.java b/src/main/java/com/somemore/domains/interestcenter/usecase/InterestCenterQueryUseCase.java similarity index 62% rename from src/main/java/com/somemore/interestcenter/usecase/InterestCenterQueryUseCase.java rename to src/main/java/com/somemore/domains/interestcenter/usecase/InterestCenterQueryUseCase.java index 44bb3eb4..6f242b61 100644 --- a/src/main/java/com/somemore/interestcenter/usecase/InterestCenterQueryUseCase.java +++ b/src/main/java/com/somemore/domains/interestcenter/usecase/InterestCenterQueryUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.interestcenter.usecase; +package com.somemore.domains.interestcenter.usecase; -import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; +import com.somemore.domains.interestcenter.dto.response.InterestCentersResponseDto; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/domains/interestcenter/usecase/RegisterInterestCenterUseCase.java b/src/main/java/com/somemore/domains/interestcenter/usecase/RegisterInterestCenterUseCase.java new file mode 100644 index 00000000..e28b7bc4 --- /dev/null +++ b/src/main/java/com/somemore/domains/interestcenter/usecase/RegisterInterestCenterUseCase.java @@ -0,0 +1,9 @@ +package com.somemore.domains.interestcenter.usecase; + +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import java.util.UUID; + +public interface RegisterInterestCenterUseCase { + RegisterInterestCenterResponseDto registerInterestCenter(UUID volunteerId, RegisterInterestCenterRequestDto requestDto); +} diff --git a/src/main/java/com/somemore/location/domain/Location.java b/src/main/java/com/somemore/domains/location/domain/Location.java similarity index 92% rename from src/main/java/com/somemore/location/domain/Location.java rename to src/main/java/com/somemore/domains/location/domain/Location.java index 48c2890e..3ed0b862 100644 --- a/src/main/java/com/somemore/location/domain/Location.java +++ b/src/main/java/com/somemore/domains/location/domain/Location.java @@ -1,10 +1,10 @@ -package com.somemore.location.domain; +package com.somemore.domains.location.domain; import static jakarta.persistence.GenerationType.IDENTITY; import static lombok.AccessLevel.PROTECTED; +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; import com.somemore.global.common.entity.BaseEntity; -import com.somemore.location.dto.request.LocationUpdateRequestDto; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/src/main/java/com/somemore/location/dto/request/LocationCreateRequestDto.java b/src/main/java/com/somemore/domains/location/dto/request/LocationCreateRequestDto.java similarity index 94% rename from src/main/java/com/somemore/location/dto/request/LocationCreateRequestDto.java rename to src/main/java/com/somemore/domains/location/dto/request/LocationCreateRequestDto.java index 7344e1e4..cb6f2948 100644 --- a/src/main/java/com/somemore/location/dto/request/LocationCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/location/dto/request/LocationCreateRequestDto.java @@ -1,9 +1,9 @@ -package com.somemore.location.dto.request; +package com.somemore.domains.location.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.DecimalMax; import jakarta.validation.constraints.DecimalMin; diff --git a/src/main/java/com/somemore/location/dto/request/LocationUpdateRequestDto.java b/src/main/java/com/somemore/domains/location/dto/request/LocationUpdateRequestDto.java similarity index 96% rename from src/main/java/com/somemore/location/dto/request/LocationUpdateRequestDto.java rename to src/main/java/com/somemore/domains/location/dto/request/LocationUpdateRequestDto.java index 1fe898e0..9b23d758 100644 --- a/src/main/java/com/somemore/location/dto/request/LocationUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/location/dto/request/LocationUpdateRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.location.dto.request; +package com.somemore.domains.location.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/location/dto/response/LocationResponseDto.java b/src/main/java/com/somemore/domains/location/dto/response/LocationResponseDto.java similarity index 91% rename from src/main/java/com/somemore/location/dto/response/LocationResponseDto.java rename to src/main/java/com/somemore/domains/location/dto/response/LocationResponseDto.java index 204a15ff..8e0e416d 100644 --- a/src/main/java/com/somemore/location/dto/response/LocationResponseDto.java +++ b/src/main/java/com/somemore/domains/location/dto/response/LocationResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.location.dto.response; +package com.somemore.domains.location.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import lombok.Builder; diff --git a/src/main/java/com/somemore/location/repository/LocationJpaRepository.java b/src/main/java/com/somemore/domains/location/repository/LocationJpaRepository.java similarity index 58% rename from src/main/java/com/somemore/location/repository/LocationJpaRepository.java rename to src/main/java/com/somemore/domains/location/repository/LocationJpaRepository.java index 605d2273..9550be2c 100644 --- a/src/main/java/com/somemore/location/repository/LocationJpaRepository.java +++ b/src/main/java/com/somemore/domains/location/repository/LocationJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.location.repository; +package com.somemore.domains.location.repository; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import org.springframework.data.jpa.repository.JpaRepository; public interface LocationJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/location/repository/LocationRepository.java b/src/main/java/com/somemore/domains/location/repository/LocationRepository.java similarity index 68% rename from src/main/java/com/somemore/location/repository/LocationRepository.java rename to src/main/java/com/somemore/domains/location/repository/LocationRepository.java index b2a5681a..ebc20333 100644 --- a/src/main/java/com/somemore/location/repository/LocationRepository.java +++ b/src/main/java/com/somemore/domains/location/repository/LocationRepository.java @@ -1,6 +1,6 @@ -package com.somemore.location.repository; +package com.somemore.domains.location.repository; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import java.util.Optional; public interface LocationRepository { diff --git a/src/main/java/com/somemore/location/repository/LocationRepositoryImpl.java b/src/main/java/com/somemore/domains/location/repository/LocationRepositoryImpl.java similarity index 89% rename from src/main/java/com/somemore/location/repository/LocationRepositoryImpl.java rename to src/main/java/com/somemore/domains/location/repository/LocationRepositoryImpl.java index 06b7d940..ba97a849 100644 --- a/src/main/java/com/somemore/location/repository/LocationRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/location/repository/LocationRepositoryImpl.java @@ -1,7 +1,7 @@ -package com.somemore.location.repository; +package com.somemore.domains.location.repository; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import java.util.Optional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/location/service/command/CreateLocationService.java b/src/main/java/com/somemore/domains/location/service/command/CreateLocationService.java similarity index 62% rename from src/main/java/com/somemore/location/service/command/CreateLocationService.java rename to src/main/java/com/somemore/domains/location/service/command/CreateLocationService.java index 5b927ed8..2fe03308 100644 --- a/src/main/java/com/somemore/location/service/command/CreateLocationService.java +++ b/src/main/java/com/somemore/domains/location/service/command/CreateLocationService.java @@ -1,9 +1,9 @@ -package com.somemore.location.service.command; +package com.somemore.domains.location.service.command; -import com.somemore.location.domain.Location; -import com.somemore.location.dto.request.LocationCreateRequestDto; -import com.somemore.location.repository.LocationRepository; -import com.somemore.location.usecase.command.CreateLocationUseCase; +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.location.usecase.command.CreateLocationUseCase; +import com.somemore.domains.location.domain.Location; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/location/service/command/UpdateLocationService.java b/src/main/java/com/somemore/domains/location/service/command/UpdateLocationService.java similarity index 73% rename from src/main/java/com/somemore/location/service/command/UpdateLocationService.java rename to src/main/java/com/somemore/domains/location/service/command/UpdateLocationService.java index 4d757b98..dcb2e9ac 100644 --- a/src/main/java/com/somemore/location/service/command/UpdateLocationService.java +++ b/src/main/java/com/somemore/domains/location/service/command/UpdateLocationService.java @@ -1,12 +1,12 @@ -package com.somemore.location.service.command; +package com.somemore.domains.location.service.command; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_LOCATION; +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.location.usecase.command.UpdateLocationUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.domain.Location; -import com.somemore.location.dto.request.LocationUpdateRequestDto; -import com.somemore.location.repository.LocationRepository; -import com.somemore.location.usecase.command.UpdateLocationUseCase; +import com.somemore.domains.location.domain.Location; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/location/service/query/LocationQueryService.java b/src/main/java/com/somemore/domains/location/service/query/LocationQueryService.java similarity index 75% rename from src/main/java/com/somemore/location/service/query/LocationQueryService.java rename to src/main/java/com/somemore/domains/location/service/query/LocationQueryService.java index 31b6406e..cdbb5ec9 100644 --- a/src/main/java/com/somemore/location/service/query/LocationQueryService.java +++ b/src/main/java/com/somemore/domains/location/service/query/LocationQueryService.java @@ -1,11 +1,11 @@ -package com.somemore.location.service.query; +package com.somemore.domains.location.service.query; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_LOCATION; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.location.usecase.query.LocationQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.domain.Location; -import com.somemore.location.repository.LocationRepository; -import com.somemore.location.usecase.query.LocationQueryUseCase; +import com.somemore.domains.location.domain.Location; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/domains/location/usecase/command/CreateLocationUseCase.java b/src/main/java/com/somemore/domains/location/usecase/command/CreateLocationUseCase.java new file mode 100644 index 00000000..a27f2f7b --- /dev/null +++ b/src/main/java/com/somemore/domains/location/usecase/command/CreateLocationUseCase.java @@ -0,0 +1,9 @@ +package com.somemore.domains.location.usecase.command; + +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; + +public interface CreateLocationUseCase { + + Long createLocation(LocationCreateRequestDto requestDto); + +} diff --git a/src/main/java/com/somemore/domains/location/usecase/command/UpdateLocationUseCase.java b/src/main/java/com/somemore/domains/location/usecase/command/UpdateLocationUseCase.java new file mode 100644 index 00000000..07640734 --- /dev/null +++ b/src/main/java/com/somemore/domains/location/usecase/command/UpdateLocationUseCase.java @@ -0,0 +1,8 @@ +package com.somemore.domains.location.usecase.command; + +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; + +public interface UpdateLocationUseCase { + + void updateLocation(LocationUpdateRequestDto requestDto, Long locationId); +} diff --git a/src/main/java/com/somemore/domains/location/usecase/query/LocationQueryUseCase.java b/src/main/java/com/somemore/domains/location/usecase/query/LocationQueryUseCase.java new file mode 100644 index 00000000..c080487f --- /dev/null +++ b/src/main/java/com/somemore/domains/location/usecase/query/LocationQueryUseCase.java @@ -0,0 +1,9 @@ +package com.somemore.domains.location.usecase.query; + +import com.somemore.domains.location.domain.Location; + +public interface LocationQueryUseCase { + + Location getById(Long id); + +} diff --git a/src/main/java/com/somemore/location/utils/GeoUtils.java b/src/main/java/com/somemore/domains/location/utils/GeoUtils.java similarity index 95% rename from src/main/java/com/somemore/location/utils/GeoUtils.java rename to src/main/java/com/somemore/domains/location/utils/GeoUtils.java index 43fcaddc..eb93b54d 100644 --- a/src/main/java/com/somemore/location/utils/GeoUtils.java +++ b/src/main/java/com/somemore/domains/location/utils/GeoUtils.java @@ -1,4 +1,4 @@ -package com.somemore.location.utils; +package com.somemore.domains.location.utils; import static lombok.AccessLevel.PRIVATE; diff --git a/src/main/java/com/somemore/note/controller/NoteCommandApiController.java b/src/main/java/com/somemore/domains/note/controller/NoteCommandApiController.java similarity index 85% rename from src/main/java/com/somemore/note/controller/NoteCommandApiController.java rename to src/main/java/com/somemore/domains/note/controller/NoteCommandApiController.java index 39d4c579..a7af6a56 100644 --- a/src/main/java/com/somemore/note/controller/NoteCommandApiController.java +++ b/src/main/java/com/somemore/domains/note/controller/NoteCommandApiController.java @@ -1,11 +1,11 @@ -package com.somemore.note.controller; +package com.somemore.domains.note.controller; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.note.dto.SendNoteToCenterRequestDto; -import com.somemore.note.dto.SendNoteToVolunteerRequestDto; -import com.somemore.note.usecase.SendNoteToCenterUseCase; -import com.somemore.note.usecase.SendNoteToVolunteerUseCase; +import com.somemore.domains.note.dto.SendNoteToCenterRequestDto; +import com.somemore.domains.note.dto.SendNoteToVolunteerRequestDto; +import com.somemore.domains.note.usecase.SendNoteToCenterUseCase; +import com.somemore.domains.note.usecase.SendNoteToVolunteerUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/note/controller/NoteQueryApiController.java b/src/main/java/com/somemore/domains/note/controller/NoteQueryApiController.java similarity index 85% rename from src/main/java/com/somemore/note/controller/NoteQueryApiController.java rename to src/main/java/com/somemore/domains/note/controller/NoteQueryApiController.java index 04c055d0..04435b7d 100644 --- a/src/main/java/com/somemore/note/controller/NoteQueryApiController.java +++ b/src/main/java/com/somemore/domains/note/controller/NoteQueryApiController.java @@ -1,12 +1,12 @@ -package com.somemore.note.controller; +package com.somemore.domains.note.controller; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.note.usecase.NoteQueryUseCase; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.usecase.NoteQueryUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/note/domain/Note.java b/src/main/java/com/somemore/domains/note/domain/Note.java similarity index 97% rename from src/main/java/com/somemore/note/domain/Note.java rename to src/main/java/com/somemore/domains/note/domain/Note.java index d92d562c..19c1b108 100644 --- a/src/main/java/com/somemore/note/domain/Note.java +++ b/src/main/java/com/somemore/domains/note/domain/Note.java @@ -1,4 +1,4 @@ -package com.somemore.note.domain; +package com.somemore.domains.note.domain; import com.somemore.global.common.entity.BaseEntity; import jakarta.persistence.*; diff --git a/src/main/java/com/somemore/note/dto/SendNoteToCenterRequestDto.java b/src/main/java/com/somemore/domains/note/dto/SendNoteToCenterRequestDto.java similarity index 92% rename from src/main/java/com/somemore/note/dto/SendNoteToCenterRequestDto.java rename to src/main/java/com/somemore/domains/note/dto/SendNoteToCenterRequestDto.java index 4ed661b9..0145cb27 100644 --- a/src/main/java/com/somemore/note/dto/SendNoteToCenterRequestDto.java +++ b/src/main/java/com/somemore/domains/note/dto/SendNoteToCenterRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.note.dto; +package com.somemore.domains.note.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.note.domain.Note; +import com.somemore.domains.note.domain.Note; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/com/somemore/note/dto/SendNoteToVolunteerRequestDto.java b/src/main/java/com/somemore/domains/note/dto/SendNoteToVolunteerRequestDto.java similarity index 92% rename from src/main/java/com/somemore/note/dto/SendNoteToVolunteerRequestDto.java rename to src/main/java/com/somemore/domains/note/dto/SendNoteToVolunteerRequestDto.java index 30448e14..3876b5e9 100644 --- a/src/main/java/com/somemore/note/dto/SendNoteToVolunteerRequestDto.java +++ b/src/main/java/com/somemore/domains/note/dto/SendNoteToVolunteerRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.note.dto; +package com.somemore.domains.note.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.note.domain.Note; +import com.somemore.domains.note.domain.Note; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/com/somemore/note/repository/NoteJpaRepository.java b/src/main/java/com/somemore/domains/note/repository/NoteJpaRepository.java similarity index 68% rename from src/main/java/com/somemore/note/repository/NoteJpaRepository.java rename to src/main/java/com/somemore/domains/note/repository/NoteJpaRepository.java index a82c2db7..64f5513b 100644 --- a/src/main/java/com/somemore/note/repository/NoteJpaRepository.java +++ b/src/main/java/com/somemore/domains/note/repository/NoteJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.note.repository; +package com.somemore.domains.note.repository; -import com.somemore.note.domain.Note; +import com.somemore.domains.note.domain.Note; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/note/repository/NoteRepository.java b/src/main/java/com/somemore/domains/note/repository/NoteRepository.java similarity index 61% rename from src/main/java/com/somemore/note/repository/NoteRepository.java rename to src/main/java/com/somemore/domains/note/repository/NoteRepository.java index 67d76fa6..63f27565 100644 --- a/src/main/java/com/somemore/note/repository/NoteRepository.java +++ b/src/main/java/com/somemore/domains/note/repository/NoteRepository.java @@ -1,10 +1,10 @@ -package com.somemore.note.repository; +package com.somemore.domains.note.repository; -import com.somemore.note.domain.Note; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/note/repository/NoteRepositoryImpl.java b/src/main/java/com/somemore/domains/note/repository/NoteRepositoryImpl.java similarity index 91% rename from src/main/java/com/somemore/note/repository/NoteRepositoryImpl.java rename to src/main/java/com/somemore/domains/note/repository/NoteRepositoryImpl.java index d224168b..e6653012 100644 --- a/src/main/java/com/somemore/note/repository/NoteRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/note/repository/NoteRepositoryImpl.java @@ -1,17 +1,17 @@ -package com.somemore.note.repository; +package com.somemore.domains.note.repository; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.center.domain.QCenter; -import com.somemore.note.domain.Note; -import com.somemore.note.domain.QNote; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.volunteer.domain.QVolunteer; +import com.somemore.domains.center.domain.QCenter; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.domain.QNote; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.volunteer.domain.QVolunteer; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForCenter.java b/src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForCenter.java similarity index 89% rename from src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForCenter.java rename to src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForCenter.java index d042cf8d..c3551021 100644 --- a/src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForCenter.java +++ b/src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForCenter.java @@ -1,4 +1,4 @@ -package com.somemore.note.repository.mapper; +package com.somemore.domains.note.repository.mapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForVolunteer.java b/src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForVolunteer.java similarity index 90% rename from src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForVolunteer.java rename to src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForVolunteer.java index 676a35bd..746bcf94 100644 --- a/src/main/java/com/somemore/note/repository/mapper/NoteDetailViewForVolunteer.java +++ b/src/main/java/com/somemore/domains/note/repository/mapper/NoteDetailViewForVolunteer.java @@ -1,4 +1,4 @@ -package com.somemore.note.repository.mapper; +package com.somemore.domains.note.repository.mapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForCenter.java b/src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForCenter.java similarity index 94% rename from src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForCenter.java rename to src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForCenter.java index c7cd0271..45d970fd 100644 --- a/src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForCenter.java +++ b/src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForCenter.java @@ -1,4 +1,4 @@ -package com.somemore.note.repository.mapper; +package com.somemore.domains.note.repository.mapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForVolunteer.java b/src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForVolunteer.java similarity index 94% rename from src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForVolunteer.java rename to src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForVolunteer.java index 4fc1bb81..992190e9 100644 --- a/src/main/java/com/somemore/note/repository/mapper/NoteReceiverViewForVolunteer.java +++ b/src/main/java/com/somemore/domains/note/repository/mapper/NoteReceiverViewForVolunteer.java @@ -1,4 +1,4 @@ -package com.somemore.note.repository.mapper; +package com.somemore.domains.note.repository.mapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/note/service/NoteMarkAsReadService.java b/src/main/java/com/somemore/domains/note/service/NoteMarkAsReadService.java similarity index 79% rename from src/main/java/com/somemore/note/service/NoteMarkAsReadService.java rename to src/main/java/com/somemore/domains/note/service/NoteMarkAsReadService.java index 41154e03..885c7e89 100644 --- a/src/main/java/com/somemore/note/service/NoteMarkAsReadService.java +++ b/src/main/java/com/somemore/domains/note/service/NoteMarkAsReadService.java @@ -1,9 +1,9 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; +import com.somemore.domains.note.repository.NoteRepository; +import com.somemore.domains.note.usecase.NoteMarkAsReadUseCase; import com.somemore.global.exception.NoSuchElementException; -import com.somemore.note.domain.Note; -import com.somemore.note.repository.NoteRepository; -import com.somemore.note.usecase.NoteMarkAsReadUseCase; +import com.somemore.domains.note.domain.Note; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/note/service/NoteQueryService.java b/src/main/java/com/somemore/domains/note/service/NoteQueryService.java similarity index 76% rename from src/main/java/com/somemore/note/service/NoteQueryService.java rename to src/main/java/com/somemore/domains/note/service/NoteQueryService.java index 3604e7c3..5a0f47f3 100644 --- a/src/main/java/com/somemore/note/service/NoteQueryService.java +++ b/src/main/java/com/somemore/domains/note/service/NoteQueryService.java @@ -1,13 +1,13 @@ -package com.somemore.note.service; - +package com.somemore.domains.note.service; + +import com.somemore.domains.note.repository.NoteRepository; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.usecase.NoteMarkAsReadUseCase; +import com.somemore.domains.note.usecase.NoteQueryUseCase; import com.somemore.global.exception.NoSuchElementException; -import com.somemore.note.repository.NoteRepository; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.note.usecase.NoteMarkAsReadUseCase; -import com.somemore.note.usecase.NoteQueryUseCase; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/note/service/SendNoteToCenterService.java b/src/main/java/com/somemore/domains/note/service/SendNoteToCenterService.java similarity index 67% rename from src/main/java/com/somemore/note/service/SendNoteToCenterService.java rename to src/main/java/com/somemore/domains/note/service/SendNoteToCenterService.java index 62297aae..2cef38f6 100644 --- a/src/main/java/com/somemore/note/service/SendNoteToCenterService.java +++ b/src/main/java/com/somemore/domains/note/service/SendNoteToCenterService.java @@ -1,10 +1,10 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; -import com.somemore.center.usecase.query.CenterQueryUseCase; -import com.somemore.note.domain.Note; -import com.somemore.note.dto.SendNoteToCenterRequestDto; -import com.somemore.note.repository.NoteRepository; -import com.somemore.note.usecase.SendNoteToCenterUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.note.repository.NoteRepository; +import com.somemore.domains.note.usecase.SendNoteToCenterUseCase; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.dto.SendNoteToCenterRequestDto; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/note/service/SendNoteToVolunteerService.java b/src/main/java/com/somemore/domains/note/service/SendNoteToVolunteerService.java similarity index 66% rename from src/main/java/com/somemore/note/service/SendNoteToVolunteerService.java rename to src/main/java/com/somemore/domains/note/service/SendNoteToVolunteerService.java index 34365069..9295c75c 100644 --- a/src/main/java/com/somemore/note/service/SendNoteToVolunteerService.java +++ b/src/main/java/com/somemore/domains/note/service/SendNoteToVolunteerService.java @@ -1,10 +1,10 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; -import com.somemore.note.domain.Note; -import com.somemore.note.dto.SendNoteToVolunteerRequestDto; -import com.somemore.note.repository.NoteRepository; -import com.somemore.note.usecase.SendNoteToVolunteerUseCase; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; +import com.somemore.domains.note.repository.NoteRepository; +import com.somemore.domains.note.usecase.SendNoteToVolunteerUseCase; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.dto.SendNoteToVolunteerRequestDto; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/note/usecase/NoteMarkAsReadUseCase.java b/src/main/java/com/somemore/domains/note/usecase/NoteMarkAsReadUseCase.java similarity index 65% rename from src/main/java/com/somemore/note/usecase/NoteMarkAsReadUseCase.java rename to src/main/java/com/somemore/domains/note/usecase/NoteMarkAsReadUseCase.java index c49e4866..31ba609b 100644 --- a/src/main/java/com/somemore/note/usecase/NoteMarkAsReadUseCase.java +++ b/src/main/java/com/somemore/domains/note/usecase/NoteMarkAsReadUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.note.usecase; +package com.somemore.domains.note.usecase; public interface NoteMarkAsReadUseCase { void noteMarkAsRead(Long noteId); diff --git a/src/main/java/com/somemore/note/usecase/NoteQueryUseCase.java b/src/main/java/com/somemore/domains/note/usecase/NoteQueryUseCase.java similarity index 57% rename from src/main/java/com/somemore/note/usecase/NoteQueryUseCase.java rename to src/main/java/com/somemore/domains/note/usecase/NoteQueryUseCase.java index 63e3e563..fe0e7d52 100644 --- a/src/main/java/com/somemore/note/usecase/NoteQueryUseCase.java +++ b/src/main/java/com/somemore/domains/note/usecase/NoteQueryUseCase.java @@ -1,9 +1,9 @@ -package com.somemore.note.usecase; +package com.somemore.domains.note.usecase; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/note/usecase/SendNoteToCenterUseCase.java b/src/main/java/com/somemore/domains/note/usecase/SendNoteToCenterUseCase.java similarity index 58% rename from src/main/java/com/somemore/note/usecase/SendNoteToCenterUseCase.java rename to src/main/java/com/somemore/domains/note/usecase/SendNoteToCenterUseCase.java index 6e8cb9a8..0bc43764 100644 --- a/src/main/java/com/somemore/note/usecase/SendNoteToCenterUseCase.java +++ b/src/main/java/com/somemore/domains/note/usecase/SendNoteToCenterUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.note.usecase; +package com.somemore.domains.note.usecase; -import com.somemore.note.dto.SendNoteToCenterRequestDto; +import com.somemore.domains.note.dto.SendNoteToCenterRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/note/usecase/SendNoteToVolunteerUseCase.java b/src/main/java/com/somemore/domains/note/usecase/SendNoteToVolunteerUseCase.java similarity index 59% rename from src/main/java/com/somemore/note/usecase/SendNoteToVolunteerUseCase.java rename to src/main/java/com/somemore/domains/note/usecase/SendNoteToVolunteerUseCase.java index 021caaf9..8f8ee8ea 100644 --- a/src/main/java/com/somemore/note/usecase/SendNoteToVolunteerUseCase.java +++ b/src/main/java/com/somemore/domains/note/usecase/SendNoteToVolunteerUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.note.usecase; +package com.somemore.domains.note.usecase; -import com.somemore.note.dto.SendNoteToVolunteerRequestDto; +import com.somemore.domains.note.dto.SendNoteToVolunteerRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/notification/controller/NotificationCommandController.java b/src/main/java/com/somemore/domains/notification/controller/NotificationCommandController.java similarity index 90% rename from src/main/java/com/somemore/notification/controller/NotificationCommandController.java rename to src/main/java/com/somemore/domains/notification/controller/NotificationCommandController.java index 3d90b55b..6bcad999 100644 --- a/src/main/java/com/somemore/notification/controller/NotificationCommandController.java +++ b/src/main/java/com/somemore/domains/notification/controller/NotificationCommandController.java @@ -1,9 +1,9 @@ -package com.somemore.notification.controller; +package com.somemore.domains.notification.controller; +import com.somemore.domains.notification.usecase.NotificationCommandUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.notification.dto.NotificationIdsRequestDto; -import com.somemore.notification.usecase.NotificationCommandUseCase; +import com.somemore.domains.notification.dto.NotificationIdsRequestDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/notification/controller/NotificationQueryController.java b/src/main/java/com/somemore/domains/notification/controller/NotificationQueryController.java similarity index 89% rename from src/main/java/com/somemore/notification/controller/NotificationQueryController.java rename to src/main/java/com/somemore/domains/notification/controller/NotificationQueryController.java index 70c935fe..2b7439b1 100644 --- a/src/main/java/com/somemore/notification/controller/NotificationQueryController.java +++ b/src/main/java/com/somemore/domains/notification/controller/NotificationQueryController.java @@ -1,9 +1,9 @@ -package com.somemore.notification.controller; +package com.somemore.domains.notification.controller; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.notification.dto.NotificationResponseDto; -import com.somemore.notification.usecase.NotificationQueryUseCase; +import com.somemore.domains.notification.dto.NotificationResponseDto; +import com.somemore.domains.notification.usecase.NotificationQueryUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/notification/domain/Notification.java b/src/main/java/com/somemore/domains/notification/domain/Notification.java similarity index 96% rename from src/main/java/com/somemore/notification/domain/Notification.java rename to src/main/java/com/somemore/domains/notification/domain/Notification.java index 3875a891..59f3f672 100644 --- a/src/main/java/com/somemore/notification/domain/Notification.java +++ b/src/main/java/com/somemore/domains/notification/domain/Notification.java @@ -1,4 +1,4 @@ -package com.somemore.notification.domain; +package com.somemore.domains.notification.domain; import jakarta.persistence.*; import lombok.AccessLevel; diff --git a/src/main/java/com/somemore/notification/domain/NotificationSubType.java b/src/main/java/com/somemore/domains/notification/domain/NotificationSubType.java similarity index 94% rename from src/main/java/com/somemore/notification/domain/NotificationSubType.java rename to src/main/java/com/somemore/domains/notification/domain/NotificationSubType.java index 78ed0451..533df02c 100644 --- a/src/main/java/com/somemore/notification/domain/NotificationSubType.java +++ b/src/main/java/com/somemore/domains/notification/domain/NotificationSubType.java @@ -1,4 +1,4 @@ -package com.somemore.notification.domain; +package com.somemore.domains.notification.domain; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/notification/dto/NotificationIdsRequestDto.java b/src/main/java/com/somemore/domains/notification/dto/NotificationIdsRequestDto.java similarity index 91% rename from src/main/java/com/somemore/notification/dto/NotificationIdsRequestDto.java rename to src/main/java/com/somemore/domains/notification/dto/NotificationIdsRequestDto.java index 7775068b..4ae176fc 100644 --- a/src/main/java/com/somemore/notification/dto/NotificationIdsRequestDto.java +++ b/src/main/java/com/somemore/domains/notification/dto/NotificationIdsRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.notification.dto; +package com.somemore.domains.notification.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/notification/dto/NotificationResponseDto.java b/src/main/java/com/somemore/domains/notification/dto/NotificationResponseDto.java similarity index 87% rename from src/main/java/com/somemore/notification/dto/NotificationResponseDto.java rename to src/main/java/com/somemore/domains/notification/dto/NotificationResponseDto.java index 3a15848a..5a309abf 100644 --- a/src/main/java/com/somemore/notification/dto/NotificationResponseDto.java +++ b/src/main/java/com/somemore/domains/notification/dto/NotificationResponseDto.java @@ -1,9 +1,9 @@ -package com.somemore.notification.dto; +package com.somemore.domains.notification.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; diff --git a/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java b/src/main/java/com/somemore/domains/notification/event/converter/NotificationMessageConverter.java similarity index 89% rename from src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java rename to src/main/java/com/somemore/domains/notification/event/converter/NotificationMessageConverter.java index 722ee5f3..8c4f0f3f 100644 --- a/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java +++ b/src/main/java/com/somemore/domains/notification/event/converter/NotificationMessageConverter.java @@ -1,16 +1,16 @@ -package com.somemore.notification.event.converter; +package com.somemore.domains.notification.event.converter; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.community.event.CommentAddedEvent; -import com.somemore.volunteerapply.event.VolunteerReviewRequestEvent; -import com.somemore.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.event.VolunteerApplyEvent; -import com.somemore.volunteerapply.event.VolunteerApplyStatusChangeEvent; +import com.somemore.domains.community.event.CommentAddedEvent; +import com.somemore.domains.volunteerapply.event.VolunteerReviewRequestEvent; +import com.somemore.domains.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.event.VolunteerApplyEvent; +import com.somemore.domains.volunteerapply.event.VolunteerApplyStatusChangeEvent; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/com/somemore/domains/notification/event/handler/NotificationHandler.java b/src/main/java/com/somemore/domains/notification/event/handler/NotificationHandler.java new file mode 100644 index 00000000..491ae08b --- /dev/null +++ b/src/main/java/com/somemore/domains/notification/event/handler/NotificationHandler.java @@ -0,0 +1,8 @@ +package com.somemore.domains.notification.event.handler; + +import com.somemore.domains.notification.domain.Notification; + +public interface NotificationHandler { + + void handle(Notification notification); +} diff --git a/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java b/src/main/java/com/somemore/domains/notification/event/handler/NotificationHandlerImpl.java similarity index 80% rename from src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java rename to src/main/java/com/somemore/domains/notification/event/handler/NotificationHandlerImpl.java index 47121b73..56b03695 100644 --- a/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java +++ b/src/main/java/com/somemore/domains/notification/event/handler/NotificationHandlerImpl.java @@ -1,8 +1,8 @@ -package com.somemore.notification.event.handler; +package com.somemore.domains.notification.event.handler; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.dto.NotificationResponseDto; -import com.somemore.notification.repository.NotificationRepository; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.dto.NotificationResponseDto; +import com.somemore.domains.notification.repository.NotificationRepository; import com.somemore.global.sse.domain.SseEvent; import com.somemore.global.sse.domain.SseEventType; import com.somemore.global.sse.usecase.SseUseCase; diff --git a/src/main/java/com/somemore/notification/event/subscriber/RedisNotificationSubscriber.java b/src/main/java/com/somemore/domains/notification/event/subscriber/RedisNotificationSubscriber.java similarity index 70% rename from src/main/java/com/somemore/notification/event/subscriber/RedisNotificationSubscriber.java rename to src/main/java/com/somemore/domains/notification/event/subscriber/RedisNotificationSubscriber.java index a7a6cc52..c11621cc 100644 --- a/src/main/java/com/somemore/notification/event/subscriber/RedisNotificationSubscriber.java +++ b/src/main/java/com/somemore/domains/notification/event/subscriber/RedisNotificationSubscriber.java @@ -1,8 +1,8 @@ -package com.somemore.notification.event.subscriber; +package com.somemore.domains.notification.event.subscriber; -import com.somemore.notification.event.converter.NotificationMessageConverter; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.event.handler.NotificationHandler; +import com.somemore.domains.notification.event.converter.NotificationMessageConverter; +import com.somemore.domains.notification.event.handler.NotificationHandler; +import com.somemore.domains.notification.domain.Notification; import lombok.RequiredArgsConstructor; import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.MessageListener; diff --git a/src/main/java/com/somemore/notification/repository/NotificationJpaRepository.java b/src/main/java/com/somemore/domains/notification/repository/NotificationJpaRepository.java similarity index 56% rename from src/main/java/com/somemore/notification/repository/NotificationJpaRepository.java rename to src/main/java/com/somemore/domains/notification/repository/NotificationJpaRepository.java index 7e6213b3..6f2ad39e 100644 --- a/src/main/java/com/somemore/notification/repository/NotificationJpaRepository.java +++ b/src/main/java/com/somemore/domains/notification/repository/NotificationJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.notification.repository; +package com.somemore.domains.notification.repository; -import com.somemore.notification.domain.Notification; +import com.somemore.domains.notification.domain.Notification; import org.springframework.data.jpa.repository.JpaRepository; public interface NotificationJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/notification/repository/NotificationRepository.java b/src/main/java/com/somemore/domains/notification/repository/NotificationRepository.java similarity index 80% rename from src/main/java/com/somemore/notification/repository/NotificationRepository.java rename to src/main/java/com/somemore/domains/notification/repository/NotificationRepository.java index f1cb034b..81c1b5ae 100644 --- a/src/main/java/com/somemore/notification/repository/NotificationRepository.java +++ b/src/main/java/com/somemore/domains/notification/repository/NotificationRepository.java @@ -1,6 +1,6 @@ -package com.somemore.notification.repository; +package com.somemore.domains.notification.repository; -import com.somemore.notification.domain.Notification; +import com.somemore.domains.notification.domain.Notification; import org.springframework.stereotype.Repository; import java.util.List; diff --git a/src/main/java/com/somemore/notification/repository/NotificationRepositoryImpl.java b/src/main/java/com/somemore/domains/notification/repository/NotificationRepositoryImpl.java similarity index 91% rename from src/main/java/com/somemore/notification/repository/NotificationRepositoryImpl.java rename to src/main/java/com/somemore/domains/notification/repository/NotificationRepositoryImpl.java index 6a6bb065..b81645e8 100644 --- a/src/main/java/com/somemore/notification/repository/NotificationRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/notification/repository/NotificationRepositoryImpl.java @@ -1,9 +1,9 @@ -package com.somemore.notification.repository; +package com.somemore.domains.notification.repository; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.QNotification; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.QNotification; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/notification/service/NotificationCommandService.java b/src/main/java/com/somemore/domains/notification/service/NotificationCommandService.java similarity index 83% rename from src/main/java/com/somemore/notification/service/NotificationCommandService.java rename to src/main/java/com/somemore/domains/notification/service/NotificationCommandService.java index aaa57667..68f254aa 100644 --- a/src/main/java/com/somemore/notification/service/NotificationCommandService.java +++ b/src/main/java/com/somemore/domains/notification/service/NotificationCommandService.java @@ -1,10 +1,10 @@ -package com.somemore.notification.service; +package com.somemore.domains.notification.service; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.dto.NotificationIdsRequestDto; +import com.somemore.domains.notification.repository.NotificationRepository; +import com.somemore.domains.notification.usecase.NotificationCommandUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.dto.NotificationIdsRequestDto; -import com.somemore.notification.repository.NotificationRepository; -import com.somemore.notification.usecase.NotificationCommandUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/notification/service/NotificationQueryService.java b/src/main/java/com/somemore/domains/notification/service/NotificationQueryService.java similarity index 77% rename from src/main/java/com/somemore/notification/service/NotificationQueryService.java rename to src/main/java/com/somemore/domains/notification/service/NotificationQueryService.java index 4e96a3be..51555d21 100644 --- a/src/main/java/com/somemore/notification/service/NotificationQueryService.java +++ b/src/main/java/com/somemore/domains/notification/service/NotificationQueryService.java @@ -1,9 +1,9 @@ -package com.somemore.notification.service; +package com.somemore.domains.notification.service; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.dto.NotificationResponseDto; -import com.somemore.notification.repository.NotificationRepository; -import com.somemore.notification.usecase.NotificationQueryUseCase; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.dto.NotificationResponseDto; +import com.somemore.domains.notification.repository.NotificationRepository; +import com.somemore.domains.notification.usecase.NotificationQueryUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/notification/usecase/NotificationCommandUseCase.java b/src/main/java/com/somemore/domains/notification/usecase/NotificationCommandUseCase.java similarity index 66% rename from src/main/java/com/somemore/notification/usecase/NotificationCommandUseCase.java rename to src/main/java/com/somemore/domains/notification/usecase/NotificationCommandUseCase.java index ac48df77..fba6dd54 100644 --- a/src/main/java/com/somemore/notification/usecase/NotificationCommandUseCase.java +++ b/src/main/java/com/somemore/domains/notification/usecase/NotificationCommandUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.notification.usecase; +package com.somemore.domains.notification.usecase; -import com.somemore.notification.dto.NotificationIdsRequestDto; +import com.somemore.domains.notification.dto.NotificationIdsRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/notification/usecase/NotificationQueryUseCase.java b/src/main/java/com/somemore/domains/notification/usecase/NotificationQueryUseCase.java similarity index 66% rename from src/main/java/com/somemore/notification/usecase/NotificationQueryUseCase.java rename to src/main/java/com/somemore/domains/notification/usecase/NotificationQueryUseCase.java index 856e773b..f6ee649b 100644 --- a/src/main/java/com/somemore/notification/usecase/NotificationQueryUseCase.java +++ b/src/main/java/com/somemore/domains/notification/usecase/NotificationQueryUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.notification.usecase; +package com.somemore.domains.notification.usecase; -import com.somemore.notification.dto.NotificationResponseDto; +import com.somemore.domains.notification.dto.NotificationResponseDto; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java b/src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiController.java similarity index 88% rename from src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java rename to src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiController.java index 2d2f2ef4..b4ed2d62 100644 --- a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java +++ b/src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiController.java @@ -1,19 +1,19 @@ -package com.somemore.recruitboard.controller; +package com.somemore.domains.recruitboard.controller; import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; +import com.somemore.domains.recruitboard.usecase.command.CreateRecruitBoardUseCase; +import com.somemore.domains.recruitboard.usecase.command.DeleteRecruitBoardUseCase; +import com.somemore.domains.recruitboard.usecase.command.UpdateRecruitBoardUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.imageupload.dto.ImageUploadRequestDto; import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; -import com.somemore.recruitboard.usecase.command.CreateRecruitBoardUseCase; -import com.somemore.recruitboard.usecase.command.DeleteRecruitBoardUseCase; -import com.somemore.recruitboard.usecase.command.UpdateRecruitBoardUseCase; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardCreateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiController.java b/src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiController.java similarity index 88% rename from src/main/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiController.java rename to src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiController.java index 5465f066..4f9567fb 100644 --- a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiController.java +++ b/src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiController.java @@ -1,17 +1,17 @@ -package com.somemore.recruitboard.controller; +package com.somemore.domains.recruitboard.controller; import static org.springframework.data.domain.Sort.Direction.DESC; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; import com.somemore.global.common.response.ApiResponse; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardDetailResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiController.java b/src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardSearchApiController.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiController.java rename to src/main/java/com/somemore/domains/recruitboard/controller/RecruitBoardSearchApiController.java diff --git a/src/main/java/com/somemore/recruitboard/domain/RecruitBoard.java b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitBoard.java similarity index 89% rename from src/main/java/com/somemore/recruitboard/domain/RecruitBoard.java rename to src/main/java/com/somemore/domains/recruitboard/domain/RecruitBoard.java index ea88f3c1..5f7eb312 100644 --- a/src/main/java/com/somemore/recruitboard/domain/RecruitBoard.java +++ b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitBoard.java @@ -1,13 +1,11 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; -import static com.somemore.recruitboard.domain.RecruitStatus.COMPLETED; -import static com.somemore.recruitboard.domain.RecruitStatus.RECRUITING; import static jakarta.persistence.EnumType.STRING; import static jakarta.persistence.GenerationType.IDENTITY; import static lombok.AccessLevel.PROTECTED; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; import com.somemore.global.common.entity.BaseEntity; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; import jakarta.persistence.Column; import jakarta.persistence.Embedded; import jakarta.persistence.Entity; @@ -51,7 +49,7 @@ public class RecruitBoard extends BaseEntity { @Enumerated(value = STRING) @Column(name = "recruit_status", nullable = false, length = 20) - private RecruitStatus recruitStatus = RECRUITING; + private RecruitStatus recruitStatus = RecruitStatus.RECRUITING; @Column(name = "img_url", nullable = false) private String imgUrl; @@ -94,7 +92,7 @@ public void changeRecruitStatus(RecruitStatus newStatus, LocalDateTime currentDa } public boolean isRecruitOpen() { - return this.recruitStatus == RECRUITING; + return this.recruitStatus == RecruitStatus.RECRUITING; } private void updateRecruitmentInfo(RecruitBoardUpdateRequestDto dto) { @@ -109,7 +107,7 @@ private void updateRecruitmentInfo(RecruitBoardUpdateRequestDto dto) { } public boolean isCompleted() { - return this.recruitStatus == COMPLETED; + return this.recruitStatus == RecruitStatus.COMPLETED; } private void validateStatusChange(RecruitStatus newStatus) { diff --git a/src/main/java/com/somemore/recruitboard/domain/RecruitBoardDocument.java b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitBoardDocument.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/domain/RecruitBoardDocument.java rename to src/main/java/com/somemore/domains/recruitboard/domain/RecruitBoardDocument.java diff --git a/src/main/java/com/somemore/recruitboard/domain/RecruitStatus.java b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitStatus.java similarity index 85% rename from src/main/java/com/somemore/recruitboard/domain/RecruitStatus.java rename to src/main/java/com/somemore/domains/recruitboard/domain/RecruitStatus.java index 844cff46..b95eb639 100644 --- a/src/main/java/com/somemore/recruitboard/domain/RecruitStatus.java +++ b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitStatus.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/recruitboard/domain/RecruitmentInfo.java b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitmentInfo.java similarity index 98% rename from src/main/java/com/somemore/recruitboard/domain/RecruitmentInfo.java rename to src/main/java/com/somemore/domains/recruitboard/domain/RecruitmentInfo.java index dd7d998d..6da58085 100644 --- a/src/main/java/com/somemore/recruitboard/domain/RecruitmentInfo.java +++ b/src/main/java/com/somemore/domains/recruitboard/domain/RecruitmentInfo.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; import static jakarta.persistence.EnumType.STRING; import static java.time.temporal.ChronoUnit.MINUTES; diff --git a/src/main/java/com/somemore/recruitboard/domain/VolunteerCategory.java b/src/main/java/com/somemore/domains/recruitboard/domain/VolunteerCategory.java similarity index 93% rename from src/main/java/com/somemore/recruitboard/domain/VolunteerCategory.java rename to src/main/java/com/somemore/domains/recruitboard/domain/VolunteerCategory.java index 9b784426..32e0b9a6 100644 --- a/src/main/java/com/somemore/recruitboard/domain/VolunteerCategory.java +++ b/src/main/java/com/somemore/domains/recruitboard/domain/VolunteerCategory.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardNearByCondition.java b/src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardNearByCondition.java similarity index 68% rename from src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardNearByCondition.java rename to src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardNearByCondition.java index 744b5f76..c16ea429 100644 --- a/src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardNearByCondition.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardNearByCondition.java @@ -1,6 +1,6 @@ -package com.somemore.recruitboard.dto.condition; +package com.somemore.domains.recruitboard.dto.condition; -import com.somemore.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitStatus; import lombok.Builder; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardSearchCondition.java b/src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardSearchCondition.java similarity index 59% rename from src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardSearchCondition.java rename to src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardSearchCondition.java index 6658901f..94b04c9f 100644 --- a/src/main/java/com/somemore/recruitboard/dto/condition/RecruitBoardSearchCondition.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/condition/RecruitBoardSearchCondition.java @@ -1,7 +1,7 @@ -package com.somemore.recruitboard.dto.condition; +package com.somemore.domains.recruitboard.dto.condition; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import lombok.Builder; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardCreateRequestDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardCreateRequestDto.java similarity index 90% rename from src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardCreateRequestDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardCreateRequestDto.java index 252ae59f..f460aec7 100644 --- a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardCreateRequestDto.java @@ -1,11 +1,11 @@ -package com.somemore.recruitboard.dto.request; +package com.somemore.domains.recruitboard.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.location.dto.request.LocationCreateRequestDto; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.Future; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java similarity index 93% rename from src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java index e2a5d051..153cb2e7 100644 --- a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardLocationUpdateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.recruitboard.dto.request; +package com.somemore.domains.recruitboard.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.location.dto.request.LocationUpdateRequestDto; +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.DecimalMax; import jakarta.validation.constraints.DecimalMin; diff --git a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java similarity index 81% rename from src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java index 16fea9fd..5ff30916 100644 --- a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardStatusUpdateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.recruitboard.dto.request; +package com.somemore.domains.recruitboard.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitStatus; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java similarity index 94% rename from src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java index 706b71b4..dbcf00b4 100644 --- a/src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/request/RecruitBoardUpdateRequestDto.java @@ -1,8 +1,8 @@ -package com.somemore.recruitboard.dto.request; +package com.somemore.domains.recruitboard.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.Future; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardDetailResponseDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardDetailResponseDto.java similarity index 87% rename from src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardDetailResponseDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardDetailResponseDto.java index 89489bd9..e75ac678 100644 --- a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardDetailResponseDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardDetailResponseDto.java @@ -1,14 +1,14 @@ -package com.somemore.recruitboard.dto.response; +package com.somemore.domains.recruitboard.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.dto.response.CenterSimpleInfoResponseDto; -import com.somemore.location.dto.response.LocationResponseDto; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.center.dto.response.CenterSimpleInfoResponseDto; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.location.dto.response.LocationResponseDto; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.time.LocalTime; diff --git a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java similarity index 87% rename from src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java index 27928311..2cb4e787 100644 --- a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardOverViewResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.recruitboard.dto.response; +package com.somemore.domains.recruitboard.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitBoard; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardResponseDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardResponseDto.java similarity index 91% rename from src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardResponseDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardResponseDto.java index e209f4c7..c53bde56 100644 --- a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardResponseDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardResponseDto.java @@ -1,11 +1,11 @@ -package com.somemore.recruitboard.dto.response; +package com.somemore.domains.recruitboard.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.time.LocalTime; diff --git a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java similarity index 88% rename from src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java index ce092675..e1dc5ab3 100644 --- a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithCenterResponseDto.java @@ -1,13 +1,13 @@ -package com.somemore.recruitboard.dto.response; +package com.somemore.domains.recruitboard.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.center.dto.response.CenterSimpleInfoResponseDto; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.center.dto.response.CenterSimpleInfoResponseDto; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.time.LocalTime; diff --git a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java similarity index 88% rename from src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java rename to src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java index 61462bc7..fd545d1a 100644 --- a/src/main/java/com/somemore/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java +++ b/src/main/java/com/somemore/domains/recruitboard/dto/response/RecruitBoardWithLocationResponseDto.java @@ -1,13 +1,13 @@ -package com.somemore.recruitboard.dto.response; +package com.somemore.domains.recruitboard.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.location.dto.response.LocationResponseDto; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithLocation; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithLocation; +import com.somemore.domains.location.dto.response.LocationResponseDto; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.time.LocalTime; diff --git a/src/main/java/com/somemore/recruitboard/event/CreateRecruitBoardEvent.java b/src/main/java/com/somemore/domains/recruitboard/event/CreateRecruitBoardEvent.java similarity index 95% rename from src/main/java/com/somemore/recruitboard/event/CreateRecruitBoardEvent.java rename to src/main/java/com/somemore/domains/recruitboard/event/CreateRecruitBoardEvent.java index 155bb31f..c3e79e39 100644 --- a/src/main/java/com/somemore/recruitboard/event/CreateRecruitBoardEvent.java +++ b/src/main/java/com/somemore/domains/recruitboard/event/CreateRecruitBoardEvent.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.event; +package com.somemore.domains.recruitboard.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepository.java b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardDocumentRepository.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepository.java rename to src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardDocumentRepository.java diff --git a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardJpaRepository.java b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardJpaRepository.java similarity index 57% rename from src/main/java/com/somemore/recruitboard/repository/RecruitBoardJpaRepository.java rename to src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardJpaRepository.java index 1380d9b8..0a539532 100644 --- a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardJpaRepository.java +++ b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.recruitboard.repository; +package com.somemore.domains.recruitboard.repository; -import com.somemore.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitBoard; import org.springframework.data.jpa.repository.JpaRepository; public interface RecruitBoardJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepository.java b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepository.java similarity index 67% rename from src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepository.java rename to src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepository.java index ce2c8102..48564056 100644 --- a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepository.java +++ b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepository.java @@ -1,11 +1,12 @@ -package com.somemore.recruitboard.repository; - -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.repository.mapper.RecruitBoardDetail; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithLocation; +package com.somemore.domains.recruitboard.repository; + +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithLocation; +import com.somemore.domains.recruitboard.domain.RecruitBoard; + import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImpl.java b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImpl.java similarity index 94% rename from src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImpl.java rename to src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImpl.java index b52c49a7..33975eaf 100644 --- a/src/main/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImpl.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.repository; +package com.somemore.domains.recruitboard.repository; import com.querydsl.core.types.ConstructorExpression; import com.querydsl.core.types.OrderSpecifier; @@ -6,18 +6,19 @@ import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.center.domain.QCenter; -import com.somemore.location.domain.QLocation; -import com.somemore.location.utils.GeoUtils; -import com.somemore.recruitboard.domain.QRecruitBoard; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.repository.mapper.RecruitBoardDetail; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithLocation; +import com.somemore.domains.center.domain.QCenter; +import com.somemore.domains.location.domain.QLocation; +import com.somemore.domains.recruitboard.domain.QRecruitBoard; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithLocation; +import com.somemore.domains.location.utils.GeoUtils; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; + import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardDetail.java b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardDetail.java similarity index 61% rename from src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardDetail.java rename to src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardDetail.java index fcf186fe..452ba00d 100644 --- a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardDetail.java +++ b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardDetail.java @@ -1,6 +1,6 @@ -package com.somemore.recruitboard.repository.mapper; +package com.somemore.domains.recruitboard.repository.mapper; -import com.somemore.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitBoard; import java.math.BigDecimal; public record RecruitBoardDetail( diff --git a/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithCenter.java b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithCenter.java new file mode 100644 index 00000000..d7e82e58 --- /dev/null +++ b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithCenter.java @@ -0,0 +1,10 @@ +package com.somemore.domains.recruitboard.repository.mapper; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; + +public record RecruitBoardWithCenter( + RecruitBoard recruitBoard, + String centerName +) { + +} diff --git a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithLocation.java b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithLocation.java similarity index 59% rename from src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithLocation.java rename to src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithLocation.java index d6c79a31..c96907c4 100644 --- a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithLocation.java +++ b/src/main/java/com/somemore/domains/recruitboard/repository/mapper/RecruitBoardWithLocation.java @@ -1,6 +1,6 @@ -package com.somemore.recruitboard.repository.mapper; +package com.somemore.domains.recruitboard.repository.mapper; -import com.somemore.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitBoard; import java.math.BigDecimal; public record RecruitBoardWithLocation( diff --git a/src/main/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateScheduler.java b/src/main/java/com/somemore/domains/recruitboard/scheduler/RecruitBoardUpdateScheduler.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateScheduler.java rename to src/main/java/com/somemore/domains/recruitboard/scheduler/RecruitBoardUpdateScheduler.java diff --git a/src/main/java/com/somemore/recruitboard/service/command/CreateRecruitBoardService.java b/src/main/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardService.java similarity index 76% rename from src/main/java/com/somemore/recruitboard/service/command/CreateRecruitBoardService.java rename to src/main/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardService.java index 49ec4ca0..25df06ff 100644 --- a/src/main/java/com/somemore/recruitboard/service/command/CreateRecruitBoardService.java +++ b/src/main/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardService.java @@ -1,14 +1,14 @@ -package com.somemore.recruitboard.service.command; +package com.somemore.domains.recruitboard.service.command; import com.somemore.global.common.event.DomainEventSubType; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; -import com.somemore.location.usecase.command.CreateLocationUseCase; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.usecase.command.CreateRecruitBoardUseCase; +import com.somemore.domains.location.usecase.command.CreateLocationUseCase; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardCreateRequestDto; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.usecase.command.CreateRecruitBoardUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardService.java b/src/main/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardService.java similarity index 80% rename from src/main/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardService.java rename to src/main/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardService.java index d1f1e9a6..bb454aa2 100644 --- a/src/main/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardService.java +++ b/src/main/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardService.java @@ -1,13 +1,12 @@ -package com.somemore.recruitboard.service.command; +package com.somemore.domains.recruitboard.service.command; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import com.somemore.global.exception.BadRequestException; -import com.somemore.global.exception.ExceptionMessage; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.usecase.command.DeleteRecruitBoardUseCase; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.usecase.command.DeleteRecruitBoardUseCase; import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardService.java b/src/main/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardService.java similarity index 80% rename from src/main/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardService.java rename to src/main/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardService.java index fc0e6d96..aaeb6af3 100644 --- a/src/main/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardService.java +++ b/src/main/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardService.java @@ -1,16 +1,16 @@ -package com.somemore.recruitboard.service.command; +package com.somemore.domains.recruitboard.service.command; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.usecase.command.UpdateLocationUseCase; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.usecase.command.UpdateRecruitBoardUseCase; +import com.somemore.domains.location.usecase.command.UpdateLocationUseCase; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.usecase.command.UpdateRecruitBoardUseCase; import java.time.LocalDateTime; import java.util.UUID; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentService.java b/src/main/java/com/somemore/domains/recruitboard/service/query/RecruitBoardDocumentService.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentService.java rename to src/main/java/com/somemore/domains/recruitboard/service/query/RecruitBoardDocumentService.java diff --git a/src/main/java/com/somemore/recruitboard/service/query/RecruitBoardQueryService.java b/src/main/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryService.java similarity index 72% rename from src/main/java/com/somemore/recruitboard/service/query/RecruitBoardQueryService.java rename to src/main/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryService.java index f9f76839..0172e58c 100644 --- a/src/main/java/com/somemore/recruitboard/service/query/RecruitBoardQueryService.java +++ b/src/main/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryService.java @@ -1,21 +1,22 @@ -package com.somemore.recruitboard.service.query; +package com.somemore.domains.recruitboard.service.query; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.repository.mapper.RecruitBoardDetail; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithLocation; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardDetailResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithLocation; + import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/recruitboard/usecase/command/CreateRecruitBoardUseCase.java b/src/main/java/com/somemore/domains/recruitboard/usecase/command/CreateRecruitBoardUseCase.java similarity index 54% rename from src/main/java/com/somemore/recruitboard/usecase/command/CreateRecruitBoardUseCase.java rename to src/main/java/com/somemore/domains/recruitboard/usecase/command/CreateRecruitBoardUseCase.java index 4a938aee..26ad1ced 100644 --- a/src/main/java/com/somemore/recruitboard/usecase/command/CreateRecruitBoardUseCase.java +++ b/src/main/java/com/somemore/domains/recruitboard/usecase/command/CreateRecruitBoardUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.recruitboard.usecase.command; +package com.somemore.domains.recruitboard.usecase.command; -import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardCreateRequestDto; import java.util.UUID; public interface CreateRecruitBoardUseCase { diff --git a/src/main/java/com/somemore/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java b/src/main/java/com/somemore/domains/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java similarity index 70% rename from src/main/java/com/somemore/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java rename to src/main/java/com/somemore/domains/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java index 91882f2d..f73e0760 100644 --- a/src/main/java/com/somemore/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java +++ b/src/main/java/com/somemore/domains/recruitboard/usecase/command/DeleteRecruitBoardUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.recruitboard.usecase.command; +package com.somemore.domains.recruitboard.usecase.command; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java b/src/main/java/com/somemore/domains/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java similarity index 66% rename from src/main/java/com/somemore/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java rename to src/main/java/com/somemore/domains/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java index c96457f6..358f7a76 100644 --- a/src/main/java/com/somemore/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java +++ b/src/main/java/com/somemore/domains/recruitboard/usecase/command/UpdateRecruitBoardUseCase.java @@ -1,8 +1,8 @@ -package com.somemore.recruitboard.usecase.command; +package com.somemore.domains.recruitboard.usecase.command; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/recruitboard/usecase/query/RecruitBoardDocumentUseCase.java b/src/main/java/com/somemore/domains/recruitboard/usecase/query/RecruitBoardDocumentUseCase.java similarity index 100% rename from src/main/java/com/somemore/recruitboard/usecase/query/RecruitBoardDocumentUseCase.java rename to src/main/java/com/somemore/domains/recruitboard/usecase/query/RecruitBoardDocumentUseCase.java diff --git a/src/main/java/com/somemore/recruitboard/usecase/query/RecruitBoardQueryUseCase.java b/src/main/java/com/somemore/domains/recruitboard/usecase/query/RecruitBoardQueryUseCase.java similarity index 56% rename from src/main/java/com/somemore/recruitboard/usecase/query/RecruitBoardQueryUseCase.java rename to src/main/java/com/somemore/domains/recruitboard/usecase/query/RecruitBoardQueryUseCase.java index e355920d..a0e8e49f 100644 --- a/src/main/java/com/somemore/recruitboard/usecase/query/RecruitBoardQueryUseCase.java +++ b/src/main/java/com/somemore/domains/recruitboard/usecase/query/RecruitBoardQueryUseCase.java @@ -1,12 +1,12 @@ -package com.somemore.recruitboard.usecase.query; - -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; +package com.somemore.domains.recruitboard.usecase.query; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardDetailResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; import java.util.List; import java.util.UUID; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java b/src/main/java/com/somemore/domains/review/controller/ReviewCommandApiController.java similarity index 91% rename from src/main/java/com/somemore/review/controller/ReviewCommandApiController.java rename to src/main/java/com/somemore/domains/review/controller/ReviewCommandApiController.java index 1efbcb8f..344ff1b4 100644 --- a/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java +++ b/src/main/java/com/somemore/domains/review/controller/ReviewCommandApiController.java @@ -1,13 +1,13 @@ -package com.somemore.review.controller; +package com.somemore.domains.review.controller; import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; +import com.somemore.domains.review.usecase.CreateReviewUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.imageupload.dto.ImageUploadRequestDto; import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.review.dto.request.ReviewCreateRequestDto; -import com.somemore.review.usecase.CreateReviewUseCase; +import com.somemore.domains.review.dto.request.ReviewCreateRequestDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/review/controller/ReviewQueryApiController.java b/src/main/java/com/somemore/domains/review/controller/ReviewQueryApiController.java similarity index 88% rename from src/main/java/com/somemore/review/controller/ReviewQueryApiController.java rename to src/main/java/com/somemore/domains/review/controller/ReviewQueryApiController.java index 97721985..37ae076e 100644 --- a/src/main/java/com/somemore/review/controller/ReviewQueryApiController.java +++ b/src/main/java/com/somemore/domains/review/controller/ReviewQueryApiController.java @@ -1,13 +1,13 @@ -package com.somemore.review.controller; +package com.somemore.domains.review.controller; import static org.springframework.data.domain.Sort.Direction.DESC; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import com.somemore.global.common.response.ApiResponse; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.review.dto.response.ReviewResponseDto; -import com.somemore.review.dto.response.ReviewWithNicknameResponseDto; -import com.somemore.review.usecase.ReviewQueryUseCase; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.review.dto.response.ReviewResponseDto; +import com.somemore.domains.review.dto.response.ReviewWithNicknameResponseDto; +import com.somemore.domains.review.usecase.ReviewQueryUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import java.util.UUID; diff --git a/src/main/java/com/somemore/review/domain/Review.java b/src/main/java/com/somemore/domains/review/domain/Review.java similarity index 96% rename from src/main/java/com/somemore/review/domain/Review.java rename to src/main/java/com/somemore/domains/review/domain/Review.java index 44368966..2d9c6863 100644 --- a/src/main/java/com/somemore/review/domain/Review.java +++ b/src/main/java/com/somemore/domains/review/domain/Review.java @@ -1,4 +1,4 @@ -package com.somemore.review.domain; +package com.somemore.domains.review.domain; import static jakarta.persistence.GenerationType.IDENTITY; import static lombok.AccessLevel.PROTECTED; diff --git a/src/main/java/com/somemore/review/dto/condition/ReviewSearchCondition.java b/src/main/java/com/somemore/domains/review/dto/condition/ReviewSearchCondition.java similarity index 61% rename from src/main/java/com/somemore/review/dto/condition/ReviewSearchCondition.java rename to src/main/java/com/somemore/domains/review/dto/condition/ReviewSearchCondition.java index d9d9666e..d1b70894 100644 --- a/src/main/java/com/somemore/review/dto/condition/ReviewSearchCondition.java +++ b/src/main/java/com/somemore/domains/review/dto/condition/ReviewSearchCondition.java @@ -1,6 +1,6 @@ -package com.somemore.review.dto.condition; +package com.somemore.domains.review.dto.condition; -import com.somemore.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import lombok.Builder; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/review/dto/request/ReviewCreateRequestDto.java b/src/main/java/com/somemore/domains/review/dto/request/ReviewCreateRequestDto.java similarity index 89% rename from src/main/java/com/somemore/review/dto/request/ReviewCreateRequestDto.java rename to src/main/java/com/somemore/domains/review/dto/request/ReviewCreateRequestDto.java index 026929be..b2b85752 100644 --- a/src/main/java/com/somemore/review/dto/request/ReviewCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/review/dto/request/ReviewCreateRequestDto.java @@ -1,9 +1,9 @@ -package com.somemore.review.dto.request; +package com.somemore.domains.review.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.review.domain.Review; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.review.domain.Review; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/com/somemore/review/dto/response/ReviewResponseDto.java b/src/main/java/com/somemore/domains/review/dto/response/ReviewResponseDto.java similarity index 94% rename from src/main/java/com/somemore/review/dto/response/ReviewResponseDto.java rename to src/main/java/com/somemore/domains/review/dto/response/ReviewResponseDto.java index 1a40b264..0198ec1d 100644 --- a/src/main/java/com/somemore/review/dto/response/ReviewResponseDto.java +++ b/src/main/java/com/somemore/domains/review/dto/response/ReviewResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.review.dto.response; +package com.somemore.domains.review.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.review.domain.Review; +import com.somemore.domains.review.domain.Review; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/review/dto/response/ReviewWithNicknameResponseDto.java b/src/main/java/com/somemore/domains/review/dto/response/ReviewWithNicknameResponseDto.java similarity index 95% rename from src/main/java/com/somemore/review/dto/response/ReviewWithNicknameResponseDto.java rename to src/main/java/com/somemore/domains/review/dto/response/ReviewWithNicknameResponseDto.java index ca25fdb1..1aac9c8d 100644 --- a/src/main/java/com/somemore/review/dto/response/ReviewWithNicknameResponseDto.java +++ b/src/main/java/com/somemore/domains/review/dto/response/ReviewWithNicknameResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.review.dto.response; +package com.somemore.domains.review.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.review.domain.Review; +import com.somemore.domains.review.domain.Review; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/review/repository/ReviewJpaRepository.java b/src/main/java/com/somemore/domains/review/repository/ReviewJpaRepository.java similarity index 81% rename from src/main/java/com/somemore/review/repository/ReviewJpaRepository.java rename to src/main/java/com/somemore/domains/review/repository/ReviewJpaRepository.java index 69405529..bc61db0c 100644 --- a/src/main/java/com/somemore/review/repository/ReviewJpaRepository.java +++ b/src/main/java/com/somemore/domains/review/repository/ReviewJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.review.repository; +package com.somemore.domains.review.repository; -import com.somemore.review.domain.Review; +import com.somemore.domains.review.domain.Review; import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; diff --git a/src/main/java/com/somemore/review/repository/ReviewRepository.java b/src/main/java/com/somemore/domains/review/repository/ReviewRepository.java similarity index 75% rename from src/main/java/com/somemore/review/repository/ReviewRepository.java rename to src/main/java/com/somemore/domains/review/repository/ReviewRepository.java index 9d983e1c..8b0d10c1 100644 --- a/src/main/java/com/somemore/review/repository/ReviewRepository.java +++ b/src/main/java/com/somemore/domains/review/repository/ReviewRepository.java @@ -1,7 +1,7 @@ -package com.somemore.review.repository; +package com.somemore.domains.review.repository; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/review/repository/ReviewRepositoryImpl.java b/src/main/java/com/somemore/domains/review/repository/ReviewRepositoryImpl.java similarity index 91% rename from src/main/java/com/somemore/review/repository/ReviewRepositoryImpl.java rename to src/main/java/com/somemore/domains/review/repository/ReviewRepositoryImpl.java index 9b6f146d..2e3d8d7e 100644 --- a/src/main/java/com/somemore/review/repository/ReviewRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/review/repository/ReviewRepositoryImpl.java @@ -1,15 +1,15 @@ -package com.somemore.review.repository; +package com.somemore.domains.review.repository; import com.querydsl.core.types.OrderSpecifier; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.recruitboard.domain.QRecruitBoard; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.review.domain.QReview; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.volunteerapply.domain.QVolunteerApply; +import com.somemore.domains.recruitboard.domain.QRecruitBoard; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.review.domain.QReview; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.volunteerapply.domain.QVolunteerApply; import jakarta.validation.constraints.NotNull; import java.util.List; import java.util.Optional; diff --git a/src/main/java/com/somemore/review/service/CreateReviewService.java b/src/main/java/com/somemore/domains/review/service/CreateReviewService.java similarity index 79% rename from src/main/java/com/somemore/review/service/CreateReviewService.java rename to src/main/java/com/somemore/domains/review/service/CreateReviewService.java index fa53b625..9c169a66 100644 --- a/src/main/java/com/somemore/review/service/CreateReviewService.java +++ b/src/main/java/com/somemore/domains/review/service/CreateReviewService.java @@ -1,15 +1,16 @@ -package com.somemore.review.service; +package com.somemore.domains.review.service; import static com.somemore.global.exception.ExceptionMessage.REVIEW_ALREADY_EXISTS; import static com.somemore.global.exception.ExceptionMessage.REVIEW_RESTRICTED_TO_ATTENDED; +import com.somemore.domains.review.repository.ReviewRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.request.ReviewCreateRequestDto; -import com.somemore.review.repository.ReviewRepository; -import com.somemore.review.usecase.CreateReviewUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.request.ReviewCreateRequestDto; +import com.somemore.domains.review.usecase.CreateReviewUseCase; + import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/review/service/ReviewQueryService.java b/src/main/java/com/somemore/domains/review/service/ReviewQueryService.java similarity index 81% rename from src/main/java/com/somemore/review/service/ReviewQueryService.java rename to src/main/java/com/somemore/domains/review/service/ReviewQueryService.java index 713a7eb5..f70d11a0 100644 --- a/src/main/java/com/somemore/review/service/ReviewQueryService.java +++ b/src/main/java/com/somemore/domains/review/service/ReviewQueryService.java @@ -1,17 +1,18 @@ -package com.somemore.review.service; +package com.somemore.domains.review.service; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.review.dto.response.ReviewResponseDto; +import com.somemore.domains.review.dto.response.ReviewWithNicknameResponseDto; +import com.somemore.domains.review.repository.ReviewRepository; +import com.somemore.domains.review.usecase.ReviewQueryUseCase; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.review.dto.response.ReviewResponseDto; -import com.somemore.review.dto.response.ReviewWithNicknameResponseDto; -import com.somemore.review.repository.ReviewRepository; -import com.somemore.review.usecase.ReviewQueryUseCase; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; + import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/somemore/review/usecase/CreateReviewUseCase.java b/src/main/java/com/somemore/domains/review/usecase/CreateReviewUseCase.java similarity index 57% rename from src/main/java/com/somemore/review/usecase/CreateReviewUseCase.java rename to src/main/java/com/somemore/domains/review/usecase/CreateReviewUseCase.java index ec2fb7f4..dfac7b11 100644 --- a/src/main/java/com/somemore/review/usecase/CreateReviewUseCase.java +++ b/src/main/java/com/somemore/domains/review/usecase/CreateReviewUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.review.usecase; +package com.somemore.domains.review.usecase; -import com.somemore.review.dto.request.ReviewCreateRequestDto; +import com.somemore.domains.review.dto.request.ReviewCreateRequestDto; import java.util.UUID; public interface CreateReviewUseCase { diff --git a/src/main/java/com/somemore/review/usecase/ReviewQueryUseCase.java b/src/main/java/com/somemore/domains/review/usecase/ReviewQueryUseCase.java similarity index 58% rename from src/main/java/com/somemore/review/usecase/ReviewQueryUseCase.java rename to src/main/java/com/somemore/domains/review/usecase/ReviewQueryUseCase.java index 05f10216..ebbb36a9 100644 --- a/src/main/java/com/somemore/review/usecase/ReviewQueryUseCase.java +++ b/src/main/java/com/somemore/domains/review/usecase/ReviewQueryUseCase.java @@ -1,9 +1,9 @@ -package com.somemore.review.usecase; +package com.somemore.domains.review.usecase; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.review.dto.response.ReviewResponseDto; -import com.somemore.review.dto.response.ReviewWithNicknameResponseDto; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.review.dto.response.ReviewResponseDto; +import com.somemore.domains.review.dto.response.ReviewWithNicknameResponseDto; import java.util.UUID; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandController.java similarity index 90% rename from src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java rename to src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandController.java index 772e5701..c61c4239 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java +++ b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandController.java @@ -1,13 +1,13 @@ -package com.somemore.volunteer.controller; +package com.somemore.domains.volunteer.controller; import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; +import com.somemore.domains.volunteer.usecase.UpdateVolunteerProfileUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.imageupload.dto.ImageUploadRequestDto; import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; -import com.somemore.volunteer.usecase.UpdateVolunteerProfileUseCase; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileQueryController.java similarity index 92% rename from src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java rename to src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileQueryController.java index 33f1290a..1b564ef6 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java +++ b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerProfileQueryController.java @@ -1,9 +1,9 @@ -package com.somemore.volunteer.controller; +package com.somemore.domains.volunteer.controller; +import com.somemore.domains.volunteer.dto.response.VolunteerProfileResponseDto; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerRankingQueryController.java b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerRankingQueryController.java similarity index 84% rename from src/main/java/com/somemore/volunteer/controller/VolunteerRankingQueryController.java rename to src/main/java/com/somemore/domains/volunteer/controller/VolunteerRankingQueryController.java index 6ec7f64d..c9bd7a17 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerRankingQueryController.java +++ b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerRankingQueryController.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.controller; +package com.somemore.domains.volunteer.controller; +import com.somemore.domains.volunteer.dto.response.VolunteerRankingResponseDto; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; import com.somemore.global.common.response.ApiResponse; -import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerSignController.java similarity index 94% rename from src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java rename to src/main/java/com/somemore/domains/volunteer/controller/VolunteerSignController.java index 8146f144..42fb71ab 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java +++ b/src/main/java/com/somemore/domains/volunteer/controller/VolunteerSignController.java @@ -1,9 +1,9 @@ -package com.somemore.volunteer.controller; +package com.somemore.domains.volunteer.controller; +import com.somemore.domains.volunteer.usecase.GenerateOAuthUrlUseCase; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.exception.BadRequestException; import com.somemore.global.auth.signout.usecase.SignOutUseCase; -import com.somemore.volunteer.usecase.GenerateOAuthUrlUseCase; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/volunteer/domain/Gender.java b/src/main/java/com/somemore/domains/volunteer/domain/Gender.java similarity index 90% rename from src/main/java/com/somemore/volunteer/domain/Gender.java rename to src/main/java/com/somemore/domains/volunteer/domain/Gender.java index aaadb3a3..8b7f81b6 100644 --- a/src/main/java/com/somemore/volunteer/domain/Gender.java +++ b/src/main/java/com/somemore/domains/volunteer/domain/Gender.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.domain; +package com.somemore.domains.volunteer.domain; import lombok.Getter; diff --git a/src/main/java/com/somemore/volunteer/domain/Tier.java b/src/main/java/com/somemore/domains/volunteer/domain/Tier.java similarity index 75% rename from src/main/java/com/somemore/volunteer/domain/Tier.java rename to src/main/java/com/somemore/domains/volunteer/domain/Tier.java index 9a41b511..6af0204d 100644 --- a/src/main/java/com/somemore/volunteer/domain/Tier.java +++ b/src/main/java/com/somemore/domains/volunteer/domain/Tier.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.domain; +package com.somemore.domains.volunteer.domain; import lombok.Getter; diff --git a/src/main/java/com/somemore/volunteer/domain/Volunteer.java b/src/main/java/com/somemore/domains/volunteer/domain/Volunteer.java similarity index 95% rename from src/main/java/com/somemore/volunteer/domain/Volunteer.java rename to src/main/java/com/somemore/domains/volunteer/domain/Volunteer.java index 1d4fc51f..8f4c4e27 100644 --- a/src/main/java/com/somemore/volunteer/domain/Volunteer.java +++ b/src/main/java/com/somemore/domains/volunteer/domain/Volunteer.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.domain; +package com.somemore.domains.volunteer.domain; import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.global.common.entity.BaseEntity; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import jakarta.persistence.*; import lombok.*; diff --git a/src/main/java/com/somemore/volunteer/domain/VolunteerDetail.java b/src/main/java/com/somemore/domains/volunteer/domain/VolunteerDetail.java similarity index 93% rename from src/main/java/com/somemore/volunteer/domain/VolunteerDetail.java rename to src/main/java/com/somemore/domains/volunteer/domain/VolunteerDetail.java index f99b20bd..d85dae75 100644 --- a/src/main/java/com/somemore/volunteer/domain/VolunteerDetail.java +++ b/src/main/java/com/somemore/domains/volunteer/domain/VolunteerDetail.java @@ -1,7 +1,7 @@ -package com.somemore.volunteer.domain; +package com.somemore.domains.volunteer.domain; import com.somemore.global.common.entity.BaseEntity; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; diff --git a/src/main/java/com/somemore/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java b/src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java similarity index 95% rename from src/main/java/com/somemore/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java rename to src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java index 88e480ac..667b1445 100644 --- a/src/main/java/com/somemore/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java +++ b/src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerProfileUpdateRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.dto.request; +package com.somemore.domains.volunteer.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java b/src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerRegisterRequestDto.java similarity index 85% rename from src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java rename to src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerRegisterRequestDto.java index 5d1960d2..a32e45e2 100644 --- a/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java +++ b/src/main/java/com/somemore/domains/volunteer/dto/request/VolunteerRegisterRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.dto.request; +package com.somemore.domains.volunteer.dto.request; import com.somemore.global.auth.oauth.OAuthProvider; diff --git a/src/main/java/com/somemore/volunteer/dto/response/VolunteerProfileResponseDto.java b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerProfileResponseDto.java similarity index 95% rename from src/main/java/com/somemore/volunteer/dto/response/VolunteerProfileResponseDto.java rename to src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerProfileResponseDto.java index a2ee12df..c87ec9f2 100644 --- a/src/main/java/com/somemore/volunteer/dto/response/VolunteerProfileResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerProfileResponseDto.java @@ -1,9 +1,9 @@ -package com.somemore.volunteer.dto.response; +package com.somemore.domains.volunteer.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; import io.swagger.v3.oas.annotations.media.Schema; @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/src/main/java/com/somemore/volunteer/dto/response/VolunteerRankingResponseDto.java b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerRankingResponseDto.java similarity index 93% rename from src/main/java/com/somemore/volunteer/dto/response/VolunteerRankingResponseDto.java rename to src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerRankingResponseDto.java index dbdb690d..56bd3174 100644 --- a/src/main/java/com/somemore/volunteer/dto/response/VolunteerRankingResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerRankingResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.dto.response; +package com.somemore.domains.volunteer.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; +import com.somemore.domains.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/com/somemore/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java similarity index 91% rename from src/main/java/com/somemore/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java rename to src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java index d1331a3a..fe134006 100644 --- a/src/main/java/com/somemore/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteer/dto/response/VolunteerSimpleInfoResponseDto.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.dto.response; +package com.somemore.domains.volunteer.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; import io.swagger.v3.oas.annotations.media.Schema; import java.util.UUID; import lombok.Builder; diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailJpaRepository.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailJpaRepository.java similarity index 58% rename from src/main/java/com/somemore/volunteer/repository/VolunteerDetailJpaRepository.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailJpaRepository.java index 9c333f15..03875dfa 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailJpaRepository.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; -import com.somemore.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.domain.VolunteerDetail; import org.springframework.data.jpa.repository.JpaRepository; public interface VolunteerDetailJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepository.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepository.java similarity index 71% rename from src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepository.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepository.java index 2ce9cb40..2d795f43 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepository.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepository.java @@ -1,6 +1,6 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; -import com.somemore.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.domain.VolunteerDetail; import org.springframework.stereotype.Repository; import java.util.Optional; diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImpl.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImpl.java similarity index 88% rename from src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImpl.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImpl.java index bdcb4476..d67abdd9 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImpl.java @@ -1,9 +1,9 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.volunteer.domain.QVolunteerDetail; -import com.somemore.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.domain.QVolunteerDetail; +import com.somemore.domains.volunteer.domain.VolunteerDetail; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerJpaRepository.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerJpaRepository.java similarity index 74% rename from src/main/java/com/somemore/volunteer/repository/VolunteerJpaRepository.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerJpaRepository.java index f72da6f6..621a9b50 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerJpaRepository.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerJpaRepository.java @@ -1,6 +1,7 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; + +import com.somemore.domains.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.Volunteer; import java.util.List; import java.util.UUID; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerRepository.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepository.java similarity index 73% rename from src/main/java/com/somemore/volunteer/repository/VolunteerRepository.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepository.java index dd539b6a..ee6ac42a 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerRepository.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepository.java @@ -1,8 +1,9 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; + +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/repository/VolunteerRepositoryImpl.java b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryImpl.java similarity index 91% rename from src/main/java/com/somemore/volunteer/repository/VolunteerRepositoryImpl.java rename to src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryImpl.java index dcae9355..a7a301f0 100644 --- a/src/main/java/com/somemore/volunteer/repository/VolunteerRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryImpl.java @@ -1,14 +1,15 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; import com.querydsl.core.types.Path; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.volunteer.domain.QVolunteer; -import com.somemore.volunteer.domain.QVolunteerDetail; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteer.domain.QVolunteer; +import com.somemore.domains.volunteer.domain.QVolunteerDetail; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; + import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java b/src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java similarity index 68% rename from src/main/java/com/somemore/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java rename to src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java index 48f77c21..3e18854e 100644 --- a/src/main/java/com/somemore/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerOverviewForRankingByHours.java @@ -1,6 +1,6 @@ -package com.somemore.volunteer.repository.mapper; +package com.somemore.domains.volunteer.repository.mapper; -import com.somemore.volunteer.domain.Tier; +import com.somemore.domains.volunteer.domain.Tier; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/repository/mapper/VolunteerSimpleInfo.java b/src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerSimpleInfo.java similarity index 63% rename from src/main/java/com/somemore/volunteer/repository/mapper/VolunteerSimpleInfo.java rename to src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerSimpleInfo.java index 2f7ee65e..3a0228bb 100644 --- a/src/main/java/com/somemore/volunteer/repository/mapper/VolunteerSimpleInfo.java +++ b/src/main/java/com/somemore/domains/volunteer/repository/mapper/VolunteerSimpleInfo.java @@ -1,6 +1,7 @@ -package com.somemore.volunteer.repository.mapper; +package com.somemore.domains.volunteer.repository.mapper; + +import com.somemore.domains.volunteer.domain.Tier; -import com.somemore.volunteer.domain.Tier; import java.util.UUID; public record VolunteerSimpleInfo( diff --git a/src/main/java/com/somemore/volunteer/service/GenerateOAuthUrlService.java b/src/main/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlService.java similarity index 88% rename from src/main/java/com/somemore/volunteer/service/GenerateOAuthUrlService.java rename to src/main/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlService.java index 8e179e5d..7963b82e 100644 --- a/src/main/java/com/somemore/volunteer/service/GenerateOAuthUrlService.java +++ b/src/main/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlService.java @@ -1,6 +1,6 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; -import com.somemore.volunteer.usecase.GenerateOAuthUrlUseCase; +import com.somemore.domains.volunteer.usecase.GenerateOAuthUrlUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/com/somemore/volunteer/service/RegisterVolunteerService.java b/src/main/java/com/somemore/domains/volunteer/service/RegisterVolunteerService.java similarity index 56% rename from src/main/java/com/somemore/volunteer/service/RegisterVolunteerService.java rename to src/main/java/com/somemore/domains/volunteer/service/RegisterVolunteerService.java index 8feb930c..fe0948a5 100644 --- a/src/main/java/com/somemore/volunteer/service/RegisterVolunteerService.java +++ b/src/main/java/com/somemore/domains/volunteer/service/RegisterVolunteerService.java @@ -1,18 +1,16 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; -import com.somemore.volunteer.repository.VolunteerDetailRepository; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteer.usecase.RegisterVolunteerUseCase; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.usecase.RegisterVolunteerUseCase; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.repository.VolunteerDetailRepository; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import static com.somemore.volunteer.domain.Volunteer.createDefault; - @Slf4j @Service @RequiredArgsConstructor @@ -24,7 +22,7 @@ public class RegisterVolunteerService implements RegisterVolunteerUseCase { @Override public void registerVolunteer(VolunteerRegisterRequestDto dto) { - Volunteer volunteer = createDefault(dto.oAuthProvider(), dto.oauthId()); + Volunteer volunteer = Volunteer.createDefault(dto.oAuthProvider(), dto.oauthId()); volunteerRepository.save(volunteer); VolunteerDetail volunteerDetail = VolunteerDetail.of(dto, volunteer.getId()); diff --git a/src/main/java/com/somemore/volunteer/service/UpdateVolunteerLockService.java b/src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockService.java similarity index 86% rename from src/main/java/com/somemore/volunteer/service/UpdateVolunteerLockService.java rename to src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockService.java index c8739386..33d130b4 100644 --- a/src/main/java/com/somemore/volunteer/service/UpdateVolunteerLockService.java +++ b/src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockService.java @@ -1,11 +1,12 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.usecase.UpdateVolunteerUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteer.usecase.UpdateVolunteerUseCase; +import com.somemore.domains.volunteer.repository.VolunteerRepository; + import java.util.UUID; import java.util.concurrent.TimeUnit; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/volunteer/service/UpdateVolunteerProfileService.java b/src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileService.java similarity index 72% rename from src/main/java/com/somemore/volunteer/service/UpdateVolunteerProfileService.java rename to src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileService.java index fd2dd507..c9ca4289 100644 --- a/src/main/java/com/somemore/volunteer/service/UpdateVolunteerProfileService.java +++ b/src/main/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileService.java @@ -1,10 +1,10 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; +import com.somemore.domains.volunteer.domain.Volunteer; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteer.usecase.UpdateVolunteerProfileUseCase; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteer.usecase.UpdateVolunteerProfileUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java b/src/main/java/com/somemore/domains/volunteer/service/VolunteerQueryService.java similarity index 80% rename from src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java rename to src/main/java/com/somemore/domains/volunteer/service/VolunteerQueryService.java index 6e6c6409..7ece3691 100644 --- a/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java +++ b/src/main/java/com/somemore/domains/volunteer/service/VolunteerQueryService.java @@ -1,18 +1,18 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto; -import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto; -import com.somemore.volunteer.repository.VolunteerDetailRepository; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; -import com.somemore.volunteer.validator.VolunteerDetailAccessValidator; +import com.somemore.domains.volunteer.dto.response.VolunteerProfileResponseDto; +import com.somemore.domains.volunteer.dto.response.VolunteerRankingResponseDto; +import com.somemore.domains.volunteer.repository.VolunteerDetailRepository; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteer.validator.VolunteerDetailAccessValidator; import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/volunteer/usecase/GenerateOAuthUrlUseCase.java b/src/main/java/com/somemore/domains/volunteer/usecase/GenerateOAuthUrlUseCase.java similarity index 65% rename from src/main/java/com/somemore/volunteer/usecase/GenerateOAuthUrlUseCase.java rename to src/main/java/com/somemore/domains/volunteer/usecase/GenerateOAuthUrlUseCase.java index 1a91f69c..a9b3db0f 100644 --- a/src/main/java/com/somemore/volunteer/usecase/GenerateOAuthUrlUseCase.java +++ b/src/main/java/com/somemore/domains/volunteer/usecase/GenerateOAuthUrlUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.usecase; +package com.somemore.domains.volunteer.usecase; public interface GenerateOAuthUrlUseCase { String generateUrl(String oAuthProvider); diff --git a/src/main/java/com/somemore/domains/volunteer/usecase/RegisterVolunteerUseCase.java b/src/main/java/com/somemore/domains/volunteer/usecase/RegisterVolunteerUseCase.java new file mode 100644 index 00000000..75d0028e --- /dev/null +++ b/src/main/java/com/somemore/domains/volunteer/usecase/RegisterVolunteerUseCase.java @@ -0,0 +1,7 @@ +package com.somemore.domains.volunteer.usecase; + +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; + +public interface RegisterVolunteerUseCase { + void registerVolunteer(VolunteerRegisterRequestDto dto); +} diff --git a/src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerProfileUseCase.java b/src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerProfileUseCase.java similarity index 56% rename from src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerProfileUseCase.java rename to src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerProfileUseCase.java index 330cd502..ca757b74 100644 --- a/src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerProfileUseCase.java +++ b/src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerProfileUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.volunteer.usecase; +package com.somemore.domains.volunteer.usecase; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerUseCase.java b/src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerUseCase.java similarity index 71% rename from src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerUseCase.java rename to src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerUseCase.java index a5247a0c..12c74095 100644 --- a/src/main/java/com/somemore/volunteer/usecase/UpdateVolunteerUseCase.java +++ b/src/main/java/com/somemore/domains/volunteer/usecase/UpdateVolunteerUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.usecase; +package com.somemore.domains.volunteer.usecase; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/usecase/VolunteerQueryUseCase.java b/src/main/java/com/somemore/domains/volunteer/usecase/VolunteerQueryUseCase.java similarity index 65% rename from src/main/java/com/somemore/volunteer/usecase/VolunteerQueryUseCase.java rename to src/main/java/com/somemore/domains/volunteer/usecase/VolunteerQueryUseCase.java index 75ad6a97..b1f165c3 100644 --- a/src/main/java/com/somemore/volunteer/usecase/VolunteerQueryUseCase.java +++ b/src/main/java/com/somemore/domains/volunteer/usecase/VolunteerQueryUseCase.java @@ -1,9 +1,9 @@ -package com.somemore.volunteer.usecase; +package com.somemore.domains.volunteer.usecase; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto; -import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.dto.response.VolunteerProfileResponseDto; +import com.somemore.domains.volunteer.dto.response.VolunteerRankingResponseDto; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java b/src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidator.java similarity index 74% rename from src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java rename to src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidator.java index 83a183be..e5a16769 100644 --- a/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java +++ b/src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidator.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.validator; +package com.somemore.domains.volunteer.validator; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java b/src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImpl.java similarity index 86% rename from src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java rename to src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImpl.java index 50c948a9..8201a848 100644 --- a/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java +++ b/src/main/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImpl.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.validator; +package com.somemore.domains.volunteer.validator; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java b/src/main/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java similarity index 87% rename from src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java rename to src/main/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java index 9b44df85..3eb4d803 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java +++ b/src/main/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java @@ -1,11 +1,11 @@ -package com.somemore.volunteerapply.controller; +package com.somemore.domains.volunteerapply.controller; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.domains.volunteerapply.usecase.ApproveVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.RejectVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.global.common.response.ApiResponse; -import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; -import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase; -import com.somemore.volunteerapply.usecase.RejectVolunteerApplyUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java b/src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiController.java similarity index 87% rename from src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java rename to src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiController.java index b3e139da..0a651bea 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java +++ b/src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiController.java @@ -1,10 +1,10 @@ -package com.somemore.volunteerapply.controller; +package com.somemore.domains.volunteerapply.controller; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; +import com.somemore.domains.volunteerapply.usecase.ApplyVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; -import com.somemore.volunteerapply.usecase.ApplyVolunteerApplyUseCase; -import com.somemore.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java b/src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiController.java similarity index 88% rename from src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java rename to src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiController.java index 19d8d4cc..68bb36c6 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java +++ b/src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiController.java @@ -1,17 +1,17 @@ -package com.somemore.volunteerapply.controller; +package com.somemore.domains.volunteerapply.controller; import static org.springframework.data.domain.Sort.Direction.DESC; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.global.auth.annotation.CurrentUser; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/domain/ApplyStatus.java b/src/main/java/com/somemore/domains/volunteerapply/domain/ApplyStatus.java similarity index 57% rename from src/main/java/com/somemore/volunteerapply/domain/ApplyStatus.java rename to src/main/java/com/somemore/domains/volunteerapply/domain/ApplyStatus.java index aa663475..16354914 100644 --- a/src/main/java/com/somemore/volunteerapply/domain/ApplyStatus.java +++ b/src/main/java/com/somemore/domains/volunteerapply/domain/ApplyStatus.java @@ -1,4 +1,4 @@ -package com.somemore.volunteerapply.domain; +package com.somemore.domains.volunteerapply.domain; public enum ApplyStatus { WAITING, diff --git a/src/main/java/com/somemore/volunteerapply/domain/VolunteerApply.java b/src/main/java/com/somemore/domains/volunteerapply/domain/VolunteerApply.java similarity index 90% rename from src/main/java/com/somemore/volunteerapply/domain/VolunteerApply.java rename to src/main/java/com/somemore/domains/volunteerapply/domain/VolunteerApply.java index 70ab5e14..10bc29c1 100644 --- a/src/main/java/com/somemore/volunteerapply/domain/VolunteerApply.java +++ b/src/main/java/com/somemore/domains/volunteerapply/domain/VolunteerApply.java @@ -1,6 +1,4 @@ -package com.somemore.volunteerapply.domain; - -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; +package com.somemore.domains.volunteerapply.domain; import com.somemore.global.common.entity.BaseEntity; import jakarta.persistence.Column; @@ -57,7 +55,7 @@ public void changeStatus(ApplyStatus status) { } public void changeAttended(Boolean attended) { - if (this.status != APPROVED) { + if (this.status != ApplyStatus.APPROVED) { throw new IllegalStateException("승인되지 않은 봉사 지원은 참석 여부를 변경할 수 없습니다."); } this.attended = attended; @@ -69,6 +67,6 @@ public boolean isOwnApplication(UUID volunteerId) { public boolean isVolunteerActivityCompleted() { - return this.attended && this.status == APPROVED; + return this.attended && this.status == ApplyStatus.APPROVED; } } diff --git a/src/main/java/com/somemore/volunteerapply/dto/condition/VolunteerApplySearchCondition.java b/src/main/java/com/somemore/domains/volunteerapply/dto/condition/VolunteerApplySearchCondition.java similarity index 63% rename from src/main/java/com/somemore/volunteerapply/dto/condition/VolunteerApplySearchCondition.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/condition/VolunteerApplySearchCondition.java index ccd105f3..2d72d442 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/condition/VolunteerApplySearchCondition.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/condition/VolunteerApplySearchCondition.java @@ -1,6 +1,6 @@ -package com.somemore.volunteerapply.dto.condition; +package com.somemore.domains.volunteerapply.dto.condition; -import com.somemore.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; import lombok.Builder; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java similarity index 80% rename from src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java index 0a1a5cdd..b2f04d1e 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplyCreateRequestDto.java @@ -1,10 +1,10 @@ -package com.somemore.volunteerapply.dto.request; +package com.somemore.domains.volunteerapply.dto.request; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java similarity index 90% rename from src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java index 36d97e15..65388b5f 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/request/VolunteerApplySettleRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.volunteerapply.dto.request; +package com.somemore.domains.volunteerapply.dto.request; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java similarity index 84% rename from src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java index c884ab66..1d02e646 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyRecruitInfoResponseDto.java @@ -1,11 +1,11 @@ -package com.somemore.volunteerapply.dto.response; +package com.somemore.domains.volunteerapply.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.response.RecruitBoardOverViewResponseDto; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardOverViewResponseDto; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyResponseDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyResponseDto.java similarity index 90% rename from src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyResponseDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyResponseDto.java index 4f77b364..51011ab1 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyResponseDto.java @@ -1,9 +1,9 @@ -package com.somemore.volunteerapply.dto.response; +package com.somemore.domains.volunteerapply.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java similarity index 78% rename from src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java index f616b69d..c52d2642 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplySummaryResponseDto.java @@ -1,13 +1,13 @@ -package com.somemore.volunteerapply.dto.response; +package com.somemore.domains.volunteerapply.dto.response; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.REJECTED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java similarity index 85% rename from src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java rename to src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java index 10e92019..bd7809c4 100644 --- a/src/main/java/com/somemore/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java +++ b/src/main/java/com/somemore/domains/volunteerapply/dto/response/VolunteerApplyVolunteerInfoResponseDto.java @@ -1,11 +1,11 @@ -package com.somemore.volunteerapply.dto.response; +package com.somemore.domains.volunteerapply.dto.response; import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.volunteer.dto.response.VolunteerSimpleInfoResponseDto; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteer.dto.response.VolunteerSimpleInfoResponseDto; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import io.swagger.v3.oas.annotations.media.Schema; import java.time.LocalDateTime; import lombok.Builder; diff --git a/src/main/java/com/somemore/volunteerapply/event/VolunteerApplyEvent.java b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyEvent.java similarity index 91% rename from src/main/java/com/somemore/volunteerapply/event/VolunteerApplyEvent.java rename to src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyEvent.java index 827ebd38..4a723f11 100644 --- a/src/main/java/com/somemore/volunteerapply/event/VolunteerApplyEvent.java +++ b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyEvent.java @@ -1,10 +1,10 @@ -package com.somemore.volunteerapply.event; +package com.somemore.domains.volunteerapply.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.global.common.event.ServerEvent; import com.somemore.global.common.event.ServerEventType; -import com.somemore.notification.domain.NotificationSubType; import lombok.Getter; import lombok.experimental.SuperBuilder; diff --git a/src/main/java/com/somemore/volunteerapply/event/VolunteerApplyStatusChangeEvent.java b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyStatusChangeEvent.java similarity index 87% rename from src/main/java/com/somemore/volunteerapply/event/VolunteerApplyStatusChangeEvent.java rename to src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyStatusChangeEvent.java index 6d5d2995..b166abc7 100644 --- a/src/main/java/com/somemore/volunteerapply/event/VolunteerApplyStatusChangeEvent.java +++ b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerApplyStatusChangeEvent.java @@ -1,13 +1,13 @@ -package com.somemore.volunteerapply.event; +package com.somemore.domains.volunteerapply.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.recruitboard.domain.RecruitBoard; import com.somemore.global.common.event.ServerEvent; import com.somemore.global.common.event.ServerEventType; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import lombok.Getter; import lombok.experimental.SuperBuilder; diff --git a/src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerReviewRequestEvent.java similarity index 91% rename from src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java rename to src/main/java/com/somemore/domains/volunteerapply/event/VolunteerReviewRequestEvent.java index 7dfc61ad..91d43b64 100644 --- a/src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java +++ b/src/main/java/com/somemore/domains/volunteerapply/event/VolunteerReviewRequestEvent.java @@ -1,10 +1,10 @@ -package com.somemore.volunteerapply.event; +package com.somemore.domains.volunteerapply.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.global.common.event.ServerEvent; import com.somemore.global.common.event.ServerEventType; -import com.somemore.notification.domain.NotificationSubType; import lombok.Getter; import lombok.experimental.SuperBuilder; diff --git a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyJpaRepository.java b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyJpaRepository.java similarity index 56% rename from src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyJpaRepository.java rename to src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyJpaRepository.java index edee536e..fa883d11 100644 --- a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyJpaRepository.java +++ b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyJpaRepository.java @@ -1,6 +1,6 @@ -package com.somemore.volunteerapply.repository; +package com.somemore.domains.volunteerapply.repository; -import com.somemore.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import org.springframework.data.jpa.repository.JpaRepository; public interface VolunteerApplyJpaRepository extends JpaRepository { diff --git a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepository.java b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepository.java similarity index 83% rename from src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepository.java rename to src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepository.java index b3e62d61..31452856 100644 --- a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepository.java +++ b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepository.java @@ -1,7 +1,8 @@ -package com.somemore.volunteerapply.repository; +package com.somemore.domains.volunteerapply.repository; + +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImpl.java b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImpl.java similarity index 95% rename from src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImpl.java rename to src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImpl.java index 866c16bb..0ed6b282 100644 --- a/src/main/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImpl.java +++ b/src/main/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImpl.java @@ -1,12 +1,13 @@ -package com.somemore.volunteerapply.repository; +package com.somemore.domains.volunteerapply.repository; import com.querydsl.core.types.OrderSpecifier; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.QVolunteerApply; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.domain.QVolunteerApply; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; + import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyService.java b/src/main/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyService.java similarity index 78% rename from src/main/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyService.java index 0c52ac88..4d525777 100644 --- a/src/main/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyService.java @@ -1,19 +1,20 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.DUPLICATE_APPLICATION; import static com.somemore.global.exception.ExceptionMessage.RECRUITMENT_NOT_OPEN; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteerapply.usecase.ApplyVolunteerApplyUseCase; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; import com.somemore.global.exception.BadRequestException; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; -import com.somemore.volunteerapply.event.VolunteerApplyEvent; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import com.somemore.volunteerapply.usecase.ApplyVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; +import com.somemore.domains.volunteerapply.event.VolunteerApplyEvent; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; + import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java b/src/main/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeService.java similarity index 82% rename from src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeService.java index 198775f0..c179409e 100644 --- a/src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeService.java @@ -1,21 +1,22 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.RECRUIT_BOARD_ID_MISMATCH; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.global.exception.ExceptionMessage.VOLUNTEER_APPLY_LIST_MISMATCH; -import com.somemore.volunteerapply.event.VolunteerReviewRequestEvent; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteer.usecase.UpdateVolunteerUseCase; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.domains.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; +import com.somemore.domains.volunteerapply.event.VolunteerReviewRequestEvent; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; import com.somemore.global.exception.BadRequestException; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteer.usecase.UpdateVolunteerUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; -import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; + import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeService.java similarity index 79% rename from src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeService.java index 9cff2af9..6d62e833 100644 --- a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeService.java @@ -1,18 +1,19 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; + import java.util.List; import java.util.Map; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryService.java b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryService.java similarity index 78% rename from src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryService.java index d5fbb992..f32580f8 100644 --- a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryService.java @@ -1,14 +1,15 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER_APPLY; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; + import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; @@ -48,7 +49,7 @@ public VolunteerApplySummaryResponseDto getSummaryByRecruitId(Long recruitId) { @Override public VolunteerApplyResponseDto getVolunteerApplyByRecruitIdAndVolunteerId(Long recruitId, - UUID volunteerId) { + UUID volunteerId) { VolunteerApply apply = getByRecruitIdAndVolunteerId(recruitId, volunteerId); return VolunteerApplyResponseDto.from(apply); diff --git a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyStatusChangeService.java b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyStatusChangeService.java similarity index 77% rename from src/main/java/com/somemore/volunteerapply/service/VolunteerApplyStatusChangeService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyStatusChangeService.java index cac17489..de238c2d 100644 --- a/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyStatusChangeService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/VolunteerApplyStatusChangeService.java @@ -1,15 +1,15 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteerapply.event.VolunteerApplyStatusChangeEvent; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; +import com.somemore.domains.volunteerapply.usecase.ApproveVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.RejectVolunteerApplyUseCase; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.event.VolunteerApplyStatusChangeEvent; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase; -import com.somemore.volunteerapply.usecase.RejectVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -19,8 +19,8 @@ import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER_APPLY; import static com.somemore.global.exception.ExceptionMessage.RECRUIT_BOARD_ALREADY_COMPLETED; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.REJECTED; @RequiredArgsConstructor @Transactional diff --git a/src/main/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyService.java b/src/main/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyService.java similarity index 82% rename from src/main/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyService.java rename to src/main/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyService.java index d40d9a5a..8ba5144a 100644 --- a/src/main/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyService.java +++ b/src/main/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyService.java @@ -1,12 +1,13 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER_APPLY; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_APPLY; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; +import com.somemore.domains.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import com.somemore.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; + import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java similarity index 52% rename from src/main/java/com/somemore/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java index 915e689a..f225f81a 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/ApplyVolunteerApplyUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; -import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; import java.util.UUID; public interface ApplyVolunteerApplyUseCase { diff --git a/src/main/java/com/somemore/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java similarity index 69% rename from src/main/java/com/somemore/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java index 002a3699..ec74ba21 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/ApproveVolunteerApplyUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/usecase/RejectVolunteerApplyUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/RejectVolunteerApplyUseCase.java similarity index 68% rename from src/main/java/com/somemore/volunteerapply/usecase/RejectVolunteerApplyUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/RejectVolunteerApplyUseCase.java index a3769755..f00e2a10 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/RejectVolunteerApplyUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/RejectVolunteerApplyUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; import java.util.UUID; diff --git a/src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java similarity index 54% rename from src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java index 16468b50..a548a00b 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; -import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplySettleRequestDto; import java.util.UUID; public interface SettleVolunteerApplyFacadeUseCase { diff --git a/src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java new file mode 100644 index 00000000..d2a7e889 --- /dev/null +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java @@ -0,0 +1,19 @@ +package com.somemore.domains.volunteerapply.usecase; + +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; + +import java.util.UUID; +import org.springframework.data.domain.Page; + +public interface VolunteerApplyQueryFacadeUseCase { + + Page getVolunteerAppliesByRecruitIdAndCenterId( + Long recruitId, + UUID centerId, VolunteerApplySearchCondition condition); + + Page getVolunteerAppliesByVolunteerId(UUID volunteerId, + VolunteerApplySearchCondition condition); + +} diff --git a/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryUseCase.java similarity index 60% rename from src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryUseCase.java index f23019b6..451d680b 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/VolunteerApplyQueryUseCase.java @@ -1,9 +1,10 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; + +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; import java.util.List; import java.util.UUID; import org.springframework.data.domain.Page; @@ -17,7 +18,7 @@ public interface VolunteerApplyQueryUseCase { VolunteerApplySummaryResponseDto getSummaryByRecruitId(Long recruitId); VolunteerApplyResponseDto getVolunteerApplyByRecruitIdAndVolunteerId(Long recruitId, - UUID volunteerId); + UUID volunteerId); Page getAllByRecruitId(Long recruitId, VolunteerApplySearchCondition condition); diff --git a/src/main/java/com/somemore/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java b/src/main/java/com/somemore/domains/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java similarity index 70% rename from src/main/java/com/somemore/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java rename to src/main/java/com/somemore/domains/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java index c80a8062..4a9262b0 100644 --- a/src/main/java/com/somemore/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java +++ b/src/main/java/com/somemore/domains/volunteerapply/usecase/WithdrawVolunteerApplyUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.volunteerapply.usecase; +package com.somemore.domains.volunteerapply.usecase; import java.util.UUID; diff --git a/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java b/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java index d122a5c5..56adb259 100644 --- a/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java +++ b/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java @@ -5,7 +5,7 @@ import com.somemore.global.auth.jwt.domain.TokenType; import com.somemore.global.auth.jwt.domain.UserRole; import com.somemore.global.auth.jwt.usecase.JwtUseCase; -import com.somemore.center.usecase.query.CenterSignUseCase; +import com.somemore.domains.center.usecase.query.CenterSignUseCase; import lombok.RequiredArgsConstructor; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; diff --git a/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java b/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java index 00900f4e..44393913 100644 --- a/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java +++ b/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java @@ -7,7 +7,7 @@ import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.global.auth.oauth.naver.service.query.ProcessNaverOAuthUserService; import com.somemore.global.auth.redirect.RedirectUseCase; -import com.somemore.volunteer.usecase.VolunteerQueryUseCase; +import com.somemore.domains.volunteer.usecase.VolunteerQueryUseCase; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java b/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java index f4398060..7331b98f 100644 --- a/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) public record NaverUserProfileResponseDto( diff --git a/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java index a25d8871..05814e5c 100644 --- a/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java @@ -4,7 +4,7 @@ import com.somemore.global.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; import com.somemore.global.auth.oauth.naver.usecase.command.RegisterNaverUserUseCase; import com.somemore.global.auth.oauth.naver.util.OAuthResponseConverter; -import com.somemore.volunteer.usecase.RegisterVolunteerUseCase; +import com.somemore.domains.volunteer.usecase.RegisterVolunteerUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.oauth2.core.user.OAuth2User; diff --git a/src/main/java/com/somemore/global/common/event/ServerEventType.java b/src/main/java/com/somemore/global/common/event/ServerEventType.java index 4bbebfff..1dad9435 100644 --- a/src/main/java/com/somemore/global/common/event/ServerEventType.java +++ b/src/main/java/com/somemore/global/common/event/ServerEventType.java @@ -1,6 +1,6 @@ package com.somemore.global.common.event; -import com.somemore.notification.domain.NotificationSubType; +import com.somemore.domains.notification.domain.NotificationSubType; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/global/redis/registrar/RedisListenerRegistrar.java b/src/main/java/com/somemore/global/redis/registrar/RedisListenerRegistrar.java index f03e689a..196b96c1 100644 --- a/src/main/java/com/somemore/global/redis/registrar/RedisListenerRegistrar.java +++ b/src/main/java/com/somemore/global/redis/registrar/RedisListenerRegistrar.java @@ -1,7 +1,7 @@ package com.somemore.global.redis.registrar; -import com.somemore.interestcenter.event.subscriber.RedisCreateRecruitBoardSubscriber; -import com.somemore.notification.event.subscriber.RedisNotificationSubscriber; +import com.somemore.domains.interestcenter.event.subscriber.RedisCreateRecruitBoardSubscriber; +import com.somemore.domains.notification.event.subscriber.RedisNotificationSubscriber; import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandler.java b/src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandler.java deleted file mode 100644 index ecd9d6eb..00000000 --- a/src/main/java/com/somemore/interestcenter/event/handler/CreateRecruitBoardHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.somemore.interestcenter.event.handler; - -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; - -public interface CreateRecruitBoardHandler { - - void handle(CreateRecruitBoardEvent event); - -} diff --git a/src/main/java/com/somemore/interestcenter/usecase/RegisterInterestCenterUseCase.java b/src/main/java/com/somemore/interestcenter/usecase/RegisterInterestCenterUseCase.java deleted file mode 100644 index b6864784..00000000 --- a/src/main/java/com/somemore/interestcenter/usecase/RegisterInterestCenterUseCase.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.somemore.interestcenter.usecase; - -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import java.util.UUID; - -public interface RegisterInterestCenterUseCase { - RegisterInterestCenterResponseDto registerInterestCenter(UUID volunteerId, RegisterInterestCenterRequestDto requestDto); -} diff --git a/src/main/java/com/somemore/location/usecase/command/CreateLocationUseCase.java b/src/main/java/com/somemore/location/usecase/command/CreateLocationUseCase.java deleted file mode 100644 index 199cf4f1..00000000 --- a/src/main/java/com/somemore/location/usecase/command/CreateLocationUseCase.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.somemore.location.usecase.command; - -import com.somemore.location.dto.request.LocationCreateRequestDto; - -public interface CreateLocationUseCase { - - Long createLocation(LocationCreateRequestDto requestDto); - -} diff --git a/src/main/java/com/somemore/location/usecase/command/UpdateLocationUseCase.java b/src/main/java/com/somemore/location/usecase/command/UpdateLocationUseCase.java deleted file mode 100644 index b1e776b8..00000000 --- a/src/main/java/com/somemore/location/usecase/command/UpdateLocationUseCase.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.somemore.location.usecase.command; - -import com.somemore.location.dto.request.LocationUpdateRequestDto; - -public interface UpdateLocationUseCase { - - void updateLocation(LocationUpdateRequestDto requestDto, Long locationId); -} diff --git a/src/main/java/com/somemore/location/usecase/query/LocationQueryUseCase.java b/src/main/java/com/somemore/location/usecase/query/LocationQueryUseCase.java deleted file mode 100644 index e2b45723..00000000 --- a/src/main/java/com/somemore/location/usecase/query/LocationQueryUseCase.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.somemore.location.usecase.query; - -import com.somemore.location.domain.Location; - -public interface LocationQueryUseCase { - - Location getById(Long id); - -} diff --git a/src/main/java/com/somemore/notification/event/handler/NotificationHandler.java b/src/main/java/com/somemore/notification/event/handler/NotificationHandler.java deleted file mode 100644 index 0f2cbeb0..00000000 --- a/src/main/java/com/somemore/notification/event/handler/NotificationHandler.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.somemore.notification.event.handler; - -import com.somemore.notification.domain.Notification; - -public interface NotificationHandler { - - void handle(Notification notification); -} diff --git a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithCenter.java b/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithCenter.java deleted file mode 100644 index 28afb01e..00000000 --- a/src/main/java/com/somemore/recruitboard/repository/mapper/RecruitBoardWithCenter.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.somemore.recruitboard.repository.mapper; - -import com.somemore.recruitboard.domain.RecruitBoard; - -public record RecruitBoardWithCenter( - RecruitBoard recruitBoard, - String centerName -) { - -} diff --git a/src/main/java/com/somemore/volunteer/usecase/RegisterVolunteerUseCase.java b/src/main/java/com/somemore/volunteer/usecase/RegisterVolunteerUseCase.java deleted file mode 100644 index 0e90d980..00000000 --- a/src/main/java/com/somemore/volunteer/usecase/RegisterVolunteerUseCase.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.somemore.volunteer.usecase; - -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; - -public interface RegisterVolunteerUseCase { - void registerVolunteer(VolunteerRegisterRequestDto dto); -} diff --git a/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java b/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java deleted file mode 100644 index 6a00e71f..00000000 --- a/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.somemore.volunteerapply.usecase; - -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import java.util.UUID; -import org.springframework.data.domain.Page; - -public interface VolunteerApplyQueryFacadeUseCase { - - Page getVolunteerAppliesByRecruitIdAndCenterId( - Long recruitId, - UUID centerId, VolunteerApplySearchCondition condition); - - Page getVolunteerAppliesByVolunteerId(UUID volunteerId, - VolunteerApplySearchCondition condition); - -} diff --git a/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java b/src/test/java/com/somemore/domains/center/controller/CenterProfileCommandApiControllerTest.java similarity index 95% rename from src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/center/controller/CenterProfileCommandApiControllerTest.java index 5bbac1a9..ef0ee432 100644 --- a/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/center/controller/CenterProfileCommandApiControllerTest.java @@ -1,11 +1,11 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.usecase.command.UpdateCenterProfileUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; -import com.somemore.center.usecase.command.UpdateCenterProfileUseCase; -import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java b/src/test/java/com/somemore/domains/center/controller/CenterQueryApiControllerTest.java similarity index 95% rename from src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/center/controller/CenterQueryApiControllerTest.java index 15471fbd..a67d5c9f 100644 --- a/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/center/controller/CenterQueryApiControllerTest.java @@ -1,9 +1,9 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; -import com.somemore.support.ControllerTestSupport; -import com.somemore.center.dto.response.CenterProfileResponseDto; -import com.somemore.center.usecase.query.CenterQueryUseCase; +import com.somemore.domains.center.dto.response.CenterProfileResponseDto; +import com.somemore.domains.center.usecase.query.CenterQueryUseCase; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.ControllerTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -16,9 +16,9 @@ import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; import static org.mockito.Mockito.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; class CenterQueryApiControllerTest extends ControllerTestSupport { diff --git a/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java b/src/test/java/com/somemore/domains/center/controller/PreferItemCommandApiControllerTest.java similarity index 94% rename from src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/center/controller/PreferItemCommandApiControllerTest.java index 5490f39d..398aeee8 100644 --- a/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/center/controller/PreferItemCommandApiControllerTest.java @@ -1,12 +1,12 @@ -package com.somemore.center.controller; +package com.somemore.domains.center.controller; +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.dto.response.PreferItemCreateResponseDto; +import com.somemore.domains.center.usecase.command.CreatePreferItemUseCase; +import com.somemore.domains.center.usecase.command.DeletePreferItemUseCase; +import com.somemore.global.exception.BadRequestException; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.dto.response.PreferItemCreateResponseDto; -import com.somemore.center.usecase.command.CreatePreferItemUseCase; -import com.somemore.center.usecase.command.DeletePreferItemUseCase; -import com.somemore.global.exception.BadRequestException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/src/test/java/com/somemore/center/domain/CenterTest.java b/src/test/java/com/somemore/domains/center/domain/CenterTest.java similarity index 93% rename from src/test/java/com/somemore/center/domain/CenterTest.java rename to src/test/java/com/somemore/domains/center/domain/CenterTest.java index bed4b858..b7b9bf80 100644 --- a/src/test/java/com/somemore/center/domain/CenterTest.java +++ b/src/test/java/com/somemore/domains/center/domain/CenterTest.java @@ -1,10 +1,10 @@ -package com.somemore.center.domain; +package com.somemore.domains.center.domain; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertAll; class CenterTest { diff --git a/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java b/src/test/java/com/somemore/domains/center/repository/CenterRepositoryTest.java similarity index 96% rename from src/test/java/com/somemore/center/repository/CenterRepositoryTest.java rename to src/test/java/com/somemore/domains/center/repository/CenterRepositoryTest.java index 3ef0b2d4..557f8520 100644 --- a/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java +++ b/src/test/java/com/somemore/domains/center/repository/CenterRepositoryTest.java @@ -1,8 +1,8 @@ -package com.somemore.center.repository; +package com.somemore.domains.center.repository; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; import jakarta.transaction.Transactional; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java b/src/test/java/com/somemore/domains/center/repository/PreferItemRepositoryTest.java similarity index 87% rename from src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java rename to src/test/java/com/somemore/domains/center/repository/PreferItemRepositoryTest.java index e19d91f0..98f6bf0c 100644 --- a/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java +++ b/src/test/java/com/somemore/domains/center/repository/PreferItemRepositoryTest.java @@ -1,9 +1,9 @@ -package com.somemore.center.repository; +package com.somemore.domains.center.repository; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.repository.preferitem.PreferItemJpaRepository; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.repository.preferitem.PreferItemJpaRepository; -import com.somemore.center.repository.preferitem.PreferItemRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java b/src/test/java/com/somemore/domains/center/service/command/CreatePreferItemServiceTest.java similarity index 86% rename from src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java rename to src/test/java/com/somemore/domains/center/service/command/CreatePreferItemServiceTest.java index d66a8b2d..f8bcef24 100644 --- a/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/command/CreatePreferItemServiceTest.java @@ -1,13 +1,13 @@ -package com.somemore.center.service.command; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.repository.preferitem.PreferItemJpaRepository; -import com.somemore.center.repository.preferitem.PreferItemRepository; +package com.somemore.domains.center.service.command; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.repository.preferitem.PreferItemJpaRepository; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import jakarta.transaction.Transactional; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java b/src/test/java/com/somemore/domains/center/service/command/DeletePreferItemServiceTest.java similarity index 88% rename from src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java rename to src/test/java/com/somemore/domains/center/service/command/DeletePreferItemServiceTest.java index da884ecc..dc427f1d 100644 --- a/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/command/DeletePreferItemServiceTest.java @@ -1,13 +1,13 @@ -package com.somemore.center.service.command; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.request.PreferItemCreateRequestDto; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.repository.preferitem.PreferItemJpaRepository; -import com.somemore.center.repository.preferitem.PreferItemRepository; +package com.somemore.domains.center.service.command; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.request.PreferItemCreateRequestDto; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.repository.preferitem.PreferItemJpaRepository; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java b/src/test/java/com/somemore/domains/center/service/command/UpdateCenterProfileServiceTest.java similarity index 86% rename from src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java rename to src/test/java/com/somemore/domains/center/service/command/UpdateCenterProfileServiceTest.java index 2eabf6f1..894ffe05 100644 --- a/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/command/UpdateCenterProfileServiceTest.java @@ -1,10 +1,10 @@ -package com.somemore.center.service.command; +package com.somemore.domains.center.service.command; -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; -import com.somemore.center.repository.center.CenterRepository; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.dto.request.CenterProfileUpdateRequestDto; +import com.somemore.domains.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -13,9 +13,10 @@ import java.util.UUID; -import static com.somemore.support.fixture.CenterFixture.createCenter; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; -import static org.assertj.core.api.Assertions.*; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @Transactional class UpdateCenterProfileServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java b/src/test/java/com/somemore/domains/center/service/query/CenterQueryServiceTest.java similarity index 90% rename from src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java rename to src/test/java/com/somemore/domains/center/service/query/CenterQueryServiceTest.java index 29dc914e..4b8c509f 100644 --- a/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/query/CenterQueryServiceTest.java @@ -1,15 +1,15 @@ -package com.somemore.center.service.query; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.repository.mapper.CenterOverviewInfo; -import com.somemore.center.dto.response.CenterProfileResponseDto; -import com.somemore.center.repository.center.CenterJpaRepository; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.center.repository.preferitem.PreferItemJpaRepository; +package com.somemore.domains.center.service.query; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.response.CenterProfileResponseDto; +import com.somemore.domains.center.repository.center.CenterJpaRepository; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.center.repository.mapper.CenterOverviewInfo; +import com.somemore.domains.center.repository.preferitem.PreferItemJpaRepository; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; +import com.somemore.support.IntegrationTestSupport; import jakarta.transaction.Transactional; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java b/src/test/java/com/somemore/domains/center/service/query/CenterSignServiceTest.java similarity index 92% rename from src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java rename to src/test/java/com/somemore/domains/center/service/query/CenterSignServiceTest.java index 73fdc170..cd3b3342 100644 --- a/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/query/CenterSignServiceTest.java @@ -1,10 +1,10 @@ -package com.somemore.center.service.query; +package com.somemore.domains.center.service.query; -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterJpaRepository; -import com.somemore.center.repository.center.CenterRepository; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterJpaRepository; +import com.somemore.domains.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/center/service/query/PreferItemQueryServiceTest.java b/src/test/java/com/somemore/domains/center/service/query/PreferItemQueryServiceTest.java similarity index 90% rename from src/test/java/com/somemore/center/service/query/PreferItemQueryServiceTest.java rename to src/test/java/com/somemore/domains/center/service/query/PreferItemQueryServiceTest.java index fe865312..16634b98 100644 --- a/src/test/java/com/somemore/center/service/query/PreferItemQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/center/service/query/PreferItemQueryServiceTest.java @@ -1,8 +1,8 @@ -package com.somemore.center.service.query; +package com.somemore.domains.center.service.query; -import com.somemore.center.domain.PreferItem; -import com.somemore.center.dto.response.PreferItemResponseDto; -import com.somemore.center.repository.preferitem.PreferItemRepository; +import com.somemore.domains.center.domain.PreferItem; +import com.somemore.domains.center.dto.response.PreferItemResponseDto; +import com.somemore.domains.center.repository.preferitem.PreferItemRepository; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java b/src/test/java/com/somemore/domains/community/controller/CommunityBoardCommandApiControllerTest.java similarity index 93% rename from src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/community/controller/CommunityBoardCommandApiControllerTest.java index bfd6a8cf..1f93d0b4 100644 --- a/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/community/controller/CommunityBoardCommandApiControllerTest.java @@ -1,26 +1,14 @@ -package com.somemore.community.controller; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.BDDMockito.given; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.community.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; +import com.somemore.domains.community.usecase.board.DeleteCommunityBoardUseCase; +import com.somemore.domains.community.usecase.board.UpdateCommunityBoardUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; -import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; -import com.somemore.community.usecase.board.UpdateCommunityBoardUseCase; -import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -32,6 +20,19 @@ import org.springframework.test.web.servlet.request.MockMultipartHttpServletRequestBuilder; import org.springframework.test.web.servlet.request.RequestPostProcessor; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.BDDMockito.given; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + public class CommunityBoardCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java b/src/test/java/com/somemore/domains/community/controller/CommunityBoardQueryApiControllerTest.java similarity index 93% rename from src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/community/controller/CommunityBoardQueryApiControllerTest.java index 9bc35063..351567ff 100644 --- a/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/community/controller/CommunityBoardQueryApiControllerTest.java @@ -1,21 +1,9 @@ -package com.somemore.community.controller; - -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.community.controller; +import com.somemore.domains.community.dto.response.CommunityBoardDetailResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardResponseDto; +import com.somemore.domains.community.usecase.board.CommunityBoardQueryUseCase; import com.somemore.support.ControllerTestSupport; -import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; -import com.somemore.community.dto.response.CommunityBoardResponseDto; -//import com.somemore.community.usecase.board.CommunityBoardDocumentUseCase; -import com.somemore.community.usecase.board.CommunityBoardQueryUseCase; -import java.util.Collections; -import java.util.UUID; - import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -25,6 +13,18 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import java.util.Collections; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + public class CommunityBoardQueryApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java b/src/test/java/com/somemore/domains/community/controller/CommunityCommentCommandApiControllerTest.java similarity index 88% rename from src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/community/controller/CommunityCommentCommandApiControllerTest.java index 1e30a765..e6dc7f24 100644 --- a/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/community/controller/CommunityCommentCommandApiControllerTest.java @@ -1,22 +1,13 @@ -package com.somemore.community.controller; - -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.community.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.usecase.comment.CreateCommunityCommentUseCase; +import com.somemore.domains.community.usecase.comment.DeleteCommunityCommentUseCase; +import com.somemore.domains.community.usecase.comment.UpdateCommunityCommentUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; -import com.somemore.community.usecase.comment.CreateCommunityCommentUseCase; -import com.somemore.community.usecase.comment.DeleteCommunityCommentUseCase; -import com.somemore.community.usecase.comment.UpdateCommunityCommentUseCase; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -24,6 +15,17 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.BDDMockito.given; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + public class CommunityCommentCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java b/src/test/java/com/somemore/domains/community/controller/CommunityCommentQueryApiControllerTest.java similarity index 86% rename from src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/community/controller/CommunityCommentQueryApiControllerTest.java index 0e4bf7b2..7cc43303 100644 --- a/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/community/controller/CommunityCommentQueryApiControllerTest.java @@ -1,18 +1,8 @@ -package com.somemore.community.controller; - -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.community.controller; +import com.somemore.domains.community.dto.response.CommunityCommentResponseDto; +import com.somemore.domains.community.usecase.comment.CommunityCommentQueryUseCase; import com.somemore.support.ControllerTestSupport; -import com.somemore.community.dto.response.CommunityCommentResponseDto; -import java.util.Collections; - -import com.somemore.community.usecase.comment.CommunityCommentQueryUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +12,17 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import java.util.Collections; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + public class CommunityCommentQueryApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java b/src/test/java/com/somemore/domains/community/repository/CommunityBoardDocumentRepositoryTest.java similarity index 100% rename from src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java rename to src/test/java/com/somemore/domains/community/repository/CommunityBoardDocumentRepositoryTest.java diff --git a/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java b/src/test/java/com/somemore/domains/community/repository/CommunityBoardRepositoryTest.java similarity index 94% rename from src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java rename to src/test/java/com/somemore/domains/community/repository/CommunityBoardRepositoryTest.java index b84500fc..ceebf242 100644 --- a/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java +++ b/src/test/java/com/somemore/domains/community/repository/CommunityBoardRepositoryTest.java @@ -1,12 +1,12 @@ -package com.somemore.community.repository; +package com.somemore.domains.community.repository; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.mapper.CommunityBoardView; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.repository.mapper.CommunityBoardView; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -16,11 +16,10 @@ import org.springframework.data.domain.Pageable; import org.springframework.transaction.annotation.Transactional; -import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; - import java.util.Optional; import java.util.UUID; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; import static org.assertj.core.api.Assertions.assertThat; @Transactional diff --git a/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java b/src/test/java/com/somemore/domains/community/repository/CommunityCommentRepositoryTest.java similarity index 89% rename from src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java rename to src/test/java/com/somemore/domains/community/repository/CommunityCommentRepositoryTest.java index 3b244481..7225fa53 100644 --- a/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java +++ b/src/test/java/com/somemore/domains/community/repository/CommunityCommentRepositoryTest.java @@ -1,14 +1,14 @@ -package com.somemore.community.repository; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.community.repository; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.repository.mapper.CommunityCommentView; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.repository.mapper.CommunityCommentView; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -21,9 +21,9 @@ import java.util.Optional; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; import static com.somemore.support.fixture.CommunityCommentFixture.createCommunityComment; +import static org.assertj.core.api.Assertions.assertThat; @Transactional class CommunityCommentRepositoryTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java b/src/test/java/com/somemore/domains/community/scheduler/CommunityBoardUpdateSchedulerTest.java similarity index 100% rename from src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java rename to src/test/java/com/somemore/domains/community/scheduler/CommunityBoardUpdateSchedulerTest.java diff --git a/src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java b/src/test/java/com/somemore/domains/community/service/board/CommunityBoardDocumentServiceTest.java similarity index 100% rename from src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java rename to src/test/java/com/somemore/domains/community/service/board/CommunityBoardDocumentServiceTest.java diff --git a/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java b/src/test/java/com/somemore/domains/community/service/board/CommunityBoardQueryServiceTest.java similarity index 90% rename from src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java rename to src/test/java/com/somemore/domains/community/service/board/CommunityBoardQueryServiceTest.java index 9ca304f9..d594862b 100644 --- a/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/board/CommunityBoardQueryServiceTest.java @@ -1,18 +1,18 @@ -package com.somemore.community.service.board; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.community.service.board; + +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.response.CommunityBoardDetailResponseDto; +import com.somemore.domains.community.dto.response.CommunityBoardResponseDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; +import com.somemore.domains.community.usecase.board.DeleteCommunityBoardUseCase; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; -import com.somemore.community.dto.response.CommunityBoardResponseDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; -import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -23,11 +23,10 @@ import java.util.UUID; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; - class CommunityBoardQueryServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java b/src/test/java/com/somemore/domains/community/service/board/CreateCommunityBoardServiceTest.java similarity index 91% rename from src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java rename to src/test/java/com/somemore/domains/community/service/board/CreateCommunityBoardServiceTest.java index 60a807e0..ed86644a 100644 --- a/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/board/CreateCommunityBoardServiceTest.java @@ -1,11 +1,9 @@ -package com.somemore.community.service.board; - -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.community.service.board; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -14,6 +12,8 @@ import java.util.Optional; import java.util.UUID; +import static org.assertj.core.api.Assertions.assertThat; + class CreateCommunityBoardServiceTest extends IntegrationTestSupport { @Autowired private CreateCommunityBoardService createCommunityBoardService; diff --git a/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java b/src/test/java/com/somemore/domains/community/service/board/DeleteCommunityBoardServiceTest.java similarity index 89% rename from src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java rename to src/test/java/com/somemore/domains/community/service/board/DeleteCommunityBoardServiceTest.java index ce40aaec..0d7a03d5 100644 --- a/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/board/DeleteCommunityBoardServiceTest.java @@ -1,15 +1,12 @@ -package com.somemore.community.service.board; +package com.somemore.domains.community.service.board; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; -import com.somemore.community.usecase.board.CommunityBoardQueryUseCase; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.CommunityBoardQueryUseCase; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -19,6 +16,9 @@ import java.util.UUID; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; + class DeleteCommunityBoardServiceTest extends IntegrationTestSupport { @Autowired private DeleteCommunityBoardService deleteCommunityBoardService; diff --git a/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java b/src/test/java/com/somemore/domains/community/service/board/UpdateCommunityBoardServiceTest.java similarity index 89% rename from src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java rename to src/test/java/com/somemore/domains/community/service/board/UpdateCommunityBoardServiceTest.java index 43b7288b..0ff5a7fe 100644 --- a/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/board/UpdateCommunityBoardServiceTest.java @@ -1,16 +1,13 @@ -package com.somemore.community.service.board; +package com.somemore.domains.community.service.board; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityBoardUpdateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.usecase.board.CreateCommunityBoardUseCase; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -21,6 +18,9 @@ import java.util.Optional; import java.util.UUID; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; + class UpdateCommunityBoardServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java b/src/test/java/com/somemore/domains/community/service/comment/CommunityCommentQueryServiceTest.java similarity index 88% rename from src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java rename to src/test/java/com/somemore/domains/community/service/comment/CommunityCommentQueryServiceTest.java index 2e2b0d4d..2b18bf8e 100644 --- a/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/comment/CommunityCommentQueryServiceTest.java @@ -1,15 +1,15 @@ -package com.somemore.community.service.comment; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.community.service.comment; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.response.CommunityCommentResponseDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; +import com.somemore.domains.community.usecase.comment.DeleteCommunityCommentUseCase; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.response.CommunityCommentResponseDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; -import com.somemore.community.usecase.comment.DeleteCommunityCommentUseCase; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -19,9 +19,9 @@ import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; import static com.somemore.support.fixture.CommunityCommentFixture.createCommunityComment; +import static org.assertj.core.api.Assertions.assertThat; class CommunityCommentQueryServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java b/src/test/java/com/somemore/domains/community/service/comment/CreateCommunityCommentServiceTest.java similarity index 91% rename from src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java rename to src/test/java/com/somemore/domains/community/service/comment/CreateCommunityCommentServiceTest.java index 529bc68b..9019228c 100644 --- a/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/comment/CreateCommunityCommentServiceTest.java @@ -1,13 +1,13 @@ -package com.somemore.community.service.comment; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; +package com.somemore.domains.community.service.comment; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java b/src/test/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentServiceTest.java similarity index 87% rename from src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java rename to src/test/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentServiceTest.java index 35ecc311..aec187f8 100644 --- a/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/comment/DeleteCommunityCommentServiceTest.java @@ -1,13 +1,13 @@ -package com.somemore.community.service.comment; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; +package com.somemore.domains.community.service.comment; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java b/src/test/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentServiceTest.java similarity index 87% rename from src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java rename to src/test/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentServiceTest.java index 6931ca6b..4005631d 100644 --- a/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/domains/community/service/comment/UpdateCommunityCommentServiceTest.java @@ -1,19 +1,14 @@ -package com.somemore.community.service.comment; - -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_COMMUNITY_BOARD; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_COMMUNITY_COMMENT; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.community.domain.CommunityBoard; -import com.somemore.community.domain.CommunityComment; -import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; -import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; -import com.somemore.community.repository.board.CommunityBoardRepository; -import com.somemore.community.repository.comment.CommunityCommentRepository; +package com.somemore.domains.community.service.comment; + +import com.somemore.domains.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityComment; +import com.somemore.domains.community.dto.request.CommunityBoardCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentCreateRequestDto; +import com.somemore.domains.community.dto.request.CommunityCommentUpdateRequestDto; +import com.somemore.domains.community.repository.board.CommunityBoardRepository; +import com.somemore.domains.community.repository.comment.CommunityCommentRepository; import com.somemore.global.exception.BadRequestException; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -24,6 +19,11 @@ import java.util.Optional; import java.util.UUID; +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_COMMUNITY_BOARD; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_COMMUNITY_COMMENT; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; + class UpdateCommunityCommentServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java b/src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiControllerTest.java similarity index 81% rename from src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiControllerTest.java index bb934cc0..a23d14fa 100644 --- a/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterCommandApiControllerTest.java @@ -1,23 +1,25 @@ -package com.somemore.interestcenter.controller; +package com.somemore.domains.interestcenter.controller; +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.usecase.CancelInterestCenterUseCase; +import com.somemore.domains.interestcenter.usecase.RegisterInterestCenterUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import com.somemore.interestcenter.usecase.CancelInterestCenterUseCase; -import com.somemore.interestcenter.usecase.RegisterInterestCenterUseCase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.http.MediaType; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; import java.util.UUID; -import static org.mockito.BDDMockito.given; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.doNothing; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; class InterestCenterCommandApiControllerTest extends ControllerTestSupport { diff --git a/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java b/src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiControllerTest.java similarity index 93% rename from src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiControllerTest.java index fb2464ef..df3628d2 100644 --- a/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/controller/InterestCenterQueryApiControllerTest.java @@ -1,9 +1,9 @@ -package com.somemore.interestcenter.controller; +package com.somemore.domains.interestcenter.controller; +import com.somemore.domains.interestcenter.dto.response.InterestCentersResponseDto; +import com.somemore.domains.interestcenter.usecase.InterestCenterQueryUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; -import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java b/src/test/java/com/somemore/domains/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java similarity index 91% rename from src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java rename to src/test/java/com/somemore/domains/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java index 98531b7c..72867018 100644 --- a/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java @@ -1,10 +1,10 @@ -package com.somemore.interestcenter.converter; +package com.somemore.domains.interestcenter.converter; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.interestcenter.event.converter.CreateRecruitBoardMessageConverter; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import com.somemore.global.common.event.DomainEventSubType; import com.somemore.global.common.event.ServerEventType; -import com.somemore.interestcenter.event.converter.CreateRecruitBoardMessageConverter; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java b/src/test/java/com/somemore/domains/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java similarity index 82% rename from src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java rename to src/test/java/com/somemore/domains/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java index 22a767fc..9a163ef0 100644 --- a/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java @@ -1,11 +1,11 @@ -package com.somemore.interestcenter.handler; +package com.somemore.domains.interestcenter.handler; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; +import com.somemore.domains.interestcenter.event.handler.CreateRecruitBoardHandlerImpl; +import com.somemore.domains.interestcenter.usecase.InterestCenterQueryUseCase; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import com.somemore.global.common.event.ServerEventPublisher; -import com.somemore.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; -import com.somemore.interestcenter.event.handler.CreateRecruitBoardHandlerImpl; -import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; @@ -16,9 +16,7 @@ import java.util.UUID; import static org.mockito.ArgumentMatchers.argThat; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; @Transactional class CreateRecruitBoardHandlerImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java b/src/test/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImplTest.java similarity index 91% rename from src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java rename to src/test/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImplTest.java index 1d3956f2..9b38dbaa 100644 --- a/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/repository/InterestCenterRepositoryImplTest.java @@ -1,16 +1,17 @@ -package com.somemore.interestcenter.repository; - -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.interestcenter.repository; +import com.somemore.domains.interestcenter.domain.InterestCenter; import com.somemore.support.IntegrationTestSupport; -import com.somemore.interestcenter.domain.InterestCenter; -import java.util.Optional; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.Optional; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class InterestCenterRepositoryImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java b/src/test/java/com/somemore/domains/interestcenter/service/CancelInterestCenterServiceTest.java similarity index 83% rename from src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java rename to src/test/java/com/somemore/domains/interestcenter/service/CancelInterestCenterServiceTest.java index 6c64a065..7f3b56d0 100644 --- a/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/service/CancelInterestCenterServiceTest.java @@ -1,15 +1,15 @@ -package com.somemore.interestcenter.service; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; +package com.somemore.domains.interestcenter.service; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; +import com.somemore.domains.interestcenter.usecase.CancelInterestCenterUseCase; +import com.somemore.domains.interestcenter.usecase.RegisterInterestCenterUseCase; import com.somemore.global.exception.BadRequestException; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import com.somemore.interestcenter.repository.InterestCenterRepository; -import com.somemore.interestcenter.usecase.CancelInterestCenterUseCase; -import com.somemore.interestcenter.usecase.RegisterInterestCenterUseCase; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java b/src/test/java/com/somemore/domains/interestcenter/service/InterestCenterQueryServiceTest.java similarity index 91% rename from src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java rename to src/test/java/com/somemore/domains/interestcenter/service/InterestCenterQueryServiceTest.java index b542aada..ebba619b 100644 --- a/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/service/InterestCenterQueryServiceTest.java @@ -1,12 +1,12 @@ -package com.somemore.interestcenter.service; - +package com.somemore.domains.interestcenter.service; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterJpaRepository; +import com.somemore.domains.interestcenter.domain.InterestCenter; +import com.somemore.domains.interestcenter.dto.response.InterestCentersResponseDto; +import com.somemore.domains.interestcenter.repository.InterestCenterJpaRepository; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterJpaRepository; -import com.somemore.interestcenter.domain.InterestCenter; -import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; -import com.somemore.interestcenter.repository.InterestCenterJpaRepository; -import com.somemore.interestcenter.repository.InterestCenterRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java b/src/test/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterServiceTest.java similarity index 88% rename from src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java rename to src/test/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterServiceTest.java index 333fb2a2..2c84a724 100644 --- a/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/service/RegisterInterestCenterServiceTest.java @@ -1,14 +1,14 @@ -package com.somemore.interestcenter.service; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; +package com.somemore.domains.interestcenter.service; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.interestcenter.dto.request.RegisterInterestCenterRequestDto; +import com.somemore.domains.interestcenter.dto.response.RegisterInterestCenterResponseDto; +import com.somemore.domains.interestcenter.repository.InterestCenterRepository; +import com.somemore.domains.interestcenter.usecase.RegisterInterestCenterUseCase; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.DuplicateException; -import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; -import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; -import com.somemore.interestcenter.repository.InterestCenterRepository; -import com.somemore.interestcenter.usecase.RegisterInterestCenterUseCase; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java b/src/test/java/com/somemore/domains/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java similarity index 78% rename from src/test/java/com/somemore/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java rename to src/test/java/com/somemore/domains/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java index 458345df..46f6b6e5 100644 --- a/src/test/java/com/somemore/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java +++ b/src/test/java/com/somemore/domains/interestcenter/subscriber/RedisCreateRecruitBoardSubscriberTest.java @@ -1,9 +1,9 @@ -package com.somemore.interestcenter.subscriber; +package com.somemore.domains.interestcenter.subscriber; -import com.somemore.interestcenter.event.converter.CreateRecruitBoardMessageConverter; -import com.somemore.interestcenter.event.subscriber.RedisCreateRecruitBoardSubscriber; -import com.somemore.interestcenter.event.handler.CreateRecruitBoardHandler; -import com.somemore.recruitboard.event.CreateRecruitBoardEvent; +import com.somemore.domains.interestcenter.event.converter.CreateRecruitBoardMessageConverter; +import com.somemore.domains.interestcenter.event.handler.CreateRecruitBoardHandler; +import com.somemore.domains.interestcenter.event.subscriber.RedisCreateRecruitBoardSubscriber; +import com.somemore.domains.recruitboard.event.CreateRecruitBoardEvent; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; diff --git a/src/test/java/com/somemore/location/domain/LocationTest.java b/src/test/java/com/somemore/domains/location/domain/LocationTest.java similarity index 94% rename from src/test/java/com/somemore/location/domain/LocationTest.java rename to src/test/java/com/somemore/domains/location/domain/LocationTest.java index 4d698e05..30b6872c 100644 --- a/src/test/java/com/somemore/location/domain/LocationTest.java +++ b/src/test/java/com/somemore/domains/location/domain/LocationTest.java @@ -1,13 +1,14 @@ -package com.somemore.location.domain; +package com.somemore.domains.location.domain; -import static java.math.RoundingMode.HALF_UP; -import static org.assertj.core.api.Assertions.assertThat; - -import com.somemore.location.dto.request.LocationUpdateRequestDto; -import java.math.BigDecimal; +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import java.math.BigDecimal; + +import static java.math.RoundingMode.HALF_UP; +import static org.assertj.core.api.Assertions.assertThat; + class LocationTest { @DisplayName("Location 생성시 소수점이 올바르게 반올림된다.") diff --git a/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java b/src/test/java/com/somemore/domains/location/repository/LocationRepositoryTest.java similarity index 95% rename from src/test/java/com/somemore/location/repository/LocationRepositoryTest.java rename to src/test/java/com/somemore/domains/location/repository/LocationRepositoryTest.java index 2f2d19a7..6178f787 100644 --- a/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java +++ b/src/test/java/com/somemore/domains/location/repository/LocationRepositoryTest.java @@ -1,16 +1,17 @@ -package com.somemore.location.repository; - -import static java.math.RoundingMode.HALF_UP; -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.location.repository; +import com.somemore.domains.location.domain.Location; import com.somemore.support.IntegrationTestSupport; -import com.somemore.location.domain.Location; -import java.math.BigDecimal; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; + +import static java.math.RoundingMode.HALF_UP; +import static org.assertj.core.api.Assertions.assertThat; + class LocationRepositoryTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java b/src/test/java/com/somemore/domains/location/service/command/CreateLocationServiceTest.java similarity index 84% rename from src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java rename to src/test/java/com/somemore/domains/location/service/command/CreateLocationServiceTest.java index 6c0d3289..19fd9039 100644 --- a/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java +++ b/src/test/java/com/somemore/domains/location/service/command/CreateLocationServiceTest.java @@ -1,18 +1,19 @@ -package com.somemore.location.service.command; - -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.location.service.command; +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; +import com.somemore.domains.location.repository.LocationRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.location.domain.Location; -import com.somemore.location.dto.request.LocationCreateRequestDto; -import com.somemore.location.repository.LocationRepository; -import java.math.BigDecimal; -import java.util.Optional; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; +import java.util.Optional; + +import static org.assertj.core.api.Assertions.assertThat; + class CreateLocationServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java b/src/test/java/com/somemore/domains/location/service/command/UpdateLocationServiceTest.java similarity index 88% rename from src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java rename to src/test/java/com/somemore/domains/location/service/command/UpdateLocationServiceTest.java index c5cb7f19..9322ae14 100644 --- a/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java +++ b/src/test/java/com/somemore/domains/location/service/command/UpdateLocationServiceTest.java @@ -1,18 +1,19 @@ -package com.somemore.location.service.command; - -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.location.service.command; +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.dto.request.LocationUpdateRequestDto; +import com.somemore.domains.location.repository.LocationRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.location.domain.Location; -import com.somemore.location.dto.request.LocationUpdateRequestDto; -import com.somemore.location.repository.LocationRepository; -import java.math.BigDecimal; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; + +import static org.assertj.core.api.Assertions.assertThat; + class UpdateLocationServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java b/src/test/java/com/somemore/domains/location/service/query/LocationQueryServiceTest.java similarity index 91% rename from src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java rename to src/test/java/com/somemore/domains/location/service/query/LocationQueryServiceTest.java index 36401999..a2cd6427 100644 --- a/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/location/service/query/LocationQueryServiceTest.java @@ -1,20 +1,21 @@ -package com.somemore.location.service.query; +package com.somemore.domains.location.service.query; -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_LOCATION; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.repository.LocationRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.domain.Location; -import com.somemore.location.repository.LocationRepository; -import java.math.BigDecimal; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; + +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_LOCATION; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + class LocationQueryServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java b/src/test/java/com/somemore/domains/note/controller/NoteCommandApiControllerTest.java similarity index 92% rename from src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/note/controller/NoteCommandApiControllerTest.java index 248ab6f7..06122b85 100644 --- a/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/note/controller/NoteCommandApiControllerTest.java @@ -1,11 +1,11 @@ -package com.somemore.note.controller; +package com.somemore.domains.note.controller; +import com.somemore.domains.note.dto.SendNoteToCenterRequestDto; +import com.somemore.domains.note.dto.SendNoteToVolunteerRequestDto; +import com.somemore.domains.note.usecase.SendNoteToCenterUseCase; +import com.somemore.domains.note.usecase.SendNoteToVolunteerUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.note.dto.SendNoteToCenterRequestDto; -import com.somemore.note.dto.SendNoteToVolunteerRequestDto; -import com.somemore.note.usecase.SendNoteToCenterUseCase; -import com.somemore.note.usecase.SendNoteToVolunteerUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java b/src/test/java/com/somemore/domains/note/controller/NoteQueryApiControllerTest.java similarity index 96% rename from src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/note/controller/NoteQueryApiControllerTest.java index 6582b103..d2068326 100644 --- a/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/note/controller/NoteQueryApiControllerTest.java @@ -1,13 +1,13 @@ -package com.somemore.note.controller; +package com.somemore.domains.note.controller; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.note.usecase.NoteQueryUseCase; +import com.somemore.global.exception.NoSuchElementException; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.global.exception.NoSuchElementException; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.note.usecase.NoteQueryUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java b/src/test/java/com/somemore/domains/note/repository/NoteRepositoryImplTest.java similarity index 89% rename from src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java rename to src/test/java/com/somemore/domains/note/repository/NoteRepositoryImplTest.java index 2dba222c..bc6a7547 100644 --- a/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/note/repository/NoteRepositoryImplTest.java @@ -1,15 +1,15 @@ -package com.somemore.note.repository; - +package com.somemore.domains.note.repository; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterJpaRepository; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerJpaRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterJpaRepository; -import com.somemore.note.domain.Note; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerJpaRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java b/src/test/java/com/somemore/domains/note/service/NoteMarkAsReadServiceTest.java similarity index 85% rename from src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java rename to src/test/java/com/somemore/domains/note/service/NoteMarkAsReadServiceTest.java index bc2cfc59..14258a24 100644 --- a/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java +++ b/src/test/java/com/somemore/domains/note/service/NoteMarkAsReadServiceTest.java @@ -1,9 +1,9 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.repository.NoteRepository; import com.somemore.global.exception.NoSuchElementException; -import com.somemore.note.domain.Note; -import com.somemore.note.repository.NoteRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +11,8 @@ import java.util.UUID; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_NOTE; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; class NoteMarkAsReadServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java b/src/test/java/com/somemore/domains/note/service/NoteQueryServiceTest.java similarity index 90% rename from src/test/java/com/somemore/note/service/NoteQueryServiceTest.java rename to src/test/java/com/somemore/domains/note/service/NoteQueryServiceTest.java index 2b225c17..e38ddd42 100644 --- a/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/note/service/NoteQueryServiceTest.java @@ -1,17 +1,17 @@ -package com.somemore.note.service; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterJpaRepository; +package com.somemore.domains.note.service; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterJpaRepository; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.repository.NoteRepository; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteDetailViewForVolunteer; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForCenter; +import com.somemore.domains.note.repository.mapper.NoteReceiverViewForVolunteer; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerJpaRepository; import com.somemore.global.exception.NoSuchElementException; -import com.somemore.note.domain.Note; -import com.somemore.note.repository.NoteRepository; -import com.somemore.note.repository.mapper.NoteDetailViewForCenter; -import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; -import com.somemore.note.repository.mapper.NoteReceiverViewForCenter; -import com.somemore.note.repository.mapper.NoteReceiverViewForVolunteer; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerJpaRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java b/src/test/java/com/somemore/domains/note/service/SendNoteToCenterServiceTest.java similarity index 91% rename from src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java rename to src/test/java/com/somemore/domains/note/service/SendNoteToCenterServiceTest.java index ff71d740..23ab4a79 100644 --- a/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java +++ b/src/test/java/com/somemore/domains/note/service/SendNoteToCenterServiceTest.java @@ -1,12 +1,12 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.dto.SendNoteToCenterRequestDto; +import com.somemore.domains.note.repository.NoteJpaRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.note.domain.Note; -import com.somemore.note.dto.SendNoteToCenterRequestDto; -import com.somemore.note.repository.NoteJpaRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java b/src/test/java/com/somemore/domains/note/service/SendNoteToVolunteerServiceTest.java similarity index 82% rename from src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java rename to src/test/java/com/somemore/domains/note/service/SendNoteToVolunteerServiceTest.java index ff15ce20..4e114e73 100644 --- a/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java +++ b/src/test/java/com/somemore/domains/note/service/SendNoteToVolunteerServiceTest.java @@ -1,11 +1,11 @@ -package com.somemore.note.service; +package com.somemore.domains.note.service; +import com.somemore.domains.note.domain.Note; +import com.somemore.domains.note.dto.SendNoteToVolunteerRequestDto; +import com.somemore.domains.note.repository.NoteJpaRepository; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerJpaRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.note.domain.Note; -import com.somemore.note.dto.SendNoteToVolunteerRequestDto; -import com.somemore.note.repository.NoteJpaRepository; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerJpaRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -14,7 +14,8 @@ import java.util.UUID; import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; @Transactional class SendNoteToVolunteerServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java b/src/test/java/com/somemore/domains/notification/converter/NotificationMessageConverterTest.java similarity index 95% rename from src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java rename to src/test/java/com/somemore/domains/notification/converter/NotificationMessageConverterTest.java index fb06fd02..d32781a3 100644 --- a/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java +++ b/src/test/java/com/somemore/domains/notification/converter/NotificationMessageConverterTest.java @@ -1,9 +1,9 @@ -package com.somemore.notification.converter; +package com.somemore.domains.notification.converter; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.notification.event.converter.NotificationMessageConverter; import com.somemore.support.IntegrationTestSupport; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.notification.event.converter.NotificationMessageConverter; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java b/src/test/java/com/somemore/domains/notification/handler/NotificationHandlerTest.java similarity index 85% rename from src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java rename to src/test/java/com/somemore/domains/notification/handler/NotificationHandlerTest.java index a982fc8a..64ca2350 100644 --- a/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java +++ b/src/test/java/com/somemore/domains/notification/handler/NotificationHandlerTest.java @@ -1,11 +1,11 @@ -package com.somemore.notification.handler; +package com.somemore.domains.notification.handler; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.notification.event.converter.NotificationMessageConverter; +import com.somemore.domains.notification.event.handler.NotificationHandlerImpl; +import com.somemore.domains.notification.repository.NotificationRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.notification.event.converter.NotificationMessageConverter; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.notification.event.handler.NotificationHandlerImpl; -import com.somemore.notification.repository.NotificationRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java b/src/test/java/com/somemore/domains/notification/repository/NotificationRepositoryTest.java similarity index 95% rename from src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java rename to src/test/java/com/somemore/domains/notification/repository/NotificationRepositoryTest.java index d0eb36da..6a5f6ad8 100644 --- a/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java +++ b/src/test/java/com/somemore/domains/notification/repository/NotificationRepositoryTest.java @@ -1,8 +1,8 @@ -package com.somemore.notification.repository; +package com.somemore.domains.notification.repository; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; import com.somemore.support.IntegrationTestSupport; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java b/src/test/java/com/somemore/domains/notification/service/NotificationCommandServiceTest.java similarity index 93% rename from src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java rename to src/test/java/com/somemore/domains/notification/service/NotificationCommandServiceTest.java index 7cf6e878..b704cd17 100644 --- a/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java +++ b/src/test/java/com/somemore/domains/notification/service/NotificationCommandServiceTest.java @@ -1,25 +1,24 @@ -package com.somemore.notification.service; +package com.somemore.domains.notification.service; -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_NOTIFICATION; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_NOTIFICATION; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.notification.dto.NotificationIdsRequestDto; +import com.somemore.domains.notification.repository.NotificationRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.notification.dto.NotificationIdsRequestDto; -import com.somemore.notification.repository.NotificationRepository; - -import java.util.List; -import java.util.UUID; - +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_NOTIFICATION; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_NOTIFICATION; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class NotificationCommandServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java b/src/test/java/com/somemore/domains/notification/service/NotificationQueryServiceTest.java similarity index 90% rename from src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java rename to src/test/java/com/somemore/domains/notification/service/NotificationQueryServiceTest.java index 2167a7d4..dd5683f9 100644 --- a/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/notification/service/NotificationQueryServiceTest.java @@ -1,10 +1,10 @@ -package com.somemore.notification.service; +package com.somemore.domains.notification.service; +import com.somemore.domains.notification.domain.Notification; +import com.somemore.domains.notification.domain.NotificationSubType; +import com.somemore.domains.notification.dto.NotificationResponseDto; +import com.somemore.domains.notification.repository.NotificationRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.notification.domain.Notification; -import com.somemore.notification.domain.NotificationSubType; -import com.somemore.notification.dto.NotificationResponseDto; -import com.somemore.notification.repository.NotificationRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java b/src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiControllerTest.java similarity index 90% rename from src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiControllerTest.java index 541fa650..6218ad2b 100644 --- a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardCommandApiControllerTest.java @@ -1,37 +1,18 @@ -package com.somemore.recruitboard.controller; - -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; -import static com.somemore.recruitboard.domain.VolunteerCategory.*; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.BDDMockito.given; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.recruitboard.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardCreateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; +import com.somemore.domains.recruitboard.usecase.command.CreateRecruitBoardUseCase; +import com.somemore.domains.recruitboard.usecase.command.DeleteRecruitBoardUseCase; +import com.somemore.domains.recruitboard.usecase.command.UpdateRecruitBoardUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.location.dto.request.LocationCreateRequestDto; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; -import com.somemore.recruitboard.usecase.command.CreateRecruitBoardUseCase; -import com.somemore.recruitboard.usecase.command.DeleteRecruitBoardUseCase; -import com.somemore.recruitboard.usecase.command.UpdateRecruitBoardUseCase; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -43,6 +24,23 @@ import org.springframework.test.web.servlet.request.MockMultipartHttpServletRequestBuilder; import org.springframework.test.web.servlet.request.RequestPostProcessor; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.RecruitStatus.CLOSED; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.BDDMockito.given; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class RecruitBoardCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java b/src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiControllerTest.java similarity index 88% rename from src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiControllerTest.java index dab35e54..c499427f 100644 --- a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardQueryApiControllerTest.java @@ -1,25 +1,13 @@ -package com.somemore.recruitboard.controller; - -import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - +package com.somemore.domains.recruitboard.controller; + +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardDetailResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; import com.somemore.support.ControllerTestSupport; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import java.util.Collections; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +17,17 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import java.util.Collections; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class RecruitBoardQueryApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java b/src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardSearchApiControllerTest.java similarity index 100% rename from src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java rename to src/test/java/com/somemore/domains/recruitboard/controller/RecruitBoardSearchApiControllerTest.java diff --git a/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java b/src/test/java/com/somemore/domains/recruitboard/domain/RecruitBoardTest.java similarity index 91% rename from src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java rename to src/test/java/com/somemore/domains/recruitboard/domain/RecruitBoardTest.java index 16c29a37..0b3d924f 100644 --- a/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/domain/RecruitBoardTest.java @@ -1,25 +1,22 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; -import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; -import static com.somemore.recruitboard.domain.RecruitStatus.COMPLETED; -import static com.somemore.recruitboard.domain.RecruitStatus.RECRUITING; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.util.UUID; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.RecruitStatus.*; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.support.fixture.LocalDateTimeFixture.*; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + class RecruitBoardTest { @DisplayName("봉사 모집글 생성시 모집상태는 모집중이다") diff --git a/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java b/src/test/java/com/somemore/domains/recruitboard/domain/RecruitmentInfoTest.java similarity index 94% rename from src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java rename to src/test/java/com/somemore/domains/recruitboard/domain/RecruitmentInfoTest.java index b692cc15..079be5c4 100644 --- a/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/domain/RecruitmentInfoTest.java @@ -1,20 +1,19 @@ -package com.somemore.recruitboard.domain; +package com.somemore.domains.recruitboard.domain; -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; -import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static com.somemore.recruitboard.domain.VolunteerCategory.SAFETY_PREVENTION; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import java.time.LocalDateTime; -import java.time.LocalTime; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import java.time.LocalDateTime; +import java.time.LocalTime; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.*; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + class RecruitmentInfoTest { @DisplayName("봉사 종료 시간이 시작 시간과 같거나 빠르면, 봉사 모집글 생성 시 에러가 발생한다") diff --git a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java b/src/test/java/com/somemore/domains/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java similarity index 100% rename from src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java rename to src/test/java/com/somemore/domains/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java diff --git a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java b/src/test/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImplTest.java similarity index 93% rename from src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java rename to src/test/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImplTest.java index d992f25b..e4066745 100644 --- a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/repository/RecruitBoardRepositoryImplTest.java @@ -1,32 +1,18 @@ -package com.somemore.recruitboard.repository; - -import static com.somemore.support.fixture.CenterFixture.createCenter; -import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.support.fixture.LocationFixture.createLocation; -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; -import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; -import static org.assertj.core.api.Assertions.assertThat; - +package com.somemore.domains.recruitboard.repository; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardDetail; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithCenter; +import com.somemore.domains.recruitboard.repository.mapper.RecruitBoardWithLocation; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.location.domain.Location; -import com.somemore.location.repository.LocationRepository; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.repository.mapper.RecruitBoardDetail; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; -import com.somemore.recruitboard.repository.mapper.RecruitBoardWithLocation; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -37,6 +23,21 @@ import org.springframework.data.domain.Sort; import org.springframework.transaction.annotation.Transactional; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.RecruitStatus.CLOSED; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocationFixture.createLocation; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class RecruitBoardRepositoryImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java b/src/test/java/com/somemore/domains/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java similarity index 100% rename from src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java rename to src/test/java/com/somemore/domains/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java diff --git a/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java b/src/test/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardServiceTest.java similarity index 82% rename from src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java rename to src/test/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardServiceTest.java index 1fa931a9..3f92e73f 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/service/command/CreateRecruitBoardServiceTest.java @@ -1,25 +1,26 @@ -package com.somemore.recruitboard.service.command; - -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static org.assertj.core.api.Assertions.assertThat; - +package com.somemore.domains.recruitboard.service.command; + +import com.somemore.domains.location.dto.request.LocationCreateRequestDto; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardCreateRequestDto; +import com.somemore.domains.recruitboard.repository.RecruitBoardJpaRepository; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.location.dto.request.LocationCreateRequestDto; -import com.somemore.location.repository.LocationRepository; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; -import com.somemore.recruitboard.repository.RecruitBoardJpaRepository; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.Optional; -import java.util.UUID; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static org.assertj.core.api.Assertions.assertThat; + class CreateRecruitBoardServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java b/src/test/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardServiceTest.java similarity index 87% rename from src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java rename to src/test/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardServiceTest.java index 6d783ebe..20e0368d 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/service/command/DeleteRecruitBoardServiceTest.java @@ -1,25 +1,26 @@ -package com.somemore.recruitboard.service.command; +package com.somemore.domains.recruitboard.service.command; -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.repository.RecruitBoardJpaRepository; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.repository.RecruitBoardJpaRepository; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import java.time.LocalDateTime; -import java.util.Optional; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.time.LocalDateTime; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + class DeleteRecruitBoardServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java b/src/test/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardServiceTest.java similarity index 88% rename from src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java rename to src/test/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardServiceTest.java index 5873da8d..eca0beac 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/service/command/UpdateRecruitBoardServiceTest.java @@ -1,26 +1,16 @@ -package com.somemore.recruitboard.service.command; - -import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; -import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static org.assertj.core.api.Assertions.assertThat; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.recruitboard.service.command; + +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; +import com.somemore.domains.recruitboard.dto.request.RecruitBoardUpdateRequestDto; +import com.somemore.domains.recruitboard.repository.RecruitBoardJpaRepository; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.domain.Location; -import com.somemore.location.repository.LocationRepository; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; -import com.somemore.recruitboard.dto.request.RecruitBoardUpdateRequestDto; -import com.somemore.recruitboard.repository.RecruitBoardJpaRepository; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -28,6 +18,15 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.support.fixture.LocalDateTimeFixture.*; +import static org.assertj.core.api.Assertions.assertThat; + class UpdateRecruitBoardServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java b/src/test/java/com/somemore/domains/recruitboard/service/query/RecruitBoardDocumentServiceTest.java similarity index 100% rename from src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java rename to src/test/java/com/somemore/domains/recruitboard/service/query/RecruitBoardDocumentServiceTest.java diff --git a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java b/src/test/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryServiceTest.java similarity index 92% rename from src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java rename to src/test/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryServiceTest.java index d224baf5..922af7b2 100644 --- a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/recruitboard/service/query/RecruitBoardQueryServiceTest.java @@ -1,33 +1,20 @@ -package com.somemore.recruitboard.service.query; - -import static com.somemore.support.fixture.CenterFixture.createCenter; -import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.support.fixture.LocationFixture.createLocation; -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; +package com.somemore.domains.recruitboard.service.query; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.location.domain.Location; +import com.somemore.domains.location.repository.LocationRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardNearByCondition; +import com.somemore.domains.recruitboard.dto.condition.RecruitBoardSearchCondition; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardDetailResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; +import com.somemore.domains.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.location.domain.Location; -import com.somemore.location.repository.LocationRepository; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; -import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; -import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithCenterResponseDto; -import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; -import com.somemore.recruitboard.repository.RecruitBoardRepository; - -import java.util.List; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -38,6 +25,19 @@ import org.springframework.data.domain.Sort; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocationFixture.createLocation; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class RecruitBoardQueryServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java b/src/test/java/com/somemore/domains/review/controller/ReviewCommandApiControllerTest.java similarity index 94% rename from src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/review/controller/ReviewCommandApiControllerTest.java index 9c4fd5f0..4deef4e1 100644 --- a/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/review/controller/ReviewCommandApiControllerTest.java @@ -1,20 +1,11 @@ -package com.somemore.review.controller; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.BDDMockito.given; -import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.review.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.review.dto.request.ReviewCreateRequestDto; +import com.somemore.domains.review.usecase.CreateReviewUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.review.dto.request.ReviewCreateRequestDto; -import com.somemore.review.usecase.CreateReviewUseCase; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -23,6 +14,16 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.test.web.servlet.MockMvc; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.BDDMockito.given; +import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class ReviewCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java b/src/test/java/com/somemore/domains/review/repository/ReviewRepositoryImplTest.java similarity index 90% rename from src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java rename to src/test/java/com/somemore/domains/review/repository/ReviewRepositoryImplTest.java index 6924bda5..f1464b45 100644 --- a/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/review/repository/ReviewRepositoryImplTest.java @@ -1,29 +1,17 @@ -package com.somemore.review.repository; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.support.fixture.CenterFixture.createCenter; -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; -import static com.somemore.recruitboard.domain.VolunteerCategory.CULTURAL_EVENT; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; - +package com.somemore.domains.review.repository; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.List; -import java.util.Optional; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -33,6 +21,17 @@ import org.springframework.data.domain.Sort; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.*; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class ReviewRepositoryImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java b/src/test/java/com/somemore/domains/review/service/CreateReviewServiceTest.java similarity index 90% rename from src/test/java/com/somemore/review/service/CreateReviewServiceTest.java rename to src/test/java/com/somemore/domains/review/service/CreateReviewServiceTest.java index c6c7fdb9..071f1773 100644 --- a/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java +++ b/src/test/java/com/somemore/domains/review/service/CreateReviewServiceTest.java @@ -1,25 +1,26 @@ -package com.somemore.review.service; +package com.somemore.domains.review.service; -import static com.somemore.global.exception.ExceptionMessage.REVIEW_ALREADY_EXISTS; -import static com.somemore.global.exception.ExceptionMessage.REVIEW_RESTRICTED_TO_ATTENDED; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.request.ReviewCreateRequestDto; +import com.somemore.domains.review.repository.ReviewRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.request.ReviewCreateRequestDto; -import com.somemore.review.repository.ReviewRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.Optional; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.exception.ExceptionMessage.REVIEW_ALREADY_EXISTS; +import static com.somemore.global.exception.ExceptionMessage.REVIEW_RESTRICTED_TO_ATTENDED; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class CreateReviewServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java b/src/test/java/com/somemore/domains/review/service/ReviewQueryServiceTest.java similarity index 87% rename from src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java rename to src/test/java/com/somemore/domains/review/service/ReviewQueryServiceTest.java index 86028b96..1a1eb527 100644 --- a/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/review/service/ReviewQueryServiceTest.java @@ -1,35 +1,21 @@ -package com.somemore.review.service; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.support.fixture.CenterFixture.createCenter; -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; -import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; -import static com.somemore.recruitboard.domain.VolunteerCategory.CULTURAL_EVENT; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.assertj.core.api.AssertionsForClassTypes.tuple; - -import com.somemore.support.IntegrationTestSupport; -import com.somemore.center.domain.Center; -import com.somemore.center.repository.center.CenterRepository; +package com.somemore.domains.review.service; + +import com.somemore.domains.center.domain.Center; +import com.somemore.domains.center.repository.center.CenterRepository; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.review.domain.Review; +import com.somemore.domains.review.dto.condition.ReviewSearchCondition; +import com.somemore.domains.review.dto.response.ReviewResponseDto; +import com.somemore.domains.review.dto.response.ReviewWithNicknameResponseDto; +import com.somemore.domains.review.repository.ReviewRepository; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.VolunteerCategory; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.review.domain.Review; -import com.somemore.review.dto.condition.ReviewSearchCondition; -import com.somemore.review.dto.response.ReviewResponseDto; -import com.somemore.review.dto.response.ReviewWithNicknameResponseDto; -import com.somemore.review.repository.ReviewRepository; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.List; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -38,6 +24,19 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import java.util.List; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.*; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.assertj.core.api.AssertionsForClassTypes.tuple; + class ReviewQueryServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java b/src/test/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandControllerTest.java similarity index 97% rename from src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java rename to src/test/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandControllerTest.java index 0f3049f5..0958bc32 100644 --- a/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java +++ b/src/test/java/com/somemore/domains/volunteer/controller/VolunteerProfileCommandControllerTest.java @@ -1,12 +1,12 @@ -package com.somemore.volunteer.controller; +package com.somemore.domains.volunteer.controller; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; +import com.somemore.domains.volunteer.usecase.UpdateVolunteerProfileUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.global.imageupload.usecase.ImageUploadUseCase; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; -import com.somemore.volunteer.usecase.UpdateVolunteerProfileUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java b/src/test/java/com/somemore/domains/volunteer/domain/VolunteerTest.java similarity index 93% rename from src/test/java/com/somemore/volunteer/domain/VolunteerTest.java rename to src/test/java/com/somemore/domains/volunteer/domain/VolunteerTest.java index 03f94f3d..49a28c78 100644 --- a/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java +++ b/src/test/java/com/somemore/domains/volunteer/domain/VolunteerTest.java @@ -1,11 +1,11 @@ -package com.somemore.volunteer.domain; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.volunteer.domain; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static org.assertj.core.api.Assertions.assertThat; + class VolunteerTest { @DisplayName("봉사 스텟을 업데이트할 수 있다") diff --git a/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java b/src/test/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImplTest.java similarity index 92% rename from src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java rename to src/test/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImplTest.java index 5465c641..a98ad50e 100644 --- a/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/volunteer/repository/VolunteerDetailRepositoryImplTest.java @@ -1,8 +1,8 @@ -package com.somemore.volunteer.repository; +package com.somemore.domains.volunteer.repository; +import com.somemore.domains.volunteer.domain.Gender; +import com.somemore.domains.volunteer.domain.VolunteerDetail; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteer.domain.Gender; -import com.somemore.volunteer.domain.VolunteerDetail; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java b/src/test/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryTest.java similarity index 94% rename from src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java rename to src/test/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryTest.java index f32fdf18..54fbf59e 100644 --- a/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java +++ b/src/test/java/com/somemore/domains/volunteer/repository/VolunteerRepositoryTest.java @@ -1,19 +1,11 @@ -package com.somemore.volunteer.repository; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.volunteer.repository; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; -import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.UUID; - import org.assertj.core.api.AssertionsForClassTypes; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -21,6 +13,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class VolunteerRepositoryTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlServiceTest.java similarity index 96% rename from src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlServiceTest.java index b3bc0197..c97feb40 100644 --- a/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/GenerateOAuthUrlServiceTest.java @@ -1,4 +1,4 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/RegisterVolunteerServiceTest.java similarity index 84% rename from src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/RegisterVolunteerServiceTest.java index 92c1da48..32ec10c1 100644 --- a/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/RegisterVolunteerServiceTest.java @@ -1,14 +1,14 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.volunteer.domain.Gender; +import com.somemore.domains.volunteer.domain.Tier; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.repository.VolunteerDetailRepository; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.volunteer.domain.Gender; -import com.somemore.volunteer.domain.Tier; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; -import com.somemore.volunteer.repository.VolunteerDetailRepository; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import jakarta.persistence.EntityNotFoundException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/SignOutVolunteerServiceTest.java similarity index 98% rename from src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/SignOutVolunteerServiceTest.java index 750e73c8..de887e52 100644 --- a/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/SignOutVolunteerServiceTest.java @@ -1,6 +1,5 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; -import com.somemore.support.IntegrationTestSupport; import com.somemore.global.auth.cookie.CookieUseCase; import com.somemore.global.auth.jwt.domain.EncodedToken; import com.somemore.global.auth.jwt.domain.TokenType; @@ -11,6 +10,7 @@ import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; import com.somemore.global.auth.signout.service.SignOutService; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockServiceTest.java similarity index 93% rename from src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockServiceTest.java index 1b51f70a..1c6536d5 100644 --- a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerLockServiceTest.java @@ -1,20 +1,21 @@ -package com.somemore.volunteer.service; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.volunteer.service; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; -import java.util.UUID; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.util.UUID; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static org.assertj.core.api.Assertions.assertThat; + class UpdateVolunteerLockServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileServiceTest.java similarity index 90% rename from src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileServiceTest.java index 40f34dc5..dd299dc6 100644 --- a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/UpdateVolunteerProfileServiceTest.java @@ -1,10 +1,10 @@ -package com.somemore.volunteer.service; +package com.somemore.domains.volunteer.service; -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.dto.request.VolunteerProfileUpdateRequestDto; +import com.somemore.domains.volunteer.repository.VolunteerRepository; import com.somemore.global.auth.oauth.OAuthProvider; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; -import com.somemore.volunteer.repository.VolunteerRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java b/src/test/java/com/somemore/domains/volunteer/service/VolunteerQueryServiceTest.java similarity index 93% rename from src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java rename to src/test/java/com/somemore/domains/volunteer/service/VolunteerQueryServiceTest.java index d9ef13f7..07ab9b85 100644 --- a/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteer/service/VolunteerQueryServiceTest.java @@ -1,30 +1,31 @@ -package com.somemore.volunteer.service; - -import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; -import static com.somemore.volunteer.domain.Volunteer.createDefault; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.*; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.volunteer.service; + +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.dto.response.VolunteerProfileResponseDto; +import com.somemore.domains.volunteer.dto.response.VolunteerRankingResponseDto; +import com.somemore.domains.volunteer.repository.VolunteerDetailRepository; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteer.repository.mapper.VolunteerSimpleInfo; import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; -import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto; -import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto; -import com.somemore.volunteer.repository.VolunteerDetailRepository; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; -import java.util.List; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.domains.volunteer.domain.Volunteer.createDefault; +import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.junit.jupiter.api.Assertions.*; + @Transactional class VolunteerQueryServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java b/src/test/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java similarity index 86% rename from src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java rename to src/test/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java index 47f6d209..6d7053ca 100644 --- a/src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java +++ b/src/test/java/com/somemore/domains/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java @@ -1,23 +1,24 @@ -package com.somemore.volunteer.validator; - -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static org.assertj.core.api.Assertions.assertThatCode; -import static org.assertj.core.api.Assertions.assertThatThrownBy; +package com.somemore.domains.volunteer.validator; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.UUID; + +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThatCode; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class VolunteerDetailAccessValidatorImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java b/src/test/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java similarity index 91% rename from src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java index 9c55bec8..3c2851ec 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java @@ -1,28 +1,29 @@ -package com.somemore.volunteerapply.controller; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.http.MediaType.APPLICATION_JSON; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.volunteerapply.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.domains.volunteerapply.usecase.ApproveVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.RejectVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; -import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; -import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase; -import com.somemore.volunteerapply.usecase.RejectVolunteerApplyUseCase; -import java.util.List; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.web.servlet.MockMvc; +import java.util.List; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.http.MediaType.APPLICATION_JSON; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class CenterVolunteerApplyCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java b/src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java similarity index 91% rename from src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java rename to src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java index 53a9806a..18a3b00f 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java @@ -1,27 +1,28 @@ -package com.somemore.volunteerapply.controller; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.BDDMockito.given; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.http.MediaType.APPLICATION_JSON; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +package com.somemore.domains.volunteerapply.controller; import com.fasterxml.jackson.databind.ObjectMapper; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; +import com.somemore.domains.volunteerapply.usecase.ApplyVolunteerApplyUseCase; +import com.somemore.domains.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; -import com.somemore.volunteerapply.usecase.ApplyVolunteerApplyUseCase; -import com.somemore.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.web.servlet.MockMvc; +import java.util.UUID; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.http.MediaType.APPLICATION_JSON; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class VolunteerApplyCommandApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java b/src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java similarity index 89% rename from src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java rename to src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java index 7ea3776d..faf2fb0f 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java @@ -1,24 +1,14 @@ -package com.somemore.volunteerapply.controller; - -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.BDDMockito.given; -import static org.springframework.http.MediaType.APPLICATION_JSON; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - +package com.somemore.domains.volunteerapply.controller; + +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; +import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase; import com.somemore.support.ControllerTestSupport; import com.somemore.support.annotation.WithMockCustomUser; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; -import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; -import java.util.Collections; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -27,6 +17,17 @@ import org.springframework.data.domain.PageImpl; import org.springframework.test.web.servlet.MockMvc; +import java.util.Collections; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.springframework.http.MediaType.APPLICATION_JSON; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + class VolunteerApplyQueryApiControllerTest extends ControllerTestSupport { @Autowired diff --git a/src/test/java/com/somemore/volunteerapply/domain/VolunteerApplyTest.java b/src/test/java/com/somemore/domains/volunteerapply/domain/VolunteerApplyTest.java similarity index 91% rename from src/test/java/com/somemore/volunteerapply/domain/VolunteerApplyTest.java rename to src/test/java/com/somemore/domains/volunteerapply/domain/VolunteerApplyTest.java index 771a724c..e0b7d804 100644 --- a/src/test/java/com/somemore/volunteerapply/domain/VolunteerApplyTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/domain/VolunteerApplyTest.java @@ -1,15 +1,14 @@ -package com.somemore.volunteerapply.domain; +package com.somemore.domains.volunteerapply.domain; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + class VolunteerApplyTest { @DisplayName("지원 상태를 변경할 수 있다") diff --git a/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java b/src/test/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java similarity index 95% rename from src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java rename to src/test/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java index 104cc666..f2c9acda 100644 --- a/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java @@ -1,16 +1,9 @@ -package com.somemore.volunteerapply.repository; - -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; -import static org.assertj.core.api.Assertions.assertThat; +package com.somemore.domains.volunteerapply.repository; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import java.util.List; -import java.util.Optional; -import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -21,6 +14,14 @@ import org.springframework.data.domain.Sort; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.REJECTED; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class VolunteerApplyRepositoryImplTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java similarity index 87% rename from src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java index 153b29e3..5d99e248 100644 --- a/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java @@ -1,26 +1,27 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; -import static com.somemore.support.fixture.RecruitBoardFixture.createCloseRecruitBoard; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.RECRUITMENT_NOT_OPEN; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.Optional; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; +import static com.somemore.global.exception.ExceptionMessage.RECRUITMENT_NOT_OPEN; +import static com.somemore.support.fixture.RecruitBoardFixture.createCloseRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class ApplyVolunteerApplyStatusChangeServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java similarity index 88% rename from src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java index 1768c2be..5c8ef7b6 100644 --- a/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java @@ -1,15 +1,15 @@ -package com.somemore.volunteerapply.service; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.volunteerapply.service; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.event.VolunteerApplyStatusChangeEvent; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.event.VolunteerApplyStatusChangeEvent; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -19,19 +19,16 @@ import java.util.UUID; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.*; @Transactional class ApproveVolunteerApplyStatusChangeServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java similarity index 87% rename from src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java index 866c9e31..95ce2a41 100644 --- a/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java @@ -1,15 +1,15 @@ -package com.somemore.volunteerapply.service; - -import com.somemore.support.IntegrationTestSupport; +package com.somemore.domains.volunteerapply.service; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.recruitboard.usecase.query.RecruitBoardQueryUseCase; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.event.VolunteerApplyStatusChangeEvent; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; -import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.event.VolunteerApplyStatusChangeEvent; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -19,19 +19,16 @@ import java.util.UUID; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.REJECTED; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.WAITING; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.*; @Transactional class RejectVolunteerApplyStatusChangeServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java similarity index 89% rename from src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java index 8266e015..67d5a093 100644 --- a/src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java @@ -1,31 +1,30 @@ -package com.somemore.volunteerapply.service; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.global.exception.ExceptionMessage.RECRUIT_BOARD_ID_MISMATCH; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; -import static com.somemore.global.exception.ExceptionMessage.VOLUNTEER_APPLY_LIST_MISMATCH; -import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; -import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - +package com.somemore.domains.volunteerapply.service; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.List; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.COUNSELING; +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.exception.ExceptionMessage.*; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class SettleVolunteerApplyFacadeServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java similarity index 82% rename from src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java index d303630f..376d1be2 100644 --- a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java @@ -1,25 +1,18 @@ -package com.somemore.volunteerapply.service; - -import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; - -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.repository.RecruitBoardRepository; +package com.somemore.domains.volunteerapply.service; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.repository.RecruitBoardRepository; +import com.somemore.domains.volunteer.domain.Volunteer; +import com.somemore.domains.volunteer.domain.VolunteerDetail; +import com.somemore.domains.volunteer.dto.request.VolunteerRegisterRequestDto; +import com.somemore.domains.volunteer.repository.VolunteerDetailRepository; +import com.somemore.domains.volunteer.repository.VolunteerRepository; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteer.domain.Volunteer; -import com.somemore.volunteer.domain.VolunteerDetail; -import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; -import com.somemore.volunteer.repository.VolunteerDetailRepository; -import com.somemore.volunteer.repository.VolunteerRepository; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.List; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -28,6 +21,14 @@ import org.springframework.data.domain.Pageable; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class VolunteerApplyQueryFacadeServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryServiceTest.java similarity index 91% rename from src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryServiceTest.java index 81416b4a..9366cf31 100644 --- a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/VolunteerApplyQueryServiceTest.java @@ -1,19 +1,12 @@ -package com.somemore.volunteerapply.service; - -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; -import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; -import static org.assertj.core.api.Assertions.assertThat; - +package com.somemore.domains.volunteerapply.service; + +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyResponseDto; +import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.support.IntegrationTestSupport; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; -import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; -import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.List; -import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +15,12 @@ import org.springframework.data.domain.Pageable; import org.springframework.transaction.annotation.Transactional; +import java.util.List; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.*; +import static org.assertj.core.api.Assertions.assertThat; + @Transactional class VolunteerApplyQueryServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java b/src/test/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java similarity index 87% rename from src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java rename to src/test/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java index 92e3ab40..214b4bba 100644 --- a/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java +++ b/src/test/java/com/somemore/domains/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java @@ -1,22 +1,23 @@ -package com.somemore.volunteerapply.service; +package com.somemore.domains.volunteerapply.service; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_APPLY; -import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.somemore.support.IntegrationTestSupport; +import com.somemore.domains.volunteerapply.domain.ApplyStatus; +import com.somemore.domains.volunteerapply.domain.VolunteerApply; +import com.somemore.domains.volunteerapply.repository.VolunteerApplyRepository; import com.somemore.global.exception.BadRequestException; -import com.somemore.volunteerapply.domain.ApplyStatus; -import com.somemore.volunteerapply.domain.VolunteerApply; -import com.somemore.volunteerapply.repository.VolunteerApplyRepository; -import java.util.Optional; -import java.util.UUID; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.util.Optional; +import java.util.UUID; + +import static com.somemore.domains.volunteerapply.domain.ApplyStatus.APPROVED; +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_APPLY; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + @Transactional class WithdrawVolunteerApplyServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/support/fixture/CenterFixture.java b/src/test/java/com/somemore/support/fixture/CenterFixture.java index 3e6186a0..4be307ac 100644 --- a/src/test/java/com/somemore/support/fixture/CenterFixture.java +++ b/src/test/java/com/somemore/support/fixture/CenterFixture.java @@ -1,6 +1,6 @@ package com.somemore.support.fixture; -import com.somemore.center.domain.Center; +import com.somemore.domains.center.domain.Center; public class CenterFixture { diff --git a/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java b/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java index 35f657ae..080e44f3 100644 --- a/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java +++ b/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java @@ -1,6 +1,6 @@ package com.somemore.support.fixture; -import com.somemore.community.domain.CommunityBoard; +import com.somemore.domains.community.domain.CommunityBoard; import java.util.UUID; diff --git a/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java b/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java index a7572c94..8a7d0468 100644 --- a/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java +++ b/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java @@ -1,6 +1,6 @@ package com.somemore.support.fixture; -import com.somemore.community.domain.CommunityComment; +import com.somemore.domains.community.domain.CommunityComment; import java.util.UUID; diff --git a/src/test/java/com/somemore/support/fixture/LocationFixture.java b/src/test/java/com/somemore/support/fixture/LocationFixture.java index ebcd736d..1604e9c6 100644 --- a/src/test/java/com/somemore/support/fixture/LocationFixture.java +++ b/src/test/java/com/somemore/support/fixture/LocationFixture.java @@ -1,6 +1,6 @@ package com.somemore.support.fixture; -import com.somemore.location.domain.Location; +import com.somemore.domains.location.domain.Location; import java.math.BigDecimal; public class LocationFixture { diff --git a/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java b/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java index bd44bd08..d80c231f 100644 --- a/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java +++ b/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java @@ -1,14 +1,14 @@ package com.somemore.support.fixture; import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; -import static com.somemore.recruitboard.domain.RecruitStatus.COMPLETED; -import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; - -import com.somemore.recruitboard.domain.RecruitBoard; -import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.RecruitmentInfo; -import com.somemore.recruitboard.domain.VolunteerCategory; +import static com.somemore.domains.recruitboard.domain.RecruitStatus.CLOSED; +import static com.somemore.domains.recruitboard.domain.RecruitStatus.COMPLETED; +import static com.somemore.domains.recruitboard.domain.VolunteerCategory.OTHER; + +import com.somemore.domains.recruitboard.domain.RecruitBoard; +import com.somemore.domains.recruitboard.domain.RecruitStatus; +import com.somemore.domains.recruitboard.domain.RecruitmentInfo; +import com.somemore.domains.recruitboard.domain.VolunteerCategory; import java.lang.reflect.Field; import java.time.LocalDateTime; import java.util.UUID;