From 6f8671f2698bf650318c65d90db4d004021c9a9f Mon Sep 17 00:00:00 2001 From: Kijun Kwon <39583312+kkjsw17@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:01:38 +0900 Subject: [PATCH] =?UTF-8?q?[SAMBAD-237]=20=EB=A9=80=ED=8B=B0=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EA=B8=B0=EB=B0=98=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EA=B5=AC=EC=A1=B0=20=EB=A7=88=EC=9D=B4=EA=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20(#151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{dev-deploy.yml => dev-api-deploy.yml} | 4 +- .../{prod-deploy.yml => prod-api-deploy.yml} | 4 +- .gitignore | 2 +- build.gradle | 105 ++++++++++-------- Dockerfile => moring-api/Dockerfile | 2 +- moring-api/build.gradle | 13 +++ .../sambad/moring/api/InfraConfig.java | 24 ++++ .../moring/api/MoringApiApplication.java | 13 +++ .../moring/api/answer}/AnswerController.java | 10 +- .../moring/api/event}/EventController.java | 11 +- .../moring/api/file}/FileController.java | 6 +- .../answer}/MeetingAnswerController.java | 18 +-- .../MeetingQuestionCommentController.java | 10 +- ...MeetingQuestionCommentReplyController.java | 8 +- .../handwaving}/HandWavingController.java | 10 +- .../meeting/meeting}/MeetingController.java | 24 ++-- .../api/meeting/member}/HobbyController.java | 6 +- .../member}/MeetingMemberController.java | 18 +-- .../question}/MeetingQuestionController.java | 22 ++-- .../api/question}/QuestionController.java | 14 +-- .../moring/api/user}/UserController.java | 13 +-- .../src}/main/resources/application-dev.yml | 0 .../src}/main/resources/application-local.yml | 0 .../src}/main/resources/application-prod.yml | 0 .../src}/main/resources/application.yml | 2 +- .../src}/main/resources/banner.txt | 0 .../src}/main/resources/codecov.yml | 0 .../src}/main/resources/db/data.sql | 0 .../src}/main/resources/templates/login.html | 2 +- .../moring/api/MoringApiApplicationTests.java | 10 +- .../src}/test/resources/application.yml | 0 moring-domain/build.gradle | 11 ++ .../answer/application/AnswerRepository.java | 4 +- .../answer/application/AnswerService.java | 12 +- .../moring/domain}/answer/domain/Answer.java | 10 +- .../infrastructure/AnswerJpaRepository.java | 4 +- .../infrastructure/AnswerRepositoryImpl.java | 6 +- .../exception/AnswerExceptionCode.java | 4 +- .../InvalidAnswerContentException.java | 9 ++ .../exception/NotFoundAnswerException.java | 10 ++ .../presentation/request/AnswerRequest.java | 4 +- .../domain}/auth/application/AuthService.java | 24 ++-- .../OAuth2LoginSuccessHandler.java | 18 +-- .../application/OAuth2UserDetailsService.java | 8 +- .../auth/application/OAuth2UserService.java | 6 +- .../application/RefreshTokenRepository.java | 4 +- .../auth/application/RefreshTokenService.java | 16 +-- .../auth/application/TokenInjector.java | 8 +- .../auth/application/dto/AuthAttributes.java | 4 +- .../application/dto/KakaoAuthAttributes.java | 8 +- .../domain}/auth/domain/CustomOAuth2User.java | 4 +- .../auth/domain/CustomUserDetails.java | 2 +- .../domain}/auth/domain/LoginResult.java | 2 +- .../domain}/auth/domain/RefreshToken.java | 6 +- .../domain}/auth/domain/TokenGenerator.java | 2 +- .../domain}/auth/domain/TokenResolver.java | 2 +- .../infrastructure/JwtTokenGenerator.java | 4 +- .../auth/infrastructure/JwtTokenResolver.java | 4 +- .../RefreshTokenJpaRepository.java | 4 +- .../RefreshTokenRepositoryImpl.java | 6 +- .../infrastructure/SecurityProperties.java | 2 +- .../auth/infrastructure/TokenProperties.java | 2 +- .../auth/presentation/JwtTokenFilter.java | 12 +- .../auth/presentation/LoginController.java | 2 +- .../auth/presentation/RedirectUrlFilter.java | 4 +- .../AlreadyRegisteredUserException.java | 9 ++ .../exception/AuthExceptionCode.java | 4 +- .../AuthenticationRequiredException.java | 9 ++ .../CustomAuthenticationFailureHandler.java | 8 +- .../JwtAuthenticationEntryPoint.java | 6 +- .../RefreshTokenNotValidaException.java | 11 ++ .../domain}/common/config/SecurityConfig.java | 8 +- .../domain}/common/domain/BaseTimeEntity.java | 2 +- .../moring/domain/common/domain/Gender.java | 8 ++ .../common/exception/BusinessException.java | 2 +- .../common/exception/ExceptionCode.java | 2 +- .../common/exception/ExceptionResponse.java | 2 +- .../common/exception/GlobalExceptionCode.java | 2 +- .../exception/GlobalExceptionHandler.java | 7 +- .../common/exception/SentryClient.java | 4 +- .../common/handler/ExcelSheetHandler.java | 2 +- .../logging/ExecutionLoggingAdvice.java | 16 +-- .../logging/ServerErrorAlertAdvice.java | 9 +- .../common/response/PageableResponse.java | 2 +- .../EventMessageTemplateRepository.java | 11 ++ .../event/application/EventRepository.java | 8 +- .../event/application/EventService.java | 18 +-- .../moring/domain}/event/domain/Event.java | 11 +- .../event/domain/EventMessageTemplate.java | 2 +- .../domain/event/domain/EventStatus.java | 7 ++ .../domain}/event/domain/EventType.java | 2 +- .../infrastructure/EventJpaRepository.java | 8 +- .../EventMessageTemplateJpaRepository.java | 6 +- .../EventMessageTemplateRepositoryImpl.java | 10 +- .../event/infrastructure/EventProperties.java | 2 +- .../infrastructure/EventRepositoryImpl.java | 10 +- .../event/presentation/EventFacade.java | 14 +-- .../excepiton/EventExceptionCode.java | 6 +- .../excepiton/NotFoundEventException.java | 11 ++ .../response/EventListResponse.java | 2 +- .../presentation/response/EventResponse.java | 8 +- .../response/PollingEventListResponse.java | 6 +- .../PollingEventListResponseDetail.java | 8 +- .../domain}/file/application/FileService.java | 10 +- .../file/application/FileUploader.java | 2 +- .../domain}/file/domain/FileEntity.java | 6 +- .../domain}/file/domain/FileRepository.java | 2 +- .../infrastructure/FileJpaRepository.java | 4 +- .../file/infrastructure/FileProperties.java | 2 +- .../infrastructure/FileRepositoryImpl.java | 8 +- .../infrastructure/LocalFileUploader.java | 4 +- .../ObjectStorageFileUploader.java | 10 +- .../ObjectStorageProperties.java | 2 +- .../presentation/annotation/FullFileUrl.java | 4 +- .../FullFileUrlAnnotationIntrospector.java | 4 +- .../annotation/FullFileUrlConfig.java | 5 +- .../annotation/FullFileUrlSerializer.java | 11 +- .../exception/ExceedFileCountException.java | 9 ++ .../exception/FileExceptionCode.java | 4 +- .../exception/NotFoundFileException.java | 9 ++ .../ObjectStorageServerException.java | 9 ++ .../UnsupportedFileTypeException.java | 9 ++ .../response/FileUrlResponse.java | 4 +- .../application/MeetingAnswerRepository.java | 10 +- .../MeetingAnswerResultService.java | 18 +-- .../application/MeetingAnswerService.java | 30 ++--- .../meeting/answer/domain/MeetingAnswer.java | 10 +- .../MeetingAnswerJpaRepository.java | 4 +- .../MeetingAnswerQueryRepository.java | 28 ++--- .../MeetingAnswerRepositoryImpl.java | 12 +- .../dto/MeetingAnswerResponseCustom.java | 4 +- .../dto/MyMeetingAnswerResponseCustom.java | 4 +- .../DuplicateMeetingAnswerException.java | 10 ++ .../exception/MeetingAnswerExceptionCode.java | 4 +- .../request/MeetingAnswerRequest.java | 2 +- .../presentation/response/AnswerResponse.java | 6 +- .../response/MeetingAnswerListResponse.java | 4 +- .../MeetingAnswerListResponseDetail.java | 4 +- .../response/MyMeetingAnswerListResponse.java | 4 +- .../MyMeetingAnswerListResponseDetail.java | 4 +- .../response/SelectedAnswerResponse.java | 9 +- .../MeetingQuestionCommentRepository.java | 4 +- .../MeetingQuestionCommentService.java | 20 ++-- ...MeetingQuestionCommentReplyRepository.java | 4 +- .../MeetingQuestionCommentReplyService.java | 20 ++-- .../comment/MeetingQuestionComment.java | 12 +- .../reply/MeetingQuestionCommentReply.java | 10 +- .../MeetingQuestionCommentJpaRepository.java | 4 +- .../MeetingQuestionCommentRepositoryImpl.java | 6 +- ...tingQuestionCommentReplyJpaRepository.java | 4 +- ...ingQuestionCommentReplyRepositoryImpl.java | 6 +- .../InvalidCommentWriterException.java | 11 ++ .../MeetingQuestionCommentExceptionCode.java | 4 +- ...tFoundMeetingQuestionCommentException.java | 12 ++ .../MeetingQuestionCommentRequest.java | 2 +- .../response/MeetingCommentListResponse.java | 6 +- .../MeetingCommentListResponseDetail.java | 10 +- .../InvalidCommentReplyWriterException.java | 9 ++ ...tingQuestionCommentReplyExceptionCode.java | 7 +- ...dMeetingQuestionCommentReplyException.java | 9 ++ .../MeetingQuestionCommentReplyRequest.java | 2 +- .../MeetingQuestionCommentReplyResponse.java | 10 +- .../application/HandWavingRepository.java | 6 +- .../application/HandWavingService.java | 28 ++--- .../meeting/handwaving/domain/HandWaving.java | 16 +-- .../handwaving/domain/HandWavingStatus.java | 2 +- .../handwaving/domain/HandWavingSummary.java | 4 +- .../HandWavingJpaRepository.java | 4 +- .../HandWavingRepositoryImpl.java | 14 +-- .../exception/HandWavingExceptionCode.java | 8 +- .../InvalidHandWavingReceiverException.java | 11 ++ ...nvalidHandWavingStatusChangeException.java | 12 ++ .../NotFoundHandWavingException.java | 11 ++ .../request/HandWavingRequest.java | 4 +- .../response/HandWavingStatusResponse.java | 7 +- .../application/MeetingCodeGenerator.java | 8 ++ .../application/MeetingRepository.java | 15 +++ .../meeting/application/MeetingService.java | 24 ++-- .../application/MeetingTypeRepository.java | 4 +- .../application/MeetingTypeService.java | 4 +- .../TypesPerMeetingRepository.java | 10 ++ .../meeting/meeting/domain/Meeting.java | 16 +-- .../meeting/meeting/domain/MeetingCode.java | 2 +- .../meeting/meeting/domain/MeetingType.java | 4 +- .../meeting/domain/TypesPerMeeting.java | 4 +- .../infrastructure/MeetingJpaRepository.java | 12 ++ .../infrastructure/MeetingRepositoryImpl.java | 8 +- .../MeetingTypeJpaRepository.java | 4 +- .../MeetingTypeRepositoryImpl.java | 6 +- .../RandomMeetingCodeGenerator.java | 6 +- .../TypesPerMeetingJpaRepository.java | 4 +- .../TypesPerMeetingRepositoryImpl.java | 6 +- .../ExceedMaxMeetingCountException.java | 9 ++ .../exception/MeetingExceptionCode.java | 4 +- .../exception/MeetingNotFoundException.java | 9 ++ .../NotJoinedAnyMeetingException.java | 11 ++ .../request/MeetingPersistRequest.java | 2 +- .../response/MeetingCodeResponse.java | 4 +- .../response/MeetingNameResponse.java | 4 +- .../response/MeetingPersistResponse.java | 4 +- .../response/MeetingResponse.java | 4 +- .../response/MeetingTypeResponse.java | 4 +- .../member/application/HobbyRepository.java | 12 ++ .../member/application/HobbyService.java | 6 +- .../MeetingMemberHobbyRepository.java | 4 +- .../MeetingMemberRandomGenerator.java | 10 ++ .../application/MeetingMemberRepository.java | 4 +- .../application/MeetingMemberService.java | 46 ++++---- .../domain}/meeting/member/domain/Hobby.java | 4 +- .../domain}/meeting/member/domain/MBTI.java | 2 +- .../meeting/member/domain/MeetingMember.java | 18 +-- .../member/domain/MeetingMemberHobby.java | 4 +- .../member/domain/MeetingMemberRole.java | 9 ++ .../member/domain/MeetingMemberValidator.java | 18 +-- .../infrastructure/HobbyJpaRepository.java | 4 +- .../infrastructure/HobbyRepositoryImpl.java | 6 +- .../MeetingMemberHobbyJpaRepository.java | 4 +- .../MeetingMemberHobbyRepositoryImpl.java | 6 +- .../MeetingMemberJpaRepository.java | 4 +- .../MeetingMemberProperties.java | 2 +- .../MeetingMemberQueryRepository.java | 8 +- .../MeetingMemberRepositoryImpl.java | 6 +- .../RandomMeetingMemberGenerator.java | 6 +- .../ExceedMaxMemberCountException.java | 9 ++ .../ExceedMaxOwnerCountException.java | 9 ++ .../MeetingMemberAlreadyExistsException.java | 9 ++ .../exception/MeetingMemberExceptionCode.java | 4 +- .../MeetingMemberNotFoundException.java | 9 ++ .../NoMeetingMemberInConditionException.java | 9 ++ .../UserNotMemberOfMeetingException.java | 9 ++ .../request/MeetingMemberPersistRequest.java | 8 +- .../response/HobbyDetailResponse.java | 4 +- .../presentation/response/HobbyResponse.java | 4 +- .../response/MeetingMemberListResponse.java | 4 +- .../MeetingMemberListResponseDetail.java | 8 +- .../MeetingMemberPersistResponse.java | 4 +- .../response/MeetingMemberResponse.java | 12 +- .../MeetingMemberSummaryResponse.java | 8 +- .../MeetingQuestionRepository.java | 14 +-- .../application/MeetingQuestionService.java | 55 +++++---- .../MeetingQuestionStatusCheckScheduler.java | 23 ++-- ...MeetingQuestionTargetReplaceScheduler.java | 22 ++-- .../question/domain/MeetingQuestion.java | 24 ++-- .../domain/MeetingQuestionStatus.java | 2 +- .../MeetingQuestionJpaRepository.java | 6 +- .../MeetingQuestionQueryRepository.java | 36 +++--- .../MeetingQuestionRepositoryImpl.java | 18 +-- .../DuplicateMeetingQuestionException.java | 10 ++ .../FinishedMeetingQuestionException.java | 12 ++ ...validMeetingMemberNextTargetException.java | 12 ++ .../InvalidMeetingMemberTargetException.java | 12 ++ .../MeetingQuestionExceptionCode.java | 4 +- .../exception/NotFoundMeetingQuestion.java | 10 ++ .../request/MeetingQuestionRequest.java | 2 +- .../CurrentMeetingQuestionResponse.java | 12 +- ...llInactiveMeetingQuestionListResponse.java | 6 +- ...tiveMeetingQuestionListResponseDetail.java | 12 +- .../MeetingQuestionAndAnswerListResponse.java | 10 +- .../MeetingQuestionStatisticsDetail.java | 2 +- .../MeetingQuestionStatisticsResponse.java | 2 +- ...stInactiveMeetingQuestionListResponse.java | 2 +- ...tiveMeetingQuestionListResponseDetail.java | 6 +- .../application/QuestionRepository.java | 6 +- .../question/application/QuestionService.java | 20 ++-- .../domain}/question/domain/Question.java | 10 +- .../domain}/question/domain/QuestionType.java | 4 +- .../infrastructure/QuestionJpaRepository.java | 4 +- .../QuestionRepositoryImpl.java | 16 +-- .../AnswerCountOutOfRangeException.java | 11 ++ .../exception/DuplicateQuestionException.java | 12 ++ .../NotFoundAvailableQuestionException.java | 9 ++ .../exception/NotFoundQuestionException.java | 12 ++ .../exception/QuestionExceptionCode.java | 4 +- .../presentation/request/QuestionRequest.java | 4 +- .../response/QuestionListResponse.java | 4 +- .../response/QuestionResponse.java | 10 +- .../response/QuestionSummaryResponse.java | 4 +- .../domain}/user/application/UserService.java | 16 +-- .../domain}/user/domain/LoginProvider.java | 2 +- .../moring/domain}/user/domain/User.java | 10 +- .../domain}/user/domain/UserRepository.java | 2 +- .../infrastructure/UserJpaRepository.java | 4 +- .../infrastructure/UserRepositoryImpl.java | 6 +- .../exception/NotFoundUserException.java | 9 ++ .../exception/UserExceptionCode.java | 4 +- .../request/LastMeetingRequest.java | 2 +- .../response/OnboardingResponse.java | 4 +- .../presentation/response/UserResponse.java | 8 +- .../depromeet/sambad/moring/domain/.gitkeep | 0 moring-global-utils/build.gradle | 7 ++ .../globalutils}/logging/ExecutionTimer.java | 2 +- .../globalutils}/logging/LoggingUtils.java | 6 +- .../globalutils}/logging/NoLogging.java | 2 +- .../logging/P6spySqlLoggingFormatter.java | 2 +- .../MoringGlobalUtilsApplicationTests.java | 13 +++ moring-infra/build.gradle | 11 ++ .../moring/infra/EnableMoringConfig.java | 16 +++ .../sambad/moring/infra/MoringConfig.java | 4 + .../moring/infra/MoringConfigGroup.java | 40 +++++++ .../infra/MoringConfigImportSelector.java | 24 ++++ .../moring/infra/annotation}/UserId.java | 4 +- .../moring/infra}/config/AsyncConfig.java | 9 +- .../moring/infra}/config/CacheConfig.java | 7 +- .../infra/config/JpaAuditingConfig.java | 8 ++ .../sambad/moring/infra/config/JpaConfig.java | 27 +++++ .../infra/config/ObjectStorageConfig.java | 38 +++++++ .../moring/infra}/config/P6spyConfig.java | 9 +- .../moring/infra/config/PropertiesConfig.java | 8 ++ .../infra}/config/SchedulingConfig.java | 7 +- .../moring/infra}/config/SwaggerConfig.java | 8 +- .../moring/infra/config/TimeConfig.java | 14 +++ .../config/UserIdArgumentResolverConfig.java | 9 +- .../sambad/moring/infra/introspector/.gitkeep | 0 .../resolver/UserIdArgumentResolver.java | 3 +- .../sambad/moring/infra/serializer/.gitkeep | 0 .../depromeet/sambad/moring/infra/.gitkeep | 0 settings.gradle | 5 + .../sambad/moring/MoringApplication.java | 23 ---- .../InvalidAnswerContentException.java | 11 -- .../exception/NotFoundAnswerException.java | 12 -- .../AlreadyRegisteredUserException.java | 11 -- .../AuthenticationRequiredException.java | 11 -- .../RefreshTokenNotValidaException.java | 11 -- .../common/config/JpaAuditingConfig.java | 25 ----- .../common/config/ObjectStorageConfig.java | 36 ------ .../common/config/PropertiesConfig.java | 9 -- .../moring/common/config/TimeConfig.java | 15 --- .../sambad/moring/common/domain/Gender.java | 8 -- .../EventMessageTemplateRepository.java | 11 -- .../moring/event/domain/EventStatus.java | 7 -- .../excepiton/NotFoundEventException.java | 11 -- .../exception/ExceedFileCountException.java | 11 -- .../exception/NotFoundFileException.java | 11 -- .../ObjectStorageServerException.java | 11 -- .../UnsupportedFileTypeException.java | 11 -- .../DuplicateMeetingAnswerException.java | 12 -- .../InvalidCommentWriterException.java | 11 -- ...tFoundMeetingQuestionCommentException.java | 12 -- .../InvalidCommentReplyWriterException.java | 11 -- ...dMeetingQuestionCommentReplyException.java | 11 -- .../InvalidHandWavingReceiverException.java | 11 -- ...nvalidHandWavingStatusChangeException.java | 12 -- .../NotFoundHandWavingException.java | 11 -- .../application/MeetingCodeGenerator.java | 8 -- .../application/MeetingRepository.java | 15 --- .../TypesPerMeetingRepository.java | 10 -- .../infrastructure/MeetingJpaRepository.java | 12 -- .../ExceedMaxMeetingCountException.java | 11 -- .../exception/MeetingNotFoundException.java | 11 -- .../NotJoinedAnyMeetingException.java | 11 -- .../member/application/HobbyRepository.java | 12 -- .../MeetingMemberRandomGenerator.java | 10 -- .../member/domain/MeetingMemberRole.java | 9 -- .../ExceedMaxMemberCountException.java | 11 -- .../ExceedMaxOwnerCountException.java | 11 -- .../MeetingMemberAlreadyExistsException.java | 11 -- .../MeetingMemberNotFoundException.java | 11 -- .../NoMeetingMemberInConditionException.java | 11 -- .../UserNotMemberOfMeetingException.java | 11 -- .../DuplicateMeetingQuestionException.java | 12 -- .../FinishedMeetingQuestionException.java | 12 -- ...validMeetingMemberNextTargetException.java | 12 -- .../InvalidMeetingMemberTargetException.java | 12 -- .../exception/NotFoundMeetingQuestion.java | 12 -- .../AnswerCountOutOfRangeException.java | 11 -- .../exception/DuplicateQuestionException.java | 12 -- .../NotFoundAvailableQuestionException.java | 11 -- .../exception/NotFoundQuestionException.java | 12 -- .../exception/NotFoundUserException.java | 11 -- .../depromeet/sambad/moring/SampleTests.java | 34 ------ 370 files changed, 1727 insertions(+), 1640 deletions(-) rename .github/workflows/{dev-deploy.yml => dev-api-deploy.yml} (93%) rename .github/workflows/{prod-deploy.yml => prod-api-deploy.yml} (93%) rename Dockerfile => moring-api/Dockerfile (66%) create mode 100644 moring-api/build.gradle create mode 100644 moring-api/src/main/java/org/depromeet/sambad/moring/api/InfraConfig.java create mode 100644 moring-api/src/main/java/org/depromeet/sambad/moring/api/MoringApiApplication.java rename {src/main/java/org/depromeet/sambad/moring/answer/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/answer}/AnswerController.java (84%) rename {src/main/java/org/depromeet/sambad/moring/event/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/event}/EventController.java (90%) rename {src/main/java/org/depromeet/sambad/moring/file/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/file}/FileController.java (90%) rename {src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/answer}/MeetingAnswerController.java (90%) rename {src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting}/comment/MeetingQuestionCommentController.java (90%) rename {src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment}/MeetingQuestionCommentReplyController.java (91%) rename {src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/handwaving}/HandWavingController.java (91%) rename {src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/meeting}/MeetingController.java (78%) rename {src/main/java/org/depromeet/sambad/moring/meeting/member/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member}/HobbyController.java (81%) rename {src/main/java/org/depromeet/sambad/moring/meeting/member/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member}/MeetingMemberController.java (89%) rename {src/main/java/org/depromeet/sambad/moring/meeting/question/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/question}/MeetingQuestionController.java (89%) rename {src/main/java/org/depromeet/sambad/moring/question/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/question}/QuestionController.java (88%) rename {src/main/java/org/depromeet/sambad/moring/user/presentation => moring-api/src/main/java/org/depromeet/sambad/moring/api/user}/UserController.java (83%) rename {src => moring-api/src}/main/resources/application-dev.yml (100%) rename {src => moring-api/src}/main/resources/application-local.yml (100%) rename {src => moring-api/src}/main/resources/application-prod.yml (100%) rename {src => moring-api/src}/main/resources/application.yml (98%) rename {src => moring-api/src}/main/resources/banner.txt (100%) rename {src => moring-api/src}/main/resources/codecov.yml (100%) rename {src => moring-api/src}/main/resources/db/data.sql (100%) rename {src => moring-api/src}/main/resources/templates/login.html (76%) rename src/test/java/org/depromeet/sambad/moring/MoringApplicationTests.java => moring-api/src/test/java/org/depromeet/sambad/moring/api/MoringApiApplicationTests.java (51%) rename {src => moring-api/src}/test/resources/application.yml (100%) create mode 100644 moring-domain/build.gradle rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/application/AnswerRepository.java (58%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/application/AnswerService.java (64%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/domain/Answer.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/infrastructure/AnswerJpaRepository.java (64%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/infrastructure/AnswerRepositoryImpl.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/presentation/exception/AnswerExceptionCode.java (78%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/InvalidAnswerContentException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/NotFoundAnswerException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/answer/presentation/request/AnswerRequest.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/AuthService.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/OAuth2LoginSuccessHandler.java (79%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/OAuth2UserDetailsService.java (74%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/OAuth2UserService.java (87%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/RefreshTokenRepository.java (62%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/RefreshTokenService.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/TokenInjector.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/dto/AuthAttributes.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/application/dto/KakaoAuthAttributes.java (89%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/CustomOAuth2User.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/CustomUserDetails.java (91%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/LoginResult.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/RefreshToken.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/TokenGenerator.java (68%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/domain/TokenResolver.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/JwtTokenGenerator.java (90%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/JwtTokenResolver.java (94%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/RefreshTokenJpaRepository.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/RefreshTokenRepositoryImpl.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/SecurityProperties.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/infrastructure/TokenProperties.java (89%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/JwtTokenFilter.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/LoginController.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/RedirectUrlFilter.java (91%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AlreadyRegisteredUserException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/exception/AuthExceptionCode.java (82%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthenticationRequiredException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/exception/CustomAuthenticationFailureHandler.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/auth/presentation/exception/JwtAuthenticationEntryPoint.java (84%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/RefreshTokenNotValidaException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/config/SecurityConfig.java (94%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/domain/BaseTimeEntity.java (94%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/Gender.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/BusinessException.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/ExceptionCode.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/ExceptionResponse.java (93%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/GlobalExceptionCode.java (89%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/GlobalExceptionHandler.java (92%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/exception/SentryClient.java (74%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/handler/ExcelSheetHandler.java (97%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/logging/ExecutionLoggingAdvice.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/logging/ServerErrorAlertAdvice.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/common/response/PageableResponse.java (95%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventMessageTemplateRepository.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/application/EventRepository.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/application/EventService.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/domain/Event.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/domain/EventMessageTemplate.java (95%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventStatus.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/domain/EventType.java (61%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/infrastructure/EventJpaRepository.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/infrastructure/EventMessageTemplateJpaRepository.java (55%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/infrastructure/EventMessageTemplateRepositoryImpl.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/infrastructure/EventProperties.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/infrastructure/EventRepositoryImpl.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/EventFacade.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/excepiton/EventExceptionCode.java (67%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/NotFoundEventException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/response/EventListResponse.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/response/EventResponse.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/response/PollingEventListResponse.java (87%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/event/presentation/response/PollingEventListResponseDetail.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/application/FileService.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/application/FileUploader.java (91%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/domain/FileEntity.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/domain/FileRepository.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/FileJpaRepository.java (61%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/FileProperties.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/FileRepositoryImpl.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/LocalFileUploader.java (91%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/ObjectStorageFileUploader.java (91%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/infrastructure/ObjectStorageProperties.java (90%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/presentation/annotation/FullFileUrl.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java (90%) rename src/main/java/org/depromeet/sambad/moring/common/config/JacksonConfig.java => moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlConfig.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/presentation/annotation/FullFileUrlSerializer.java (77%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ExceedFileCountException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/presentation/exception/FileExceptionCode.java (85%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/NotFoundFileException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ObjectStorageServerException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/UnsupportedFileTypeException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/file/presentation/response/FileUrlResponse.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/application/MeetingAnswerRepository.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/application/MeetingAnswerResultService.java (72%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/application/MeetingAnswerService.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/domain/MeetingAnswer.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java (89%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java (74%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java (75%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/request/MeetingAnswerRequest.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/AnswerResponse.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/MeetingAnswerListResponse.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java (89%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/answer/presentation/response/SelectedAnswerResponse.java (68%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/application/comment/MeetingQuestionCommentRepository.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/application/comment/MeetingQuestionCommentService.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java (61%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java (70%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/domain/comment/MeetingQuestionComment.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/domain/reply/MeetingQuestionCommentReply.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java (63%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java (72%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java (78%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java (75%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java (68%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java (80%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/application/HandWavingRepository.java (65%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/application/HandWavingService.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/domain/HandWaving.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/domain/HandWavingStatus.java (53%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/domain/HandWavingSummary.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/infrastructure/HandWavingJpaRepository.java (70%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java (66%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/presentation/request/HandWavingRequest.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/handwaving/presentation/response/HandWavingStatusResponse.java (72%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingCodeGenerator.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingRepository.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/application/MeetingService.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/application/MeetingTypeRepository.java (52%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/application/MeetingTypeService.java (71%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/TypesPerMeetingRepository.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/domain/Meeting.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/domain/MeetingCode.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/domain/MeetingType.java (79%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/domain/TypesPerMeeting.java (88%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingJpaRepository.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/MeetingRepositoryImpl.java (65%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java (61%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java (68%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java (57%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java (50%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java (62%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/exception/MeetingExceptionCode.java (80%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingNotFoundException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/request/MeetingPersistRequest.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/response/MeetingCodeResponse.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/response/MeetingNameResponse.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/response/MeetingPersistResponse.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/response/MeetingResponse.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/meeting/presentation/response/MeetingTypeResponse.java (84%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyRepository.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/application/HobbyService.java (60%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/application/MeetingMemberHobbyRepository.java (54%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRandomGenerator.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/application/MeetingMemberRepository.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/application/MeetingMemberService.java (74%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/domain/Hobby.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/domain/MBTI.java (67%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/domain/MeetingMember.java (87%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/domain/MeetingMemberHobby.java (89%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberRole.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/domain/MeetingMemberValidator.java (70%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/HobbyJpaRepository.java (58%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/HobbyRepositoryImpl.java (66%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java (51%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberJpaRepository.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberProperties.java (76%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberQueryRepository.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java (90%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/infrastructure/RandomMeetingMemberGenerator.java (60%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxMemberCountException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/exception/MeetingMemberExceptionCode.java (86%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberNotFoundException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/request/MeetingMemberPersistRequest.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/HobbyDetailResponse.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/HobbyResponse.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/MeetingMemberListResponse.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/MeetingMemberListResponseDetail.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/MeetingMemberPersistResponse.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/MeetingMemberResponse.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/member/presentation/response/MeetingMemberSummaryResponse.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/application/MeetingQuestionRepository.java (69%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/application/MeetingQuestionService.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/application/MeetingQuestionStatusCheckScheduler.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/domain/MeetingQuestion.java (84%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/domain/MeetingQuestionStatus.java (51%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/infrastructure/MeetingQuestionJpaRepository.java (79%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/infrastructure/MeetingQuestionQueryRepository.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java (79%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/FinishedMeetingQuestionException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java (85%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/NotFoundMeetingQuestion.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/request/MeetingQuestionRequest.java (80%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java (87%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java (81%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java (71%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java (85%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java (87%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/application/QuestionRepository.java (62%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/application/QuestionService.java (66%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/domain/Question.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/domain/QuestionType.java (78%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/infrastructure/QuestionJpaRepository.java (51%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/infrastructure/QuestionRepositoryImpl.java (77%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/AnswerCountOutOfRangeException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/DuplicateQuestionException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundAvailableQuestionException.java create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundQuestionException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/presentation/exception/QuestionExceptionCode.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/presentation/request/QuestionRequest.java (86%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/presentation/response/QuestionListResponse.java (83%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/presentation/response/QuestionResponse.java (73%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/question/presentation/response/QuestionSummaryResponse.java (82%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/application/UserService.java (66%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/domain/LoginProvider.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/domain/User.java (88%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/domain/UserRepository.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/infrastructure/UserJpaRepository.java (62%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/infrastructure/UserRepositoryImpl.java (74%) create mode 100644 moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/NotFoundUserException.java rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/presentation/exception/UserExceptionCode.java (75%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/presentation/request/LastMeetingRequest.java (80%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/presentation/response/OnboardingResponse.java (77%) rename {src/main/java/org/depromeet/sambad/moring => moring-domain/src/main/java/org/depromeet/sambad/moring/domain}/user/presentation/response/UserResponse.java (81%) create mode 100644 moring-domain/src/test/java/org/depromeet/sambad/moring/domain/.gitkeep create mode 100644 moring-global-utils/build.gradle rename {src/main/java/org/depromeet/sambad/moring/common => moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils}/logging/ExecutionTimer.java (83%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils}/logging/LoggingUtils.java (83%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils}/logging/NoLogging.java (86%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils}/logging/P6spySqlLoggingFormatter.java (95%) create mode 100644 moring-global-utils/src/test/java/org/depromeet/sambad/moring/globalutils/MoringGlobalUtilsApplicationTests.java create mode 100644 moring-infra/build.gradle create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/EnableMoringConfig.java create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfig.java create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigGroup.java create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigImportSelector.java rename {src/main/java/org/depromeet/sambad/moring/user/presentation/resolver => moring-infra/src/main/java/org/depromeet/sambad/moring/infra/annotation}/UserId.java (81%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/config/AsyncConfig.java (88%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/config/CacheConfig.java (76%) create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaAuditingConfig.java create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaConfig.java create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/ObjectStorageConfig.java rename {src/main/java/org/depromeet/sambad/moring/common => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/config/P6spyConfig.java (77%) create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/PropertiesConfig.java rename {src/main/java/org/depromeet/sambad/moring/common => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/config/SchedulingConfig.java (77%) rename {src/main/java/org/depromeet/sambad/moring/common => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/config/SwaggerConfig.java (94%) create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/TimeConfig.java rename src/main/java/org/depromeet/sambad/moring/common/config/WebConfig.java => moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/UserIdArgumentResolverConfig.java (54%) create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/introspector/.gitkeep rename {src/main/java/org/depromeet/sambad/moring/user/presentation => moring-infra/src/main/java/org/depromeet/sambad/moring/infra}/resolver/UserIdArgumentResolver.java (91%) create mode 100644 moring-infra/src/main/java/org/depromeet/sambad/moring/infra/serializer/.gitkeep create mode 100644 moring-infra/src/test/java/org/depromeet/sambad/moring/infra/.gitkeep delete mode 100644 src/main/java/org/depromeet/sambad/moring/MoringApplication.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/InvalidAnswerContentException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/NotFoundAnswerException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AlreadyRegisteredUserException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthenticationRequiredException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/RefreshTokenNotValidaException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/common/config/JpaAuditingConfig.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/common/config/ObjectStorageConfig.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/common/config/PropertiesConfig.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/common/config/TimeConfig.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/common/domain/Gender.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/event/application/EventMessageTemplateRepository.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/event/domain/EventStatus.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/NotFoundEventException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ExceedFileCountException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/file/presentation/exception/NotFoundFileException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ObjectStorageServerException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/file/presentation/exception/UnsupportedFileTypeException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingCodeGenerator.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingRepository.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/TypesPerMeetingRepository.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingJpaRepository.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingNotFoundException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyRepository.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRandomGenerator.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberRole.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxMemberCountException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberNotFoundException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/FinishedMeetingQuestionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/NotFoundMeetingQuestion.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/question/presentation/exception/AnswerCountOutOfRangeException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/question/presentation/exception/DuplicateQuestionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundAvailableQuestionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundQuestionException.java delete mode 100644 src/main/java/org/depromeet/sambad/moring/user/presentation/exception/NotFoundUserException.java delete mode 100644 src/test/java/org/depromeet/sambad/moring/SampleTests.java diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-api-deploy.yml similarity index 93% rename from .github/workflows/dev-deploy.yml rename to .github/workflows/dev-api-deploy.yml index 6a04ae83..fbfffe9d 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-api-deploy.yml @@ -23,12 +23,12 @@ jobs: run: chmod +x gradlew - name: "Gradle 빌드" - run: ./gradlew clean build -x test + run: ./gradlew -p moring-api clean build -x test - name: "도커 빌드 및 푸시" run: | docker login ${{ secrets.DOCKER_REPO }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . + docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . -f moring-api/Dockerfile docker push ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} deploy: diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-api-deploy.yml similarity index 93% rename from .github/workflows/prod-deploy.yml rename to .github/workflows/prod-api-deploy.yml index 69365dab..e603ad49 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-api-deploy.yml @@ -23,12 +23,12 @@ jobs: run: chmod +x gradlew - name: "Gradle 빌드" - run: ./gradlew clean build -x test + run: ./gradlew -p moring-api clean build -x test - name: "도커 빌드 및 푸시" run: | docker login ${{ secrets.DOCKER_REPO }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . + docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . -f moring-api/Dockerfile docker push ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} deploy: diff --git a/.gitignore b/.gitignore index 38b25fad..87a9a892 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,4 @@ temp spy.log ### Qclass ### -src/main/generated/ \ No newline at end of file +*/src/main/generated/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index bf269a9a..8f68bff5 100644 --- a/build.gradle +++ b/build.gradle @@ -4,67 +4,80 @@ plugins { id 'io.spring.dependency-management' version '1.1.5' } -group = 'org.depromeet.sambad' -version = '0.0.1-SNAPSHOT' - -java { - sourceCompatibility = '17' -} - -configurations { - compileOnly { - extendsFrom annotationProcessor - } +bootJar { + enabled = false } repositories { mavenCentral() } -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-data-redis' +subprojects { + group = 'org.depromeet.sambad' + version = '0.0.1-SNAPSHOT' + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + + apply plugin: 'java' + apply plugin: 'java-library' + apply plugin: 'org.springframework.boot' + apply plugin: 'io.spring.dependency-management' + + configurations { + compileOnly { + extendsFrom annotationProcessor + } + } + + repositories { + mavenCentral() + } - implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' - implementation 'io.jsonwebtoken:jjwt:0.12.6' + dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-data-redis' - runtimeOnly 'com.h2database:h2' - runtimeOnly 'com.mysql:mysql-connector-j' + implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'io.jsonwebtoken:jjwt:0.12.6' - implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' - annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta' - annotationProcessor 'jakarta.annotation:jakarta.annotation-api' - annotationProcessor 'jakarta.persistence:jakarta.persistence-api' + runtimeOnly 'com.h2database:h2' + runtimeOnly 'com.mysql:mysql-connector-j' - compileOnly 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' + implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' + annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta' + annotationProcessor 'jakarta.annotation:jakarta.annotation-api' + annotationProcessor 'jakarta.persistence:jakarta.persistence-api' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' - implementation 'io.sentry:sentry-spring-boot-starter-jakarta:7.14.0' - implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - runtimeOnly 'io.micrometer:micrometer-registry-prometheus' + implementation 'io.sentry:sentry-spring-boot-starter-jakarta:7.11.0' + implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.security:spring-security-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + implementation 'org.springframework.boot:spring-boot-starter-actuator' + runtimeOnly 'io.micrometer:micrometer-registry-prometheus' - implementation 'com.amazonaws:aws-java-sdk-s3:1.11.238' - implementation 'javax.xml.bind:jaxb-api:2.3.0' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework.security:spring-security-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' - implementation 'org.apache.poi:poi:4.1.2' - implementation 'org.apache.poi:poi-ooxml:4.1.2' + implementation 'com.amazonaws:aws-java-sdk-s3:1.11.238' + implementation 'javax.xml.bind:jaxb-api:2.3.0' - implementation 'net.javacrumbs.shedlock:shedlock-spring:5.14.0' - implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.14.0' -} + implementation 'org.apache.poi:poi:4.1.2' + implementation 'org.apache.poi:poi-ooxml:4.1.2' + + implementation 'net.javacrumbs.shedlock:shedlock-spring:5.14.0' + implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.14.0' + } -test { - useJUnitPlatform() -} \ No newline at end of file + test { + useJUnitPlatform() + } +} diff --git a/Dockerfile b/moring-api/Dockerfile similarity index 66% rename from Dockerfile rename to moring-api/Dockerfile index 3c60826f..c843038a 100644 --- a/Dockerfile +++ b/moring-api/Dockerfile @@ -2,6 +2,6 @@ FROM openjdk:17-slim WORKDIR /data/www -COPY build/libs/*.jar app.jar +COPY moring-api/build/libs/*.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/moring-api/build.gradle b/moring-api/build.gradle new file mode 100644 index 00000000..e1d28b34 --- /dev/null +++ b/moring-api/build.gradle @@ -0,0 +1,13 @@ +bootJar { + enabled = true +} + +jar { + enabled = false +} + +dependencies { + implementation project(':moring-infra') + implementation project(':moring-domain') + implementation project(':moring-global-utils') +} diff --git a/moring-api/src/main/java/org/depromeet/sambad/moring/api/InfraConfig.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/InfraConfig.java new file mode 100644 index 00000000..bd1402ea --- /dev/null +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/InfraConfig.java @@ -0,0 +1,24 @@ +package org.depromeet.sambad.moring.api; + +import org.depromeet.sambad.moring.infra.EnableMoringConfig; +import org.depromeet.sambad.moring.infra.MoringConfigGroup; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration(proxyBeanMethods = false) +@ComponentScan("org.depromeet.sambad.moring.domain") +@EnableMoringConfig({ + MoringConfigGroup.JPA, + MoringConfigGroup.JPA_AUDITING, + MoringConfigGroup.ASYNC, + MoringConfigGroup.OBJECT_STORAGE, + MoringConfigGroup.P6SPY, + MoringConfigGroup.CONFIGURATION_PROPERTIES, + MoringConfigGroup.SWAGGER, + MoringConfigGroup.TIME, + MoringConfigGroup.USER_ID_ARGUMENT_RESOLVER, + MoringConfigGroup.SCHEDULING, + MoringConfigGroup.SPRING_CACHE, +}) +public class InfraConfig { +} diff --git a/moring-api/src/main/java/org/depromeet/sambad/moring/api/MoringApiApplication.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/MoringApiApplication.java new file mode 100644 index 00000000..65c46d35 --- /dev/null +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/MoringApiApplication.java @@ -0,0 +1,13 @@ +package org.depromeet.sambad.moring.api; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MoringApiApplication { + + public static void main(String[] args) { + SpringApplication.run(MoringApiApplication.class, args); + } + +} diff --git a/src/main/java/org/depromeet/sambad/moring/answer/presentation/AnswerController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/answer/AnswerController.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/answer/presentation/AnswerController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/answer/AnswerController.java index 85232f34..919b21b9 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/presentation/AnswerController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/answer/AnswerController.java @@ -1,7 +1,7 @@ -package org.depromeet.sambad.moring.answer.presentation; +package org.depromeet.sambad.moring.api.answer; -import org.depromeet.sambad.moring.answer.application.AnswerService; -import org.depromeet.sambad.moring.answer.presentation.request.AnswerRequest; +import org.depromeet.sambad.moring.domain.answer.application.AnswerService; +import org.depromeet.sambad.moring.domain.answer.presentation.request.AnswerRequest; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -18,8 +18,9 @@ @Tag(name = "릴레이 질문 답변", description = "모임의 질문이 아닌, 운영자가 관리하는 릴레이 질문 답변 관련 api / 담당자 : 이한음") @RestController @RequiredArgsConstructor -@RequestMapping("/v1") +@RequestMapping("/v1/answers") public class AnswerController { + private final AnswerService answerService; @Operation(summary = "답변 추가", description = "새로운 답변을 등록하는 API 입니다.") @@ -33,5 +34,4 @@ public ResponseEntity<Void> saveAnswer( answerService.saveAnswer(answerRequest); return ResponseEntity.ok().build(); } - } diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/EventController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/event/EventController.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/EventController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/event/EventController.java index 4bbf73a5..020a1d2f 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/EventController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/event/EventController.java @@ -1,9 +1,10 @@ -package org.depromeet.sambad.moring.event.presentation; +package org.depromeet.sambad.moring.api.event; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.event.presentation.response.EventListResponse; -import org.depromeet.sambad.moring.event.presentation.response.PollingEventListResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.presentation.EventFacade; +import org.depromeet.sambad.moring.domain.event.presentation.response.EventListResponse; +import org.depromeet.sambad.moring.domain.event.presentation.response.PollingEventListResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PatchMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/FileController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/file/FileController.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/FileController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/file/FileController.java index cf8ad118..ce4aa5ab 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/FileController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/file/FileController.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.file.presentation; +package org.depromeet.sambad.moring.api.file; import java.io.IOException; -import org.depromeet.sambad.moring.file.application.FileService; -import org.depromeet.sambad.moring.file.presentation.response.FileUrlResponse; +import org.depromeet.sambad.moring.domain.file.application.FileService; +import org.depromeet.sambad.moring.domain.file.presentation.response.FileUrlResponse; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/MeetingAnswerController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/answer/MeetingAnswerController.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/MeetingAnswerController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/answer/MeetingAnswerController.java index a880119d..e6da3242 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/MeetingAnswerController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/answer/MeetingAnswerController.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation; +package org.depromeet.sambad.moring.api.meeting.answer; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.application.MeetingAnswerResultService; -import org.depromeet.sambad.moring.meeting.answer.application.MeetingAnswerService; -import org.depromeet.sambad.moring.meeting.answer.presentation.request.MeetingAnswerRequest; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MyMeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.SelectedAnswerResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.answer.application.MeetingAnswerResultService; +import org.depromeet.sambad.moring.domain.meeting.answer.application.MeetingAnswerService; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.request.MeetingAnswerRequest; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MyMeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.SelectedAnswerResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberListResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/MeetingQuestionCommentController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentController.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/MeetingQuestionCommentController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentController.java index 4a48e291..1d87b2c0 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/MeetingQuestionCommentController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentController.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment; +package org.depromeet.sambad.moring.api.meeting.comment; -import org.depromeet.sambad.moring.meeting.comment.application.comment.MeetingQuestionCommentService; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.request.MeetingQuestionCommentRequest; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.response.MeetingCommentListResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.comment.application.comment.MeetingQuestionCommentService; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.request.MeetingQuestionCommentRequest; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.response.MeetingCommentListResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/MeetingQuestionCommentReplyController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentReplyController.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/MeetingQuestionCommentReplyController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentReplyController.java index ac1f7bec..8fc17092 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/MeetingQuestionCommentReplyController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/comment/MeetingQuestionCommentReplyController.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply; +package org.depromeet.sambad.moring.api.meeting.comment; -import org.depromeet.sambad.moring.meeting.comment.application.reply.MeetingQuestionCommentReplyService; -import org.depromeet.sambad.moring.meeting.comment.presentation.reply.request.MeetingQuestionCommentReplyRequest; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.comment.application.reply.MeetingQuestionCommentReplyService; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.request.MeetingQuestionCommentReplyRequest; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/HandWavingController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/handwaving/HandWavingController.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/HandWavingController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/handwaving/HandWavingController.java index f42c45e8..6b72cd4a 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/HandWavingController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/handwaving/HandWavingController.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation; +package org.depromeet.sambad.moring.api.meeting.handwaving; -import org.depromeet.sambad.moring.meeting.handwaving.application.HandWavingService; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.request.HandWavingRequest; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.response.HandWavingStatusResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.handwaving.application.HandWavingService; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.request.HandWavingRequest; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.response.HandWavingStatusResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PatchMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/MeetingController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/meeting/MeetingController.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/MeetingController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/meeting/MeetingController.java index fb920725..0b5050dc 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/MeetingController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/meeting/MeetingController.java @@ -1,20 +1,20 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation; +package org.depromeet.sambad.moring.api.meeting.meeting; import static org.springframework.http.HttpStatus.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingService; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingTypeService; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; -import org.depromeet.sambad.moring.meeting.meeting.presentation.request.MeetingPersistRequest; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingCodeResponse; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingNameResponse; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingPersistResponse; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingResponse; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingTypeResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingService; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingTypeService; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.request.MeetingPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingCodeResponse; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingNameResponse; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingPersistResponse; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingResponse; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingTypeResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/HobbyController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/HobbyController.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/HobbyController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/HobbyController.java index ab57f72c..a0cbb56a 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/HobbyController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/HobbyController.java @@ -1,7 +1,7 @@ -package org.depromeet.sambad.moring.meeting.member.presentation; +package org.depromeet.sambad.moring.api.meeting.member; -import org.depromeet.sambad.moring.meeting.member.application.HobbyService; -import org.depromeet.sambad.moring.meeting.member.presentation.response.HobbyResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.HobbyService; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.HobbyResponse; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/MeetingMemberController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/MeetingMemberController.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/MeetingMemberController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/MeetingMemberController.java index 13b6f10f..7ab5a229 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/MeetingMemberController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/member/MeetingMemberController.java @@ -1,16 +1,16 @@ -package org.depromeet.sambad.moring.meeting.member.presentation; +package org.depromeet.sambad.moring.api.meeting.member; -import static org.springframework.http.HttpStatus.CREATED; +import static org.springframework.http.HttpStatus.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.presentation.request.MeetingMemberPersistRequest; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberPersistResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.request.MeetingMemberPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberPersistResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PatchMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/MeetingQuestionController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/question/MeetingQuestionController.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/MeetingQuestionController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/question/MeetingQuestionController.java index ba84c9d6..2078d822 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/MeetingQuestionController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/meeting/question/MeetingQuestionController.java @@ -1,17 +1,17 @@ -package org.depromeet.sambad.moring.meeting.question.presentation; +package org.depromeet.sambad.moring.api.meeting.question; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionService; -import org.depromeet.sambad.moring.meeting.question.presentation.request.MeetingQuestionRequest; -import org.depromeet.sambad.moring.meeting.question.presentation.response.CurrentMeetingQuestionResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionAndAnswerListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.question.presentation.response.QuestionResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionService; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.request.MeetingQuestionRequest; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.CurrentMeetingQuestionResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionAndAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.data.domain.PageRequest; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/QuestionController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/question/QuestionController.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/QuestionController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/question/QuestionController.java index 82f36754..69185b38 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/QuestionController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/question/QuestionController.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.question.presentation; +package org.depromeet.sambad.moring.api.question; import java.util.List; -import org.depromeet.sambad.moring.question.application.QuestionService; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.presentation.request.QuestionRequest; -import org.depromeet.sambad.moring.question.presentation.response.QuestionListResponse; -import org.depromeet.sambad.moring.question.presentation.response.QuestionResponse; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; +import org.depromeet.sambad.moring.domain.question.application.QuestionService; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.presentation.request.QuestionRequest; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionListResponse; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.data.domain.PageRequest; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/UserController.java b/moring-api/src/main/java/org/depromeet/sambad/moring/api/user/UserController.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/UserController.java rename to moring-api/src/main/java/org/depromeet/sambad/moring/api/user/UserController.java index 54c3bfc7..9c2c93ee 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/UserController.java +++ b/moring-api/src/main/java/org/depromeet/sambad/moring/api/user/UserController.java @@ -1,11 +1,10 @@ -package org.depromeet.sambad.moring.user.presentation; +package org.depromeet.sambad.moring.api.user; -import org.depromeet.sambad.moring.user.application.UserService; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.presentation.request.LastMeetingRequest; -import org.depromeet.sambad.moring.user.presentation.resolver.UserId; -import org.depromeet.sambad.moring.user.presentation.response.OnboardingResponse; -import org.depromeet.sambad.moring.user.presentation.response.UserResponse; +import org.depromeet.sambad.moring.domain.user.application.UserService; +import org.depromeet.sambad.moring.domain.user.presentation.request.LastMeetingRequest; +import org.depromeet.sambad.moring.domain.user.presentation.response.OnboardingResponse; +import org.depromeet.sambad.moring.domain.user.presentation.response.UserResponse; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PatchMapping; diff --git a/src/main/resources/application-dev.yml b/moring-api/src/main/resources/application-dev.yml similarity index 100% rename from src/main/resources/application-dev.yml rename to moring-api/src/main/resources/application-dev.yml diff --git a/src/main/resources/application-local.yml b/moring-api/src/main/resources/application-local.yml similarity index 100% rename from src/main/resources/application-local.yml rename to moring-api/src/main/resources/application-local.yml diff --git a/src/main/resources/application-prod.yml b/moring-api/src/main/resources/application-prod.yml similarity index 100% rename from src/main/resources/application-prod.yml rename to moring-api/src/main/resources/application-prod.yml diff --git a/src/main/resources/application.yml b/moring-api/src/main/resources/application.yml similarity index 98% rename from src/main/resources/application.yml rename to moring-api/src/main/resources/application.yml index f8618f33..c9a11193 100644 --- a/src/main/resources/application.yml +++ b/moring-api/src/main/resources/application.yml @@ -65,7 +65,7 @@ spring: core-size: ${CORE_POOL_SIZE:10} max-size: ${MAX_POOL_SIZE:50} queue-capacity: ${QUEUE_CAPACITY:100} - keep-alive: ${KEEP_ALIVE_SECONDS:60} + keep-alive: ${KEEP_ALIVE_SECONDS:6000} thread-name-prefix: asyncExecutor- springdoc: diff --git a/src/main/resources/banner.txt b/moring-api/src/main/resources/banner.txt similarity index 100% rename from src/main/resources/banner.txt rename to moring-api/src/main/resources/banner.txt diff --git a/src/main/resources/codecov.yml b/moring-api/src/main/resources/codecov.yml similarity index 100% rename from src/main/resources/codecov.yml rename to moring-api/src/main/resources/codecov.yml diff --git a/src/main/resources/db/data.sql b/moring-api/src/main/resources/db/data.sql similarity index 100% rename from src/main/resources/db/data.sql rename to moring-api/src/main/resources/db/data.sql diff --git a/src/main/resources/templates/login.html b/moring-api/src/main/resources/templates/login.html similarity index 76% rename from src/main/resources/templates/login.html rename to moring-api/src/main/resources/templates/login.html index b27da762..aaf0e942 100644 --- a/src/main/resources/templates/login.html +++ b/moring-api/src/main/resources/templates/login.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html> <head> <title>Login</title> </head> diff --git a/src/test/java/org/depromeet/sambad/moring/MoringApplicationTests.java b/moring-api/src/test/java/org/depromeet/sambad/moring/api/MoringApiApplicationTests.java similarity index 51% rename from src/test/java/org/depromeet/sambad/moring/MoringApplicationTests.java rename to moring-api/src/test/java/org/depromeet/sambad/moring/api/MoringApiApplicationTests.java index c7265e21..82a5e92a 100644 --- a/src/test/java/org/depromeet/sambad/moring/MoringApplicationTests.java +++ b/moring-api/src/test/java/org/depromeet/sambad/moring/api/MoringApiApplicationTests.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring; +package org.depromeet.sambad.moring.api; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -class MoringApplicationTests { +class MoringApiApplicationTests { - // @Test - // void contextLoads() { - // } + @Test + void contextLoads() { + } } diff --git a/src/test/resources/application.yml b/moring-api/src/test/resources/application.yml similarity index 100% rename from src/test/resources/application.yml rename to moring-api/src/test/resources/application.yml diff --git a/moring-domain/build.gradle b/moring-domain/build.gradle new file mode 100644 index 00000000..64ff51a4 --- /dev/null +++ b/moring-domain/build.gradle @@ -0,0 +1,11 @@ +bootJar { + enabled = false +} + +jar { + enabled = true +} + +dependencies { + implementation project(':moring-global-utils') +} diff --git a/src/main/java/org/depromeet/sambad/moring/answer/application/AnswerRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerRepository.java similarity index 58% rename from src/main/java/org/depromeet/sambad/moring/answer/application/AnswerRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerRepository.java index 656c8ad2..24210832 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/application/AnswerRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.answer.application; +package org.depromeet.sambad.moring.domain.answer.application; import java.util.Optional; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; public interface AnswerRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/answer/application/AnswerService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerService.java similarity index 64% rename from src/main/java/org/depromeet/sambad/moring/answer/application/AnswerService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerService.java index 594b2856..eb986cac 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/application/AnswerService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/application/AnswerService.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.answer.application; +package org.depromeet.sambad.moring.domain.answer.application; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.answer.presentation.exception.NotFoundAnswerException; -import org.depromeet.sambad.moring.answer.presentation.request.AnswerRequest; -import org.depromeet.sambad.moring.question.application.QuestionService; -import org.depromeet.sambad.moring.question.domain.Question; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.presentation.exception.NotFoundAnswerException; +import org.depromeet.sambad.moring.domain.answer.presentation.request.AnswerRequest; +import org.depromeet.sambad.moring.domain.question.application.QuestionService; +import org.depromeet.sambad.moring.domain.question.domain.Question; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/answer/domain/Answer.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/domain/Answer.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/answer/domain/Answer.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/domain/Answer.java index 219933a7..3c8332aa 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/domain/Answer.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/domain/Answer.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.answer.domain; +package org.depromeet.sambad.moring.domain.answer.domain; import java.util.ArrayList; import java.util.List; -import org.depromeet.sambad.moring.answer.presentation.exception.InvalidAnswerContentException; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.question.domain.Question; +import org.depromeet.sambad.moring.domain.answer.presentation.exception.InvalidAnswerContentException; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.question.domain.Question; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerJpaRepository.java similarity index 64% rename from src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerJpaRepository.java index b2800049..c6010df5 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.answer.infrastructure; +package org.depromeet.sambad.moring.domain.answer.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; import org.springframework.data.jpa.repository.JpaRepository; public interface AnswerJpaRepository extends JpaRepository<Answer, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerRepositoryImpl.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerRepositoryImpl.java index 6550a1c1..5fee44ee 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/infrastructure/AnswerRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/infrastructure/AnswerRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.answer.infrastructure; +package org.depromeet.sambad.moring.domain.answer.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.answer.application.AnswerRepository; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.application.AnswerRepository; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/AnswerExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/AnswerExceptionCode.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/AnswerExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/AnswerExceptionCode.java index ef9f3243..11d86a7e 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/AnswerExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/AnswerExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.answer.presentation.exception; +package org.depromeet.sambad.moring.domain.answer.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/InvalidAnswerContentException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/InvalidAnswerContentException.java new file mode 100644 index 00000000..648cc371 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/InvalidAnswerContentException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.answer.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidAnswerContentException extends BusinessException { + public InvalidAnswerContentException() { + super(AnswerExceptionCode.INVALID_ANSWER_CONTENT); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/NotFoundAnswerException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/NotFoundAnswerException.java new file mode 100644 index 00000000..ca57a59c --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/exception/NotFoundAnswerException.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.answer.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundAnswerException extends BusinessException { + + public NotFoundAnswerException() { + super(AnswerExceptionCode.NOT_FOUND_ANSWER); + } +} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/answer/presentation/request/AnswerRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/request/AnswerRequest.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/answer/presentation/request/AnswerRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/request/AnswerRequest.java index 575b8074..b3f360fe 100644 --- a/src/main/java/org/depromeet/sambad/moring/answer/presentation/request/AnswerRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/answer/presentation/request/AnswerRequest.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.answer.presentation.request; +package org.depromeet.sambad.moring.domain.answer.presentation.request; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/AuthService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/AuthService.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/auth/application/AuthService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/AuthService.java index b08b6ba2..961f074d 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/AuthService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/AuthService.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.auth.application; - -import org.depromeet.sambad.moring.auth.application.dto.AuthAttributes; -import org.depromeet.sambad.moring.auth.domain.LoginResult; -import org.depromeet.sambad.moring.auth.domain.RefreshToken; -import org.depromeet.sambad.moring.auth.domain.TokenGenerator; -import org.depromeet.sambad.moring.auth.infrastructure.TokenProperties; -import org.depromeet.sambad.moring.auth.presentation.exception.AlreadyRegisteredUserException; -import org.depromeet.sambad.moring.file.application.FileService; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.domain.UserRepository; +package org.depromeet.sambad.moring.domain.auth.application; + +import org.depromeet.sambad.moring.domain.auth.application.dto.AuthAttributes; +import org.depromeet.sambad.moring.domain.auth.domain.LoginResult; +import org.depromeet.sambad.moring.domain.auth.domain.RefreshToken; +import org.depromeet.sambad.moring.domain.auth.domain.TokenGenerator; +import org.depromeet.sambad.moring.domain.auth.infrastructure.TokenProperties; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.AlreadyRegisteredUserException; +import org.depromeet.sambad.moring.domain.file.application.FileService; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.UserRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2LoginSuccessHandler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2LoginSuccessHandler.java similarity index 79% rename from src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2LoginSuccessHandler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2LoginSuccessHandler.java index 777ddd2f..a8cfe1fc 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2LoginSuccessHandler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2LoginSuccessHandler.java @@ -1,17 +1,17 @@ -package org.depromeet.sambad.moring.auth.application; +package org.depromeet.sambad.moring.domain.auth.application; -import static org.depromeet.sambad.moring.auth.presentation.RedirectUrlFilter.*; -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; +import static org.depromeet.sambad.moring.domain.auth.presentation.RedirectUrlFilter.*; import java.io.IOException; import java.util.Arrays; import java.util.Objects; -import org.depromeet.sambad.moring.auth.domain.CustomOAuth2User; -import org.depromeet.sambad.moring.auth.domain.LoginResult; -import org.depromeet.sambad.moring.auth.infrastructure.SecurityProperties; -import org.depromeet.sambad.moring.auth.presentation.exception.AlreadyRegisteredUserException; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.auth.domain.CustomOAuth2User; +import org.depromeet.sambad.moring.domain.auth.domain.LoginResult; +import org.depromeet.sambad.moring.domain.auth.infrastructure.SecurityProperties; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.AlreadyRegisteredUserException; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.AuthExceptionCode; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.stereotype.Component; @@ -86,6 +86,6 @@ private String determineRedirectUrl(LoginResult result, String redirectCookie) { } private void handleAlreadyExistUser(HttpServletResponse response) throws IOException { - response.sendRedirect(securityProperties.loginUrl() + "?error=true&exception=" + ALREADY_REGISTERED_USER); + response.sendRedirect(securityProperties.loginUrl() + "?error=true&exception=" + AuthExceptionCode.ALREADY_REGISTERED_USER); } } diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserDetailsService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserDetailsService.java similarity index 74% rename from src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserDetailsService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserDetailsService.java index 83128578..5f6afd29 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserDetailsService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserDetailsService.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.auth.application; +package org.depromeet.sambad.moring.domain.auth.application; -import org.depromeet.sambad.moring.auth.domain.CustomUserDetails; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.domain.UserRepository; +import org.depromeet.sambad.moring.domain.auth.domain.CustomUserDetails; +import org.depromeet.sambad.moring.domain.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.UserRepository; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserService.java similarity index 87% rename from src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserService.java index 294bf063..f37d14e5 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/OAuth2UserService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/OAuth2UserService.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.auth.application; +package org.depromeet.sambad.moring.domain.auth.application; import java.util.List; -import org.depromeet.sambad.moring.auth.application.dto.AuthAttributes; -import org.depromeet.sambad.moring.auth.domain.CustomOAuth2User; +import org.depromeet.sambad.moring.domain.auth.application.dto.AuthAttributes; +import org.depromeet.sambad.moring.domain.auth.domain.CustomOAuth2User; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.oauth2.client.registration.ClientRegistration; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenRepository.java similarity index 62% rename from src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenRepository.java index 37f60e07..f13abf0b 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.auth.application; +package org.depromeet.sambad.moring.domain.auth.application; import java.util.Optional; -import org.depromeet.sambad.moring.auth.domain.RefreshToken; +import org.depromeet.sambad.moring.domain.auth.domain.RefreshToken; public interface RefreshTokenRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenService.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenService.java index c8b1372f..aa168d52 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/RefreshTokenService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/RefreshTokenService.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.auth.application; - -import org.depromeet.sambad.moring.auth.domain.LoginResult; -import org.depromeet.sambad.moring.auth.domain.RefreshToken; -import org.depromeet.sambad.moring.auth.domain.TokenGenerator; -import org.depromeet.sambad.moring.auth.domain.TokenResolver; -import org.depromeet.sambad.moring.auth.infrastructure.TokenProperties; -import org.depromeet.sambad.moring.auth.presentation.exception.AuthenticationRequiredException; +package org.depromeet.sambad.moring.domain.auth.application; + +import org.depromeet.sambad.moring.domain.auth.domain.LoginResult; +import org.depromeet.sambad.moring.domain.auth.domain.RefreshToken; +import org.depromeet.sambad.moring.domain.auth.domain.TokenGenerator; +import org.depromeet.sambad.moring.domain.auth.domain.TokenResolver; +import org.depromeet.sambad.moring.domain.auth.infrastructure.TokenProperties; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.AuthenticationRequiredException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/TokenInjector.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/TokenInjector.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/auth/application/TokenInjector.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/TokenInjector.java index 06998964..449ccfdd 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/TokenInjector.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/TokenInjector.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.auth.application; +package org.depromeet.sambad.moring.domain.auth.application; import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.*; -import org.depromeet.sambad.moring.auth.domain.LoginResult; -import org.depromeet.sambad.moring.auth.infrastructure.SecurityProperties; -import org.depromeet.sambad.moring.auth.infrastructure.TokenProperties; +import org.depromeet.sambad.moring.domain.auth.domain.LoginResult; +import org.depromeet.sambad.moring.domain.auth.infrastructure.SecurityProperties; +import org.depromeet.sambad.moring.domain.auth.infrastructure.TokenProperties; import org.springframework.stereotype.Service; import jakarta.servlet.http.Cookie; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/dto/AuthAttributes.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/AuthAttributes.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/auth/application/dto/AuthAttributes.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/AuthAttributes.java index 2fbb2f4e..d6739f39 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/dto/AuthAttributes.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/AuthAttributes.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.auth.application.dto; +package org.depromeet.sambad.moring.domain.auth.application.dto; import java.util.Map; -import org.depromeet.sambad.moring.user.domain.LoginProvider; +import org.depromeet.sambad.moring.domain.user.domain.LoginProvider; public interface AuthAttributes { diff --git a/src/main/java/org/depromeet/sambad/moring/auth/application/dto/KakaoAuthAttributes.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/KakaoAuthAttributes.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/auth/application/dto/KakaoAuthAttributes.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/KakaoAuthAttributes.java index 92e44614..01c89837 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/application/dto/KakaoAuthAttributes.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/application/dto/KakaoAuthAttributes.java @@ -1,10 +1,8 @@ -package org.depromeet.sambad.moring.auth.application.dto; - -import static org.depromeet.sambad.moring.user.domain.LoginProvider.*; +package org.depromeet.sambad.moring.domain.auth.application.dto; import java.util.Map; -import org.depromeet.sambad.moring.user.domain.LoginProvider; +import org.depromeet.sambad.moring.domain.user.domain.LoginProvider; import org.springframework.util.StringUtils; import lombok.AccessLevel; @@ -35,7 +33,7 @@ public static KakaoAuthAttributes of(Map<String, Object> attributes) { (String)kakaoAccount.get("email"), (String)profile.get("nickname"), (String)profile.get("profile_image_url"), - kakao + LoginProvider.kakao ); } diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/CustomOAuth2User.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomOAuth2User.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/CustomOAuth2User.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomOAuth2User.java index 1901bfb8..9ec9e58e 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/CustomOAuth2User.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomOAuth2User.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; import java.util.Collection; import java.util.Map; -import org.depromeet.sambad.moring.auth.application.dto.AuthAttributes; +import org.depromeet.sambad.moring.domain.auth.application.dto.AuthAttributes; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.oauth2.core.user.DefaultOAuth2User; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/CustomUserDetails.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomUserDetails.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/CustomUserDetails.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomUserDetails.java index 5a068774..1d05739d 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/CustomUserDetails.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/CustomUserDetails.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; import java.util.Collection; import java.util.List; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/LoginResult.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/LoginResult.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/LoginResult.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/LoginResult.java index a9efb8e9..3215ac9e 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/LoginResult.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/LoginResult.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; public record LoginResult( String accessToken, diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/RefreshToken.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/RefreshToken.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/RefreshToken.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/RefreshToken.java index 1e8c522a..7d2d0ddc 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/RefreshToken.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/RefreshToken.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; import static lombok.AccessLevel.*; import java.time.LocalDateTime; import java.util.Objects; -import org.depromeet.sambad.moring.auth.presentation.exception.RefreshTokenNotValidaException; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.RefreshTokenNotValidaException; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/TokenGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenGenerator.java similarity index 68% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/TokenGenerator.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenGenerator.java index ce793467..192edb12 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/TokenGenerator.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenGenerator.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; public interface TokenGenerator { diff --git a/src/main/java/org/depromeet/sambad/moring/auth/domain/TokenResolver.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenResolver.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/auth/domain/TokenResolver.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenResolver.java index 2bfb5a95..a45bd8f8 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/domain/TokenResolver.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/domain/TokenResolver.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.domain; +package org.depromeet.sambad.moring.domain.auth.domain; import java.util.Optional; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenGenerator.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenGenerator.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenGenerator.java index f8662b78..11bd310e 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenGenerator.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenGenerator.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import static io.jsonwebtoken.io.Decoders.*; @@ -6,7 +6,7 @@ import javax.crypto.SecretKey; -import org.depromeet.sambad.moring.auth.domain.TokenGenerator; +import org.depromeet.sambad.moring.domain.auth.domain.TokenGenerator; import org.springframework.stereotype.Component; import io.jsonwebtoken.Jwts; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenResolver.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenResolver.java similarity index 94% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenResolver.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenResolver.java index 95c47f20..d86f5546 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/JwtTokenResolver.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/JwtTokenResolver.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import static org.springframework.http.HttpHeaders.*; import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.*; @@ -11,7 +11,7 @@ import javax.crypto.SecretKey; -import org.depromeet.sambad.moring.auth.domain.TokenResolver; +import org.depromeet.sambad.moring.domain.auth.domain.TokenResolver; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenJpaRepository.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenJpaRepository.java index ce498d05..c1efb868 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.auth.domain.RefreshToken; +import org.depromeet.sambad.moring.domain.auth.domain.RefreshToken; import org.springframework.data.jpa.repository.JpaRepository; public interface RefreshTokenJpaRepository extends JpaRepository<RefreshToken, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenRepositoryImpl.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenRepositoryImpl.java index 00d6b85c..0a19e1b4 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/RefreshTokenRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/RefreshTokenRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.auth.application.RefreshTokenRepository; -import org.depromeet.sambad.moring.auth.domain.RefreshToken; +import org.depromeet.sambad.moring.domain.auth.application.RefreshTokenRepository; +import org.depromeet.sambad.moring.domain.auth.domain.RefreshToken; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/SecurityProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/SecurityProperties.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/SecurityProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/SecurityProperties.java index 11a0f023..84c8d647 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/SecurityProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/SecurityProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/TokenProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/TokenProperties.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/auth/infrastructure/TokenProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/TokenProperties.java index d65950fa..db0a2f87 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/infrastructure/TokenProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/infrastructure/TokenProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.infrastructure; +package org.depromeet.sambad.moring.domain.auth.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/JwtTokenFilter.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/JwtTokenFilter.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/JwtTokenFilter.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/JwtTokenFilter.java index b4ebe2ab..5c70aeea 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/JwtTokenFilter.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/JwtTokenFilter.java @@ -1,14 +1,14 @@ -package org.depromeet.sambad.moring.auth.presentation; +package org.depromeet.sambad.moring.domain.auth.presentation; import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.*; import java.io.IOException; -import org.depromeet.sambad.moring.auth.application.RefreshTokenService; -import org.depromeet.sambad.moring.auth.application.TokenInjector; -import org.depromeet.sambad.moring.auth.domain.TokenResolver; -import org.depromeet.sambad.moring.auth.presentation.exception.AuthenticationRequiredException; -import org.depromeet.sambad.moring.auth.presentation.exception.RefreshTokenNotValidaException; +import org.depromeet.sambad.moring.domain.auth.application.RefreshTokenService; +import org.depromeet.sambad.moring.domain.auth.application.TokenInjector; +import org.depromeet.sambad.moring.domain.auth.domain.TokenResolver; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.AuthenticationRequiredException; +import org.depromeet.sambad.moring.domain.auth.presentation.exception.RefreshTokenNotValidaException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/LoginController.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/LoginController.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/LoginController.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/LoginController.java index 93590693..1ef8d9ce 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/LoginController.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/LoginController.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.auth.presentation; +package org.depromeet.sambad.moring.domain.auth.presentation; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Controller; diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/RedirectUrlFilter.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/RedirectUrlFilter.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/RedirectUrlFilter.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/RedirectUrlFilter.java index ee1907ea..dd37426f 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/RedirectUrlFilter.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/RedirectUrlFilter.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.auth.presentation; +package org.depromeet.sambad.moring.domain.auth.presentation; import java.io.IOException; import java.util.List; -import org.depromeet.sambad.moring.auth.application.TokenInjector; +import org.depromeet.sambad.moring.domain.auth.application.TokenInjector; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AlreadyRegisteredUserException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AlreadyRegisteredUserException.java new file mode 100644 index 00000000..e45de9ca --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AlreadyRegisteredUserException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.auth.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class AlreadyRegisteredUserException extends BusinessException { + public AlreadyRegisteredUserException() { + super(AuthExceptionCode.ALREADY_REGISTERED_USER); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthExceptionCode.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthExceptionCode.java index 2197ced1..8ff8a828 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; +package org.depromeet.sambad.moring.domain.auth.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthenticationRequiredException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthenticationRequiredException.java new file mode 100644 index 00000000..b1961ff1 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/AuthenticationRequiredException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.auth.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class AuthenticationRequiredException extends BusinessException { + public AuthenticationRequiredException() { + super(AuthExceptionCode.AUTHENTICATION_REQUIRED); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/CustomAuthenticationFailureHandler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/CustomAuthenticationFailureHandler.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/CustomAuthenticationFailureHandler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/CustomAuthenticationFailureHandler.java index 2183bf68..7f784dc8 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/CustomAuthenticationFailureHandler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/CustomAuthenticationFailureHandler.java @@ -1,10 +1,8 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; - -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; +package org.depromeet.sambad.moring.domain.auth.presentation.exception; import java.io.IOException; -import org.depromeet.sambad.moring.auth.infrastructure.SecurityProperties; +import org.depromeet.sambad.moring.domain.auth.infrastructure.SecurityProperties; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; import org.springframework.stereotype.Component; @@ -25,7 +23,7 @@ public void onAuthenticationFailure( HttpServletRequest request, HttpServletResponse response, AuthenticationException exception ) throws IOException, ServletException { // 에러 메시지를 쿼리 파라미터로 추가하여 리다이렉트 - super.setDefaultFailureUrl(securityProperties.loginUrl() + "?error=true&exception=" + AUTHENTICATION_REQUIRED); + super.setDefaultFailureUrl(securityProperties.loginUrl() + "?error=true&exception=" + AuthExceptionCode.AUTHENTICATION_REQUIRED); super.onAuthenticationFailure(request, response, exception); } } diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/JwtAuthenticationEntryPoint.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/JwtAuthenticationEntryPoint.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/JwtAuthenticationEntryPoint.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/JwtAuthenticationEntryPoint.java index 3079c58b..18bd4879 100644 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/JwtAuthenticationEntryPoint.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/JwtAuthenticationEntryPoint.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; +package org.depromeet.sambad.moring.domain.auth.presentation.exception; import static jakarta.servlet.http.HttpServletResponse.*; -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; +import static org.depromeet.sambad.moring.domain.auth.presentation.exception.AuthExceptionCode.*; import java.io.IOException; -import org.depromeet.sambad.moring.common.exception.ExceptionResponse; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionResponse; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.stereotype.Component; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/RefreshTokenNotValidaException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/RefreshTokenNotValidaException.java new file mode 100644 index 00000000..7791a816 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/auth/presentation/exception/RefreshTokenNotValidaException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.auth.presentation.exception; + +import static org.depromeet.sambad.moring.domain.auth.presentation.exception.AuthExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class RefreshTokenNotValidaException extends BusinessException { + public RefreshTokenNotValidaException() { + super(REFRESH_TOKEN_NOT_VALID); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/SecurityConfig.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/config/SecurityConfig.java similarity index 94% rename from src/main/java/org/depromeet/sambad/moring/common/config/SecurityConfig.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/config/SecurityConfig.java index f0bf533d..303cc15d 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/SecurityConfig.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/config/SecurityConfig.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.domain.common.config; import static org.springframework.security.config.http.SessionCreationPolicy.*; import java.util.List; -import org.depromeet.sambad.moring.auth.infrastructure.SecurityProperties; -import org.depromeet.sambad.moring.auth.presentation.JwtTokenFilter; -import org.depromeet.sambad.moring.auth.presentation.RedirectUrlFilter; +import org.depromeet.sambad.moring.domain.auth.infrastructure.SecurityProperties; +import org.depromeet.sambad.moring.domain.auth.presentation.JwtTokenFilter; +import org.depromeet.sambad.moring.domain.auth.presentation.RedirectUrlFilter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/src/main/java/org/depromeet/sambad/moring/common/domain/BaseTimeEntity.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/BaseTimeEntity.java similarity index 94% rename from src/main/java/org/depromeet/sambad/moring/common/domain/BaseTimeEntity.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/BaseTimeEntity.java index 8c9a62a4..8155d236 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/domain/BaseTimeEntity.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/BaseTimeEntity.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.domain; +package org.depromeet.sambad.moring.domain.common.domain; import java.time.LocalDateTime; import java.time.ZoneId; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/Gender.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/Gender.java new file mode 100644 index 00000000..79cd886f --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/domain/Gender.java @@ -0,0 +1,8 @@ +package org.depromeet.sambad.moring.domain.common.domain; + +public enum Gender { + MALE, + FEMALE, + + ; +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/BusinessException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/BusinessException.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/common/exception/BusinessException.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/BusinessException.java index 649ed0dd..17d9082c 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/BusinessException.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/BusinessException.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; import static org.springframework.http.HttpStatus.*; diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionCode.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionCode.java index a8dc4053..08f348dc 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionCode.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; import org.springframework.http.HttpStatus; diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionResponse.java similarity index 93% rename from src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionResponse.java index 889c52fd..fba86d83 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/ExceptionResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/ExceptionResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; import org.springframework.http.HttpStatus; diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionCode.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionCode.java index 8a99d7e7..d2de2a89 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionCode.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; import static org.springframework.http.HttpStatus.*; diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionHandler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionHandler.java similarity index 92% rename from src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionHandler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionHandler.java index 918ef662..cf30c4ba 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/GlobalExceptionHandler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/GlobalExceptionHandler.java @@ -1,7 +1,8 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; -import static org.depromeet.sambad.moring.common.exception.GlobalExceptionCode.*; -import static org.depromeet.sambad.moring.file.presentation.exception.FileExceptionCode.*; + +import static org.depromeet.sambad.moring.domain.common.exception.GlobalExceptionCode.*; +import static org.depromeet.sambad.moring.domain.file.presentation.exception.FileExceptionCode.*; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/org/depromeet/sambad/moring/common/exception/SentryClient.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/SentryClient.java similarity index 74% rename from src/main/java/org/depromeet/sambad/moring/common/exception/SentryClient.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/SentryClient.java index b3bc9163..86ce4973 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/exception/SentryClient.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/exception/SentryClient.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.common.exception; +package org.depromeet.sambad.moring.domain.common.exception; -import org.depromeet.sambad.moring.common.logging.LoggingUtils; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/depromeet/sambad/moring/common/handler/ExcelSheetHandler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/handler/ExcelSheetHandler.java similarity index 97% rename from src/main/java/org/depromeet/sambad/moring/common/handler/ExcelSheetHandler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/handler/ExcelSheetHandler.java index 92810077..2e2e4deb 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/handler/ExcelSheetHandler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/handler/ExcelSheetHandler.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.handler; +package org.depromeet.sambad.moring.domain.common.handler; import java.io.File; import java.io.IOException; diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionLoggingAdvice.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ExecutionLoggingAdvice.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionLoggingAdvice.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ExecutionLoggingAdvice.java index 43dfa2f8..64c1a9ee 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionLoggingAdvice.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ExecutionLoggingAdvice.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.domain.common.logging; import java.lang.reflect.Method; import java.util.List; @@ -12,7 +12,8 @@ import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; -import org.depromeet.sambad.moring.common.exception.BusinessException; +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; import org.springframework.util.StopWatch; @@ -26,16 +27,15 @@ public class ExecutionLoggingAdvice { @Pointcut("execution(public * org.depromeet.sambad.moring..*(..)) && " - + "!execution(* org.depromeet.sambad.moring.*.infrastructure.*Properties.*(..)) && " - + "!execution(* org.depromeet.sambad.moring.*.*.infrastructure.*Properties.*(..)) && " - + "!execution(* org.depromeet.sambad.moring.common..*(..)) && " - + "!execution(* org.depromeet.sambad.moring.*.*.annotation..*(..)) && " - + "!@annotation(org.depromeet.sambad.moring.common.logging.NoLogging)" + + "!execution(* org.depromeet.sambad.moring.domain.common..*(..)) && " + + "!execution(* org.depromeet.sambad.moring.domain.auth.infrastructure.TokenProperties) && " + + "!@annotation(org.depromeet.sambad.moring.globalutils.logging.NoLogging) && " + + "!@annotation(org.springframework.boot.context.properties.ConfigurationProperties)" ) private void logPointcut() { } - @Pointcut("@annotation(org.depromeet.sambad.moring.common.logging.ExecutionTimer)") + @Pointcut("@annotation(org.depromeet.sambad.moring.globalutils.logging.ExecutionTimer)") private void executionTimer() { } diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/ServerErrorAlertAdvice.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ServerErrorAlertAdvice.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/common/logging/ServerErrorAlertAdvice.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ServerErrorAlertAdvice.java index 1292fd5f..374f9b84 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/ServerErrorAlertAdvice.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/logging/ServerErrorAlertAdvice.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.domain.common.logging; import java.lang.reflect.Method; import java.util.List; @@ -8,7 +8,8 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; -import org.depromeet.sambad.moring.common.exception.BusinessException; +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; @@ -20,8 +21,8 @@ @Component public class ServerErrorAlertAdvice { - @Pointcut( - "within(org.depromeet.sambad.moring..*) && " + "!@within(org.depromeet.sambad.moring.auth.presentation.*Filter)" + @Pointcut("within(org.depromeet.sambad.moring..*) && " + + "!@within(org.depromeet.sambad.moring.domain.auth.presentation.*Filter)" ) private void allPointcut() { } diff --git a/src/main/java/org/depromeet/sambad/moring/common/response/PageableResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/response/PageableResponse.java similarity index 95% rename from src/main/java/org/depromeet/sambad/moring/common/response/PageableResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/response/PageableResponse.java index d432d661..4d6cfd97 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/response/PageableResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/common/response/PageableResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.response; +package org.depromeet.sambad.moring.domain.common.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventMessageTemplateRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventMessageTemplateRepository.java new file mode 100644 index 00000000..5cfde06d --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventMessageTemplateRepository.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.event.application; + +import java.util.Optional; + +import org.depromeet.sambad.moring.domain.event.domain.EventMessageTemplate; +import org.depromeet.sambad.moring.domain.event.domain.EventType; + +public interface EventMessageTemplateRepository { + + Optional<EventMessageTemplate> findByType(EventType type); +} diff --git a/src/main/java/org/depromeet/sambad/moring/event/application/EventRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventRepository.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/event/application/EventRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventRepository.java index 1548ab62..1625121f 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/application/EventRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventRepository.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.event.application; +package org.depromeet.sambad.moring.domain.event.application; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventStatus; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventStatus; +import org.depromeet.sambad.moring.domain.event.domain.EventType; public interface EventRepository { void save(Event event); diff --git a/src/main/java/org/depromeet/sambad/moring/event/application/EventService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventService.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/event/application/EventService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventService.java index 02bba12a..3b98b850 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/application/EventService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/application/EventService.java @@ -1,18 +1,18 @@ -package org.depromeet.sambad.moring.event.application; +package org.depromeet.sambad.moring.domain.event.application; -import static org.depromeet.sambad.moring.event.domain.EventStatus.*; +import static org.depromeet.sambad.moring.domain.event.domain.EventStatus.*; import java.time.LocalDateTime; import java.util.List; import java.util.Map; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventType; -import org.depromeet.sambad.moring.event.infrastructure.EventProperties; -import org.depromeet.sambad.moring.event.presentation.excepiton.NotFoundEventException; -import org.depromeet.sambad.moring.event.presentation.response.PollingEventListResponse; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWaving; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.infrastructure.EventProperties; +import org.depromeet.sambad.moring.domain.event.presentation.excepiton.NotFoundEventException; +import org.depromeet.sambad.moring.domain.event.presentation.response.PollingEventListResponse; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWaving; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/event/domain/Event.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/Event.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/event/domain/Event.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/Event.java index a9a145ee..7ee80e3b 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/domain/Event.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/Event.java @@ -1,15 +1,14 @@ -package org.depromeet.sambad.moring.event.domain; +package org.depromeet.sambad.moring.domain.event.domain; import static jakarta.persistence.EnumType.*; import static jakarta.persistence.GenerationType.*; import static lombok.AccessLevel.*; -import static org.depromeet.sambad.moring.event.domain.EventStatus.*; -import static org.depromeet.sambad.moring.event.domain.EventType.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion.*; +import static org.depromeet.sambad.moring.domain.event.domain.EventStatus.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion.*; import java.time.LocalDateTime; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -78,6 +77,6 @@ public boolean isActive() { } public boolean isHandWavingEvent() { - return type == HAND_WAVING_REQUESTED; + return type == EventType.HAND_WAVING_REQUESTED; } } diff --git a/src/main/java/org/depromeet/sambad/moring/event/domain/EventMessageTemplate.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventMessageTemplate.java similarity index 95% rename from src/main/java/org/depromeet/sambad/moring/event/domain/EventMessageTemplate.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventMessageTemplate.java index ac838fdb..fe5250cc 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/domain/EventMessageTemplate.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventMessageTemplate.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.event.domain; +package org.depromeet.sambad.moring.domain.event.domain; import static jakarta.persistence.EnumType.*; import static jakarta.persistence.GenerationType.*; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventStatus.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventStatus.java new file mode 100644 index 00000000..fd70ed75 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventStatus.java @@ -0,0 +1,7 @@ +package org.depromeet.sambad.moring.domain.event.domain; + +public enum EventStatus { + ACTIVE, + INACTIVE, + ; +} diff --git a/src/main/java/org/depromeet/sambad/moring/event/domain/EventType.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventType.java similarity index 61% rename from src/main/java/org/depromeet/sambad/moring/event/domain/EventType.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventType.java index 17b155c2..80074655 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/domain/EventType.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/domain/EventType.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.event.domain; +package org.depromeet.sambad.moring.domain.event.domain; public enum EventType { QUESTION_REGISTERED, diff --git a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventJpaRepository.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventJpaRepository.java index 7b99cb98..c01b12f0 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventJpaRepository.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.event.infrastructure; +package org.depromeet.sambad.moring.domain.event.infrastructure; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventStatus; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventStatus; +import org.depromeet.sambad.moring.domain.event.domain.EventType; import org.springframework.data.jpa.repository.JpaRepository; public interface EventJpaRepository extends JpaRepository<Event, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateJpaRepository.java similarity index 55% rename from src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateJpaRepository.java index 40fd3cfe..78c57c74 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateJpaRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.event.infrastructure; +package org.depromeet.sambad.moring.domain.event.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.event.domain.EventMessageTemplate; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.domain.EventMessageTemplate; +import org.depromeet.sambad.moring.domain.event.domain.EventType; import org.springframework.data.jpa.repository.JpaRepository; public interface EventMessageTemplateJpaRepository extends JpaRepository<EventMessageTemplate, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateRepositoryImpl.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateRepositoryImpl.java index af024b83..91bac940 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventMessageTemplateRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventMessageTemplateRepositoryImpl.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.event.infrastructure; +package org.depromeet.sambad.moring.domain.event.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.common.logging.NoLogging; -import org.depromeet.sambad.moring.event.application.EventMessageTemplateRepository; -import org.depromeet.sambad.moring.event.domain.EventMessageTemplate; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.application.EventMessageTemplateRepository; +import org.depromeet.sambad.moring.domain.event.domain.EventMessageTemplate; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.globalutils.logging.NoLogging; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.scheduling.annotation.Scheduled; diff --git a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventProperties.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventProperties.java index 39154f49..e7a31692 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.event.infrastructure; +package org.depromeet.sambad.moring.domain.event.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventRepositoryImpl.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventRepositoryImpl.java index 6c0469c2..0e936d76 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/infrastructure/EventRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/infrastructure/EventRepositoryImpl.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.event.infrastructure; +package org.depromeet.sambad.moring.domain.event.infrastructure; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.event.application.EventRepository; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventStatus; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.application.EventRepository; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventStatus; +import org.depromeet.sambad.moring.domain.event.domain.EventType; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/EventFacade.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/EventFacade.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/EventFacade.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/EventFacade.java index ed4b738f..d2ea7895 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/EventFacade.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/EventFacade.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.event.presentation; +package org.depromeet.sambad.moring.domain.event.presentation; import java.util.List; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.presentation.response.EventListResponse; -import org.depromeet.sambad.moring.event.presentation.response.EventResponse; -import org.depromeet.sambad.moring.meeting.handwaving.application.HandWavingService; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingSummary; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.presentation.response.EventListResponse; +import org.depromeet.sambad.moring.domain.event.presentation.response.EventResponse; +import org.depromeet.sambad.moring.domain.meeting.handwaving.application.HandWavingService; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingSummary; import org.springframework.stereotype.Service; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/EventExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/EventExceptionCode.java similarity index 67% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/EventExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/EventExceptionCode.java index 8a9e4a7c..f6e23dca 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/EventExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/EventExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.event.presentation.excepiton; +package org.depromeet.sambad.moring.domain.event.presentation.excepiton; -import static org.springframework.http.HttpStatus.NOT_FOUND; +import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/NotFoundEventException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/NotFoundEventException.java new file mode 100644 index 00000000..37497884 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/excepiton/NotFoundEventException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.event.presentation.excepiton; + +import static org.depromeet.sambad.moring.domain.event.presentation.excepiton.EventExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundEventException extends BusinessException { + public NotFoundEventException() { + super(NOT_FOUND_EVENT); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventListResponse.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventListResponse.java index 7415f514..b2e9a5f1 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventListResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.event.presentation.response; +package org.depromeet.sambad.moring.domain.event.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventResponse.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventResponse.java index 1449a1f0..137fb5ff 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/EventResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/EventResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.event.presentation.response; +package org.depromeet.sambad.moring.domain.event.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; @@ -6,9 +6,9 @@ import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventStatus; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventStatus; +import org.depromeet.sambad.moring.domain.event.domain.EventType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponse.java similarity index 87% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponse.java index c86afd2a..525ede2d 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.event.presentation.response; +package org.depromeet.sambad.moring.domain.event.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.Event; import org.springframework.http.ResponseEntity; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponseDetail.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponseDetail.java index aaf66d19..b79e25af 100644 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/response/PollingEventListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/event/presentation/response/PollingEventListResponseDetail.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.event.presentation.response; +package org.depromeet.sambad.moring.domain.event.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.event.domain.EventType; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/file/application/FileService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileService.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/file/application/FileService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileService.java index 138026dc..bc48d11d 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/application/FileService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileService.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.file.application; +package org.depromeet.sambad.moring.domain.file.application; import java.io.IOException; import java.util.List; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.file.domain.FileRepository; -import org.depromeet.sambad.moring.file.presentation.exception.NotFoundFileException; -import org.depromeet.sambad.moring.file.presentation.response.FileUrlResponse; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileRepository; +import org.depromeet.sambad.moring.domain.file.presentation.exception.NotFoundFileException; +import org.depromeet.sambad.moring.domain.file.presentation.response.FileUrlResponse; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/org/depromeet/sambad/moring/file/application/FileUploader.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileUploader.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/file/application/FileUploader.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileUploader.java index 1f17fb95..9d12ec15 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/application/FileUploader.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/application/FileUploader.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.application; +package org.depromeet.sambad.moring.domain.file.application; import java.io.IOException; import java.util.UUID; diff --git a/src/main/java/org/depromeet/sambad/moring/file/domain/FileEntity.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileEntity.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/file/domain/FileEntity.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileEntity.java index 93070fb6..2b827e90 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/domain/FileEntity.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileEntity.java @@ -1,7 +1,7 @@ -package org.depromeet.sambad.moring.file.domain; +package org.depromeet.sambad.moring.domain.file.domain; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.file.presentation.exception.ObjectStorageServerException; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.file.presentation.exception.ObjectStorageServerException; import org.springframework.util.StringUtils; import jakarta.persistence.Column; diff --git a/src/main/java/org/depromeet/sambad/moring/file/domain/FileRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileRepository.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/file/domain/FileRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileRepository.java index 86cd9217..46e0db35 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/domain/FileRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/domain/FileRepository.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.domain; +package org.depromeet.sambad.moring.domain.file.domain; import java.util.List; diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileJpaRepository.java similarity index 61% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileJpaRepository.java index 9cf630d2..dc46ae32 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; import org.springframework.data.jpa.repository.JpaRepository; public interface FileJpaRepository extends JpaRepository<FileEntity, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileProperties.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileProperties.java index 2cfa02cb..94ce2ef4 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileRepositoryImpl.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileRepositoryImpl.java index 6eeb7038..0161d8b8 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/FileRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/FileRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.file.domain.FileRepository; -import org.depromeet.sambad.moring.file.presentation.exception.NotFoundFileException; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileRepository; +import org.depromeet.sambad.moring.domain.file.presentation.exception.NotFoundFileException; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/LocalFileUploader.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/LocalFileUploader.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/LocalFileUploader.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/LocalFileUploader.java index a48ce4b9..83c15a11 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/LocalFileUploader.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/LocalFileUploader.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import java.io.IOException; import java.io.InputStream; @@ -7,7 +7,7 @@ import java.nio.file.Path; import java.nio.file.StandardCopyOption; -import org.depromeet.sambad.moring.file.application.FileUploader; +import org.depromeet.sambad.moring.domain.file.application.FileUploader; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageFileUploader.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageFileUploader.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageFileUploader.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageFileUploader.java index 3cf8b675..2dec060e 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageFileUploader.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageFileUploader.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import static org.apache.http.HttpHeaders.*; import static org.springframework.http.HttpMethod.*; @@ -13,10 +13,10 @@ import java.util.Objects; import java.util.Optional; -import org.depromeet.sambad.moring.file.application.FileUploader; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.file.domain.FileRepository; -import org.depromeet.sambad.moring.file.presentation.exception.ObjectStorageServerException; +import org.depromeet.sambad.moring.domain.file.application.FileUploader; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileRepository; +import org.depromeet.sambad.moring.domain.file.presentation.exception.ObjectStorageServerException; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageProperties.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageProperties.java index 1aefcc2c..e0f35080 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/infrastructure/ObjectStorageProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/infrastructure/ObjectStorageProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.infrastructure; +package org.depromeet.sambad.moring.domain.file.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.validation.annotation.Validated; diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrl.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrl.java index 3d71330d..e5544aac 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrl.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.presentation.annotation; +package org.depromeet.sambad.moring.domain.file.presentation.annotation; import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.*; @@ -12,7 +12,7 @@ * * @see FullFileUrlSerializer * @see FullFileUrlAnnotationIntrospector - * @see org.depromeet.sambad.moring.common.config.JacksonConfig + * @see FullFileUrlConfig */ @Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE}) @Retention(RUNTIME) diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java index 9852d5ba..8421702a 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlAnnotationIntrospector.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.file.presentation.annotation; +package org.depromeet.sambad.moring.domain.file.presentation.annotation; import org.springframework.stereotype.Component; @@ -8,8 +8,8 @@ import lombok.RequiredArgsConstructor; -@RequiredArgsConstructor @Component +@RequiredArgsConstructor public class FullFileUrlAnnotationIntrospector extends JacksonAnnotationIntrospector { private final FullFileUrlSerializer fullFileUrlSerializer; diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/JacksonConfig.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlConfig.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/common/config/JacksonConfig.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlConfig.java index f4dffe99..a6ffc649 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/JacksonConfig.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlConfig.java @@ -1,12 +1,11 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.domain.file.presentation.annotation; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrlAnnotationIntrospector; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration -public class JacksonConfig { +public class FullFileUrlConfig { @Bean public Jackson2ObjectMapperBuilderCustomizer customizer( diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlSerializer.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlSerializer.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlSerializer.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlSerializer.java index 20226fdd..5730c5d6 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/annotation/FullFileUrlSerializer.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/annotation/FullFileUrlSerializer.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.file.presentation.annotation; +package org.depromeet.sambad.moring.domain.file.presentation.annotation; import static java.lang.String.*; import java.io.IOException; -import org.depromeet.sambad.moring.file.infrastructure.FileProperties; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonGenerator; @@ -13,11 +13,12 @@ import lombok.RequiredArgsConstructor; -@RequiredArgsConstructor @Component +@RequiredArgsConstructor public class FullFileUrlSerializer extends JsonSerializer<String> { - private final FileProperties fileProperties; + @Value("${file.base-url}") + private String baseUrl; @Override public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { @@ -26,7 +27,7 @@ public void serialize(String value, JsonGenerator gen, SerializerProvider serial return; } - String fullUrl = format("%s/%s", fileProperties.baseUrl(), normalizePath(value)); + String fullUrl = format("%s/%s", baseUrl, normalizePath(value)); gen.writeString(fullUrl); } diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ExceedFileCountException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ExceedFileCountException.java new file mode 100644 index 00000000..b8386443 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ExceedFileCountException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.file.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class ExceedFileCountException extends BusinessException { + public ExceedFileCountException() { + super(FileExceptionCode.EXCEED_FILE_COUNT); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/FileExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/FileExceptionCode.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/exception/FileExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/FileExceptionCode.java index 8cabdf24..15d7989a 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/FileExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/FileExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.file.presentation.exception; +package org.depromeet.sambad.moring.domain.file.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/NotFoundFileException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/NotFoundFileException.java new file mode 100644 index 00000000..e8c1993c --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/NotFoundFileException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.file.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundFileException extends BusinessException { + public NotFoundFileException() { + super(FileExceptionCode.NOT_FOUND_FILE); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ObjectStorageServerException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ObjectStorageServerException.java new file mode 100644 index 00000000..8938f94f --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/ObjectStorageServerException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.file.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class ObjectStorageServerException extends BusinessException { + public ObjectStorageServerException() { + super(FileExceptionCode.OBJECTSTORAGE_SERVER_ERROR); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/UnsupportedFileTypeException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/UnsupportedFileTypeException.java new file mode 100644 index 00000000..d436a37f --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/exception/UnsupportedFileTypeException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.file.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class UnsupportedFileTypeException extends BusinessException { + public UnsupportedFileTypeException() { + super(FileExceptionCode.UNSUPPORTED_FILE_TYPE); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/response/FileUrlResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/response/FileUrlResponse.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/file/presentation/response/FileUrlResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/response/FileUrlResponse.java index 9b97ab3c..3be0085d 100644 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/response/FileUrlResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/file/presentation/response/FileUrlResponse.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.file.presentation.response; +package org.depromeet.sambad.moring.domain.file.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerRepository.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerRepository.java index 4974d558..c8bbe615 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerRepository.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.answer.application; +package org.depromeet.sambad.moring.domain.meeting.answer.application; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MyMeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MyMeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; public interface MeetingAnswerRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerResultService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerResultService.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerResultService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerResultService.java index 004ac093..0617792f 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerResultService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerResultService.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.answer.application; +package org.depromeet.sambad.moring.domain.meeting.answer.application; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.SelectedAnswerResponse; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionRepository; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.NotFoundMeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.SelectedAnswerResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionRepository; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.NotFoundMeetingQuestion; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerService.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerService.java index a99bb1e4..a8d58347 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/application/MeetingAnswerService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/application/MeetingAnswerService.java @@ -1,24 +1,24 @@ -package org.depromeet.sambad.moring.meeting.answer.application; +package org.depromeet.sambad.moring.domain.meeting.answer.application; -import static org.depromeet.sambad.moring.event.domain.EventType.*; +import static org.depromeet.sambad.moring.domain.event.domain.EventType.*; import java.time.Clock; import java.time.LocalDateTime; import java.util.List; -import org.depromeet.sambad.moring.answer.application.AnswerService; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.answer.presentation.exception.DuplicateMeetingAnswerException; -import org.depromeet.sambad.moring.meeting.answer.presentation.request.MeetingAnswerRequest; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MyMeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionRepository; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionService; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.answer.application.AnswerService; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.exception.DuplicateMeetingAnswerException; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.request.MeetingAnswerRequest; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MyMeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionRepository; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionService; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/domain/MeetingAnswer.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/domain/MeetingAnswer.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/domain/MeetingAnswer.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/domain/MeetingAnswer.java index 72e8b12a..2ee09590 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/domain/MeetingAnswer.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/domain/MeetingAnswer.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.meeting.answer.domain; +package org.depromeet.sambad.moring.domain.meeting.answer.domain; import java.util.List; import java.util.Objects; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java index 7b6f5cd9..500c4754 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.answer.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.answer.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java index 7932d432..9959b467 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerQueryRepository.java @@ -1,24 +1,24 @@ -package org.depromeet.sambad.moring.meeting.answer.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.answer.infrastructure; import static com.querydsl.core.types.dsl.Expressions.*; -import static org.depromeet.sambad.moring.meeting.answer.domain.QMeetingAnswer.*; -import static org.depromeet.sambad.moring.meeting.comment.domain.comment.QMeetingQuestionComment.*; -import static org.depromeet.sambad.moring.meeting.member.domain.QMeetingMember.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; -import static org.depromeet.sambad.moring.meeting.question.domain.QMeetingQuestion.*; +import static org.depromeet.sambad.moring.domain.meeting.answer.domain.QMeetingAnswer.*; +import static org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.QMeetingQuestionComment.*; +import static org.depromeet.sambad.moring.domain.meeting.member.domain.QMeetingMember.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.QMeetingQuestion.*; import java.time.LocalDateTime; import java.util.List; import java.util.Objects; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MyMeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MyMeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import org.springframework.stereotype.Repository; import com.querydsl.core.Tuple; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java index b6dc4e58..6ab60e5b 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/MeetingAnswerRepositoryImpl.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.meeting.answer.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.answer.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.application.MeetingAnswerRepository; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.MyMeetingAnswerListResponse; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.answer.application.MeetingAnswerRepository; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.MyMeetingAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java similarity index 74% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java index fd04e898..e2b22406 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MeetingAnswerResponseCustom.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.answer.infrastructure.dto; +package org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto; import java.util.List; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; import com.querydsl.core.annotations.QueryProjection; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java index 350ea7f8..bb041085 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/infrastructure/dto/MyMeetingAnswerResponseCustom.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.answer.infrastructure.dto; +package org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto; import java.util.List; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; import com.querydsl.core.annotations.QueryProjection; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java new file mode 100644 index 00000000..e3cd38a3 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class DuplicateMeetingAnswerException extends BusinessException { + + public DuplicateMeetingAnswerException() { + super(MeetingAnswerExceptionCode.DUPLICATE_MEETING_ANSWER); + } +} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java index 01dbdd1b..a417eefa 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/exception/MeetingAnswerExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.exception; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/request/MeetingAnswerRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/request/MeetingAnswerRequest.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/request/MeetingAnswerRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/request/MeetingAnswerRequest.java index 9cde66b9..862f7a07 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/request/MeetingAnswerRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/request/MeetingAnswerRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.request; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.request; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/AnswerResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/AnswerResponse.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/AnswerResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/AnswerResponse.java index 4c634ba8..d99373d1 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/AnswerResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/AnswerResponse.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; import java.util.stream.Collectors; -import org.depromeet.sambad.moring.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponse.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponse.java index 65edd209..64a30cd9 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java index 17e8b911..4449b66e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MeetingAnswerListResponseDetail.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; import java.util.stream.IntStream; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MeetingAnswerResponseCustom; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java index deac952b..8c4e0836 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java index 6c5ec885..8fd6090c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/MyMeetingAnswerListResponseDetail.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; import java.util.stream.IntStream; -import org.depromeet.sambad.moring.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; +import org.depromeet.sambad.moring.domain.meeting.answer.infrastructure.dto.MyMeetingAnswerResponseCustom; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/SelectedAnswerResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/SelectedAnswerResponse.java similarity index 68% rename from src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/SelectedAnswerResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/SelectedAnswerResponse.java index 4f77bf7a..1b1d95d8 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/response/SelectedAnswerResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/answer/presentation/response/SelectedAnswerResponse.java @@ -1,13 +1,12 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.answer.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentRepository.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentRepository.java index 649fc45f..1ba2f6eb 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.comment.application.comment; +package org.depromeet.sambad.moring.domain.meeting.comment.application.comment; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; public interface MeetingQuestionCommentRepository { void save(MeetingQuestionComment meetingQuestionComment); diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentService.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentService.java index a3ef70dd..b3b01d51 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/comment/MeetingQuestionCommentService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/comment/MeetingQuestionCommentService.java @@ -1,16 +1,16 @@ -package org.depromeet.sambad.moring.meeting.comment.application.comment; +package org.depromeet.sambad.moring.domain.meeting.comment.application.comment; import java.util.List; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception.NotFoundMeetingQuestionCommentException; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.request.MeetingQuestionCommentRequest; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.response.MeetingCommentListResponse; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionService; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception.NotFoundMeetingQuestionCommentException; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.request.MeetingQuestionCommentRequest; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.response.MeetingCommentListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionService; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java similarity index 61% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java index d5910814..3ee6be23 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.comment.application.reply; +package org.depromeet.sambad.moring.domain.meeting.comment.application.reply; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; public interface MeetingQuestionCommentReplyRepository { void save(MeetingQuestionCommentReply commentReply); diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java similarity index 70% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java index e5feefc5..afe5f84e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/application/reply/MeetingQuestionCommentReplyService.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.meeting.comment.application.reply; - -import org.depromeet.sambad.moring.meeting.comment.application.comment.MeetingQuestionCommentService; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; -import org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception.NotFoundMeetingQuestionCommentReplyException; -import org.depromeet.sambad.moring.meeting.comment.presentation.reply.request.MeetingQuestionCommentReplyRequest; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionService; +package org.depromeet.sambad.moring.domain.meeting.comment.application.reply; + +import org.depromeet.sambad.moring.domain.meeting.comment.application.comment.MeetingQuestionCommentService; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.exception.NotFoundMeetingQuestionCommentReplyException; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.request.MeetingQuestionCommentReplyRequest; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/comment/MeetingQuestionComment.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/comment/MeetingQuestionComment.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/comment/MeetingQuestionComment.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/comment/MeetingQuestionComment.java index c94640a3..987fb1a1 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/comment/MeetingQuestionComment.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/comment/MeetingQuestionComment.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.meeting.comment.domain.comment; +package org.depromeet.sambad.moring.domain.meeting.comment.domain.comment; import java.util.ArrayList; import java.util.List; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception.InvalidCommentWriterException; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception.InvalidCommentWriterException; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/reply/MeetingQuestionCommentReply.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/reply/MeetingQuestionCommentReply.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/reply/MeetingQuestionCommentReply.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/reply/MeetingQuestionCommentReply.java index 7298300d..a5d26f2b 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/domain/reply/MeetingQuestionCommentReply.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/domain/reply/MeetingQuestionCommentReply.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.comment.domain.reply; +package org.depromeet.sambad.moring.domain.meeting.comment.domain.reply; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; -import org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception.InvalidCommentWriterException; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception.InvalidCommentWriterException; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java index a7aac28b..883a2bf2 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentJpaRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.comment.infrastructure.comment; +package org.depromeet.sambad.moring.domain.meeting.comment.infrastructure.comment; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingQuestionCommentJpaRepository extends JpaRepository<MeetingQuestionComment, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java index bf7ec77f..e768fbec 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/comment/MeetingQuestionCommentRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.comment.infrastructure.comment; +package org.depromeet.sambad.moring.domain.meeting.comment.infrastructure.comment; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.application.comment.MeetingQuestionCommentRepository; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.application.comment.MeetingQuestionCommentRepository; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java similarity index 63% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java index 4f7fccb1..4eefcfc7 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.comment.infrastructure.reply; +package org.depromeet.sambad.moring.domain.meeting.comment.infrastructure.reply; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingQuestionCommentReplyJpaRepository extends JpaRepository<MeetingQuestionCommentReply, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java index cded8a53..7d786cec 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/infrastructure/reply/MeetingQuestionCommentReplyRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.comment.infrastructure.reply; +package org.depromeet.sambad.moring.domain.meeting.comment.infrastructure.reply; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.comment.application.reply.MeetingQuestionCommentReplyRepository; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.comment.application.reply.MeetingQuestionCommentReplyRepository; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java new file mode 100644 index 00000000..b86ceaac --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception; + +import static org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception.MeetingQuestionCommentExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidCommentWriterException extends BusinessException { + public InvalidCommentWriterException() { + super(INVALID_COMMENT_WRITER); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java index 7a6af1a0..927a3e50 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/MeetingQuestionCommentExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java new file mode 100644 index 00000000..086b01dc --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception; + +import static org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.exception.MeetingQuestionCommentExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundMeetingQuestionCommentException extends BusinessException { + + public NotFoundMeetingQuestionCommentException() { + super(NOT_FOUND_MEETING_QUESTION_COMMENT); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java index 014011b0..30accdc9 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/request/MeetingQuestionCommentRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.request; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java index 985c1928..d30904f8 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.response; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; import org.springframework.http.ResponseEntity; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java index f7e21cda..44ca8cee 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/comment/response/MeetingCommentListResponseDetail.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.response; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.comment.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.comment.domain.comment.MeetingQuestionComment; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.comment.MeetingQuestionComment; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java new file mode 100644 index 00000000..f8b32d08 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidCommentReplyWriterException extends BusinessException { + public InvalidCommentReplyWriterException() { + super(MeetingQuestionCommentReplyExceptionCode.INVALID_COMMENT_REPLY_WRITER); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java similarity index 68% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java index 0fa083fa..74c29a06 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/MeetingQuestionCommentReplyExceptionCode.java @@ -1,9 +1,8 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.exception; -import static org.springframework.http.HttpStatus.BAD_REQUEST; -import static org.springframework.http.HttpStatus.NOT_FOUND; +import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java new file mode 100644 index 00000000..f73bb1c6 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundMeetingQuestionCommentReplyException extends BusinessException { + public NotFoundMeetingQuestionCommentReplyException() { + super(MeetingQuestionCommentReplyExceptionCode.NOT_FOUND_MEETING_QUESTION_COMMENT_REPLY); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java similarity index 80% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java index b71d25f4..9de22e6f 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/request/MeetingQuestionCommentReplyRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply.request; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java index 806b0a91..ce2319c7 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/comment/presentation/reply/response/MeetingQuestionCommentReplyResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply.response; +package org.depromeet.sambad.moring.domain.meeting.comment.presentation.reply.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.comment.domain.reply.MeetingQuestionCommentReply; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.comment.domain.reply.MeetingQuestionCommentReply; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingRepository.java similarity index 65% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingRepository.java index c680b579..c6942dd0 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingRepository.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.handwaving.application; +package org.depromeet.sambad.moring.domain.meeting.handwaving.application; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWaving; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWaving; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; public interface HandWavingRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingService.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingService.java index b5a4c129..f61404b2 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/application/HandWavingService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/application/HandWavingService.java @@ -1,22 +1,22 @@ -package org.depromeet.sambad.moring.meeting.handwaving.application; +package org.depromeet.sambad.moring.domain.meeting.handwaving.application; -import static org.depromeet.sambad.moring.event.domain.EventType.*; -import static org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingStatus.NOT_REQUESTED; +import static org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingStatus.*; import java.util.List; import java.util.Map; import java.util.Optional; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWaving; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingSummary; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.NotFoundHandWavingException; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.request.HandWavingRequest; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.response.HandWavingStatusResponse; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWaving; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingSummary; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.NotFoundHandWavingException; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.request.HandWavingRequest; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.response.HandWavingStatusResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -101,7 +101,7 @@ private void publishRequestedEvent(HandWaving handWaving) { Long userId = receiver.getUser().getId(); Long meetingId = receiver.getMeeting().getId(); - eventService.publishHandWavingEvent(userId, meetingId, HAND_WAVING_REQUESTED, contentsMap, handWaving); + eventService.publishHandWavingEvent(userId, meetingId, EventType.HAND_WAVING_REQUESTED, contentsMap, handWaving); } private void inactiveHandWavingEvent(HandWaving handWaving) { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWaving.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWaving.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWaving.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWaving.java index dbdf9ef0..561bc40d 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWaving.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWaving.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.meeting.handwaving.domain; +package org.depromeet.sambad.moring.domain.meeting.handwaving.domain; -import static jakarta.persistence.EnumType.STRING; -import static org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingStatus.REQUESTED; +import static jakarta.persistence.EnumType.*; +import static org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingStatus.*; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.event.domain.Event; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.InvalidHandWavingReceiverException; -import org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.InvalidHandWavingStatusChangeException; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.event.domain.Event; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.InvalidHandWavingReceiverException; +import org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.InvalidHandWavingStatusChangeException; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingStatus.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingStatus.java similarity index 53% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingStatus.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingStatus.java index eaa2977b..9701d198 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingStatus.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingStatus.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.handwaving.domain; +package org.depromeet.sambad.moring.domain.meeting.handwaving.domain; public enum HandWavingStatus { NOT_REQUESTED, REQUESTED, ACCEPTED, REJECTED diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingSummary.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingSummary.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingSummary.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingSummary.java index 8a244948..d6852270 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/domain/HandWavingSummary.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/domain/HandWavingSummary.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.handwaving.domain; +package org.depromeet.sambad.moring.domain.meeting.handwaving.domain; import java.util.List; import java.util.Objects; -import org.depromeet.sambad.moring.event.domain.Event; +import org.depromeet.sambad.moring.domain.event.domain.Event; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingJpaRepository.java similarity index 70% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingJpaRepository.java index 0beedb45..873d9119 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingJpaRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.handwaving.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.handwaving.infrastructure; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWaving; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWaving; import org.springframework.data.jpa.repository.JpaRepository; public interface HandWavingJpaRepository extends JpaRepository<HandWaving, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java index 78716f67..975aab53 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/infrastructure/HandWavingRepositoryImpl.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.handwaving.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.handwaving.infrastructure; -import static org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingStatus.*; -import static org.depromeet.sambad.moring.meeting.handwaving.domain.QHandWaving.*; -import static org.depromeet.sambad.moring.meeting.member.domain.QMeetingMember.*; +import static org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingStatus.*; +import static org.depromeet.sambad.moring.domain.meeting.handwaving.domain.QHandWaving.*; +import static org.depromeet.sambad.moring.domain.meeting.member.domain.QMeetingMember.*; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.handwaving.application.HandWavingRepository; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWaving; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.handwaving.application.HandWavingRepository; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWaving; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.stereotype.Repository; import com.querydsl.jpa.impl.JPAQueryFactory; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java similarity index 66% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java index ea98387c..768548d0 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/HandWavingExceptionCode.java @@ -1,10 +1,8 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.exception; +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception; -import static org.springframework.http.HttpStatus.BAD_REQUEST; -import static org.springframework.http.HttpStatus.FORBIDDEN; -import static org.springframework.http.HttpStatus.NOT_FOUND; +import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java new file mode 100644 index 00000000..a61f948b --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.HandWavingExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidHandWavingReceiverException extends BusinessException { + public InvalidHandWavingReceiverException() { + super(INVALID_HAND_WAVING_RECEIVER); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java new file mode 100644 index 00000000..a6b3110e --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.HandWavingExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidHandWavingStatusChangeException extends BusinessException { + + public InvalidHandWavingStatusChangeException() { + super(INVALID_HAND_WAVING_STATUS_CHANGE); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java new file mode 100644 index 00000000..b816f902 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.exception.HandWavingExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundHandWavingException extends BusinessException { + public NotFoundHandWavingException() { + super(NOT_FOUND_HAND_WAVING); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/request/HandWavingRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/request/HandWavingRequest.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/request/HandWavingRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/request/HandWavingRequest.java index 907e6f8e..68122645 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/request/HandWavingRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/request/HandWavingRequest.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.request; +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.request; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/response/HandWavingStatusResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/response/HandWavingStatusResponse.java similarity index 72% rename from src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/response/HandWavingStatusResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/response/HandWavingStatusResponse.java index abc7b467..1617e7b7 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/response/HandWavingStatusResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/handwaving/presentation/response/HandWavingStatusResponse.java @@ -1,9 +1,8 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.handwaving.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.handwaving.domain.HandWavingStatus; +import org.depromeet.sambad.moring.domain.meeting.handwaving.domain.HandWavingStatus; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingCodeGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingCodeGenerator.java new file mode 100644 index 00000000..71ea35f0 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingCodeGenerator.java @@ -0,0 +1,8 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.application; + +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; + +public interface MeetingCodeGenerator { + + MeetingCode generate(); +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingRepository.java new file mode 100644 index 00000000..b150c8c3 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingRepository.java @@ -0,0 +1,15 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.application; + +import java.util.Optional; + +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; + +public interface MeetingRepository { + + Optional<Meeting> findById(Long id); + + void save(Meeting meeting); + + Optional<Meeting> findByCode(MeetingCode code); +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingService.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingService.java index f2a01bf6..4811348c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingService.java @@ -1,19 +1,19 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; +package org.depromeet.sambad.moring.domain.meeting.meeting.application; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; -import org.depromeet.sambad.moring.meeting.meeting.domain.TypesPerMeeting; -import org.depromeet.sambad.moring.meeting.meeting.presentation.exception.MeetingNotFoundException; -import org.depromeet.sambad.moring.meeting.meeting.presentation.exception.NotJoinedAnyMeetingException; -import org.depromeet.sambad.moring.meeting.meeting.presentation.request.MeetingPersistRequest; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingResponse; -import org.depromeet.sambad.moring.meeting.meeting.presentation.response.MeetingNameResponse; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRepository; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.TypesPerMeeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception.MeetingNotFoundException; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception.NotJoinedAnyMeetingException; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.request.MeetingPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingNameResponse; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response.MeetingResponse; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRepository; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeRepository.java similarity index 52% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeRepository.java index 421de096..b7e750cd 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; +package org.depromeet.sambad.moring.domain.meeting.meeting.application; import java.util.List; import java.util.Set; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; public interface MeetingTypeRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeService.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeService.java index 05c97831..96836662 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingTypeService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/MeetingTypeService.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; +package org.depromeet.sambad.moring.domain.meeting.meeting.application; import java.util.List; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; import org.springframework.stereotype.Service; import lombok.RequiredArgsConstructor; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/TypesPerMeetingRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/TypesPerMeetingRepository.java new file mode 100644 index 00000000..89076492 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/application/TypesPerMeetingRepository.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.application; + +import java.util.List; + +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.TypesPerMeeting; + +public interface TypesPerMeetingRepository { + + void saveAll(List<TypesPerMeeting> types); +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/Meeting.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/Meeting.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/Meeting.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/Meeting.java index 4e443239..2cd8dc63 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/Meeting.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/Meeting.java @@ -1,17 +1,17 @@ -package org.depromeet.sambad.moring.meeting.meeting.domain; +package org.depromeet.sambad.moring.domain.meeting.meeting.domain; -import static org.depromeet.sambad.moring.common.exception.GlobalExceptionCode.*; +import static org.depromeet.sambad.moring.domain.common.exception.GlobalExceptionCode.*; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.common.exception.BusinessException; -import org.depromeet.sambad.moring.common.logging.LoggingUtils; -import org.depromeet.sambad.moring.meeting.meeting.presentation.request.MeetingPersistRequest; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.request.MeetingPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; import jakarta.persistence.Column; import jakarta.persistence.Embedded; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingCode.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingCode.java index b56c1f42..0387d5de 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingCode.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.meeting.domain; +package org.depromeet.sambad.moring.domain.meeting.meeting.domain; import jakarta.persistence.Embeddable; import lombok.Getter; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingType.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingType.java similarity index 79% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingType.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingType.java index 204aa9f3..fb2ef61d 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/MeetingType.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/MeetingType.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.meeting.domain; +package org.depromeet.sambad.moring.domain.meeting.meeting.domain; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/TypesPerMeeting.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/TypesPerMeeting.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/TypesPerMeeting.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/TypesPerMeeting.java index 54fb248e..73c6111d 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/domain/TypesPerMeeting.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/domain/TypesPerMeeting.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.meeting.domain; +package org.depromeet.sambad.moring.domain.meeting.meeting.domain; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingJpaRepository.java new file mode 100644 index 00000000..bf7f4636 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingJpaRepository.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; + +import java.util.Optional; + +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface MeetingJpaRepository extends JpaRepository<Meeting, Long> { + + Optional<Meeting> findByCode(MeetingCode code); +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingRepositoryImpl.java similarity index 65% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingRepositoryImpl.java index 64958b6a..c19bafb2 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingRepository; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java similarity index 61% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java index 6beac641..8cacda82 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeJpaRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; import java.util.List; import java.util.Set; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingTypeJpaRepository extends JpaRepository<MeetingType, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java similarity index 68% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java index 0f59bd0f..d1bfe633 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/MeetingTypeRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; import java.util.List; import java.util.Set; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingTypeRepository; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingTypeRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java similarity index 57% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java index 462e7061..02a4cfdf 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/RandomMeetingCodeGenerator.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; import static java.util.UUID.*; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingCodeGenerator; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingCodeGenerator; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; import org.springframework.stereotype.Service; @Service diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java similarity index 50% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java index dbe91acf..3d4d3f29 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingJpaRepository.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; -import org.depromeet.sambad.moring.meeting.meeting.domain.TypesPerMeeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.TypesPerMeeting; import org.springframework.data.jpa.repository.JpaRepository; public interface TypesPerMeetingJpaRepository extends JpaRepository<TypesPerMeeting, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java similarity index 62% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java index 665aa820..3d2b6ac2 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/infrastructure/TypesPerMeetingRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.meeting.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.meeting.application.TypesPerMeetingRepository; -import org.depromeet.sambad.moring.meeting.meeting.domain.TypesPerMeeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.TypesPerMeetingRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.TypesPerMeeting; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java new file mode 100644 index 00000000..76e2ab23 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class ExceedMaxMeetingCountException extends BusinessException { + public ExceedMaxMeetingCountException() { + super(MeetingExceptionCode.EXCEED_MAX_MEETING_COUNT); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingExceptionCode.java similarity index 80% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingExceptionCode.java index b0cb173d..d3e6d37b 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.exception; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingNotFoundException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingNotFoundException.java new file mode 100644 index 00000000..4dd9a9e0 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/MeetingNotFoundException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class MeetingNotFoundException extends BusinessException { + public MeetingNotFoundException() { + super(MeetingExceptionCode.MEETING_NOT_FOUND); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java new file mode 100644 index 00000000..1fa641db --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception.MeetingExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotJoinedAnyMeetingException extends BusinessException { + public NotJoinedAnyMeetingException() { + super(NOT_JOINED_ANY_MEETING); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/request/MeetingPersistRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/request/MeetingPersistRequest.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/request/MeetingPersistRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/request/MeetingPersistRequest.java index ed9fa8f7..dc55300e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/request/MeetingPersistRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/request/MeetingPersistRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.request; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.request; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingCodeResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingCodeResponse.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingCodeResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingCodeResponse.java index 72542612..7ef1fc92 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingCodeResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingCodeResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingNameResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingNameResponse.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingNameResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingNameResponse.java index ed1ca627..97a22c49 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingNameResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingNameResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingPersistResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingPersistResponse.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingPersistResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingPersistResponse.java index 1725b476..e57a232e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingPersistResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingPersistResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingResponse.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingResponse.java index 236ae5c3..6f56cd25 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingTypeResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingTypeResponse.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingTypeResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingTypeResponse.java index 4d3ca441..1da9d4a2 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/response/MeetingTypeResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/meeting/presentation/response/MeetingTypeResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.meeting.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingType; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyRepository.java new file mode 100644 index 00000000..08392f93 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyRepository.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.member.application; + +import java.util.List; + +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; + +public interface HobbyRepository { + + List<Hobby> findAll(); + + List<Hobby> findByIdIn(List<Long> ids); +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyService.java similarity index 60% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyService.java index b2a61ca7..a29c683e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/HobbyService.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.member.application; +package org.depromeet.sambad.moring.domain.meeting.member.application; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; -import org.depromeet.sambad.moring.meeting.member.presentation.response.HobbyResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.HobbyResponse; import org.springframework.stereotype.Service; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberHobbyRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberHobbyRepository.java similarity index 54% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberHobbyRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberHobbyRepository.java index b2693ab9..9aa4a223 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberHobbyRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberHobbyRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.member.application; +package org.depromeet.sambad.moring.domain.meeting.member.application; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberHobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberHobby; public interface MeetingMemberHobbyRepository { diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRandomGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRandomGenerator.java new file mode 100644 index 00000000..9692ed66 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRandomGenerator.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.meeting.member.application; + +import java.util.List; + +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; + +public interface MeetingMemberRandomGenerator { + + MeetingMember generate(List<MeetingMember> nextTargets); +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRepository.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRepository.java index c671984e..a4ecbe63 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.member.application; +package org.depromeet.sambad.moring.domain.meeting.member.application; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; public interface MeetingMemberRepository { void save(MeetingMember meetingMember); diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberService.java similarity index 74% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberService.java index 2de0b81e..a969a935 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/application/MeetingMemberService.java @@ -1,31 +1,31 @@ -package org.depromeet.sambad.moring.meeting.member.application; +package org.depromeet.sambad.moring.domain.meeting.member.application; -import static org.depromeet.sambad.moring.event.domain.EventType.*; +import static org.depromeet.sambad.moring.domain.event.domain.EventType.*; import java.time.LocalDateTime; import java.util.List; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.meeting.handwaving.application.HandWavingRepository; -import org.depromeet.sambad.moring.meeting.meeting.application.MeetingRepository; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; -import org.depromeet.sambad.moring.meeting.meeting.presentation.exception.MeetingNotFoundException; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberHobby; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberNotFoundException; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.NoMeetingMemberInConditionException; -import org.depromeet.sambad.moring.meeting.member.presentation.request.MeetingMemberPersistRequest; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberPersistResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberResponse; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionRepository; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.domain.UserRepository; -import org.depromeet.sambad.moring.user.presentation.exception.NotFoundUserException; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.meeting.handwaving.application.HandWavingRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.application.MeetingRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.MeetingCode; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception.MeetingNotFoundException; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberHobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.MeetingMemberNotFoundException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.NoMeetingMemberInConditionException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.request.MeetingMemberPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberPersistResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberResponse; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionRepository; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.UserRepository; +import org.depromeet.sambad.moring.domain.user.presentation.exception.NotFoundUserException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/Hobby.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/Hobby.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/domain/Hobby.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/Hobby.java index 1c39422b..bf5e9b2e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/Hobby.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/Hobby.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.member.domain; +package org.depromeet.sambad.moring.domain.meeting.member.domain; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MBTI.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MBTI.java similarity index 67% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MBTI.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MBTI.java index 20ec05e7..a4472a8a 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MBTI.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MBTI.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.member.domain; +package org.depromeet.sambad.moring.domain.meeting.member.domain; public enum MBTI { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMember.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMember.java similarity index 87% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMember.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMember.java index d3ae406b..91bcde05 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMember.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMember.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.member.domain; +package org.depromeet.sambad.moring.domain.meeting.member.domain; import static jakarta.persistence.EnumType.*; @@ -8,14 +8,14 @@ import java.util.Objects; import java.util.Optional; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.common.domain.Gender; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.member.presentation.request.MeetingMemberPersistRequest; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.InvalidMeetingMemberNextTargetException; -import org.depromeet.sambad.moring.user.domain.User; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.Gender; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.request.MeetingMemberPersistRequest; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.InvalidMeetingMemberNextTargetException; +import org.depromeet.sambad.moring.domain.user.domain.User; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberHobby.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberHobby.java similarity index 89% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberHobby.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberHobby.java index b5b87210..49c84e14 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberHobby.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberHobby.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.member.domain; +package org.depromeet.sambad.moring.domain.meeting.member.domain; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberRole.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberRole.java new file mode 100644 index 00000000..a41f2b20 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberRole.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.domain; + +public enum MeetingMemberRole { + + OWNER, + ADMIN, + MEMBER, + ; +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberValidator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberValidator.java similarity index 70% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberValidator.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberValidator.java index 0525c828..84f72ab5 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberValidator.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/domain/MeetingMemberValidator.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.member.domain; +package org.depromeet.sambad.moring.domain.meeting.member.domain; import java.util.Objects; -import org.depromeet.sambad.moring.meeting.meeting.presentation.exception.ExceedMaxMeetingCountException; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRepository; -import org.depromeet.sambad.moring.meeting.member.infrastructure.MeetingMemberProperties; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.ExceedMaxMemberCountException; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.ExceedMaxOwnerCountException; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberAlreadyExistsException; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberNotFoundException; -import org.depromeet.sambad.moring.meeting.member.presentation.exception.UserNotMemberOfMeetingException; +import org.depromeet.sambad.moring.domain.meeting.meeting.presentation.exception.ExceedMaxMeetingCountException; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRepository; +import org.depromeet.sambad.moring.domain.meeting.member.infrastructure.MeetingMemberProperties; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.ExceedMaxMemberCountException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.ExceedMaxOwnerCountException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.MeetingMemberAlreadyExistsException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.MeetingMemberNotFoundException; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.exception.UserNotMemberOfMeetingException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyJpaRepository.java similarity index 58% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyJpaRepository.java index ec09f0eb..ff7e53bd 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; import org.springframework.data.jpa.repository.JpaRepository; public interface HobbyJpaRepository extends JpaRepository<Hobby, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyRepositoryImpl.java similarity index 66% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyRepositoryImpl.java index c0b67af4..39878c67 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/HobbyRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/HobbyRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.application.HobbyRepository; -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; +import org.depromeet.sambad.moring.domain.meeting.member.application.HobbyRepository; +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java similarity index 51% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java index b7593c5f..dbc1c5e9 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyJpaRepository.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberHobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberHobby; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingMemberHobbyJpaRepository extends JpaRepository<MeetingMemberHobby, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java index 74a9bdd3..a1ebf49c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberHobbyRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberHobbyRepository; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberHobby; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberHobbyRepository; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberHobby; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberJpaRepository.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberJpaRepository.java index 9446ecc3..d07013eb 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberJpaRepository.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingMemberJpaRepository extends JpaRepository<MeetingMember, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberProperties.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberProperties.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberProperties.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberProperties.java index f65b4ce4..22411d9a 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberProperties.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberProperties.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberQueryRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberQueryRepository.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberQueryRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberQueryRepository.java index 2898cd71..162eb9b5 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberQueryRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberQueryRepository.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; -import static org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberRole.*; -import static org.depromeet.sambad.moring.meeting.member.domain.QMeetingMember.*; +import static org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberRole.*; +import static org.depromeet.sambad.moring.domain.meeting.member.domain.QMeetingMember.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.stereotype.Repository; import com.querydsl.jpa.impl.JPAQueryFactory; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java similarity index 90% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java index a665e1ca..e8135afa 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/MeetingMemberRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRepository; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRepository; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/RandomMeetingMemberGenerator.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/RandomMeetingMemberGenerator.java similarity index 60% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/RandomMeetingMemberGenerator.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/RandomMeetingMemberGenerator.java index adac9ae7..667a49f4 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/infrastructure/RandomMeetingMemberGenerator.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/infrastructure/RandomMeetingMemberGenerator.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.member.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.member.infrastructure; import java.util.List; import java.util.Random; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRandomGenerator; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRandomGenerator; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import org.springframework.stereotype.Service; @Service diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxMemberCountException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxMemberCountException.java new file mode 100644 index 00000000..f77159da --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxMemberCountException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class ExceedMaxMemberCountException extends BusinessException { + public ExceedMaxMemberCountException() { + super(MeetingMemberExceptionCode.EXCEED_MAX_MEMBER_COUNT); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java new file mode 100644 index 00000000..2b6b4aa8 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class ExceedMaxOwnerCountException extends BusinessException { + public ExceedMaxOwnerCountException() { + super(MeetingMemberExceptionCode.EXCEED_MAX_OWNER_COUNT); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java new file mode 100644 index 00000000..3cd79cd3 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class MeetingMemberAlreadyExistsException extends BusinessException { + public MeetingMemberAlreadyExistsException() { + super(MeetingMemberExceptionCode.MEETING_MEMBER_ALREADY_EXISTS); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberExceptionCode.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberExceptionCode.java index 0583d240..55cec2f7 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberNotFoundException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberNotFoundException.java new file mode 100644 index 00000000..53ec357f --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/MeetingMemberNotFoundException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class MeetingMemberNotFoundException extends BusinessException { + public MeetingMemberNotFoundException() { + super(MeetingMemberExceptionCode.MEETING_MEMBER_NOT_FOUND); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java new file mode 100644 index 00000000..a83702e6 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NoMeetingMemberInConditionException extends BusinessException { + public NoMeetingMemberInConditionException() { + super(MeetingMemberExceptionCode.NO_MEETING_MEMBER_IN_CONDITION); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java new file mode 100644 index 00000000..82a5a596 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.meeting.member.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class UserNotMemberOfMeetingException extends BusinessException { + public UserNotMemberOfMeetingException() { + super(MeetingMemberExceptionCode.USER_NOT_MEMBER_OF_MEETING); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/request/MeetingMemberPersistRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/request/MeetingMemberPersistRequest.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/request/MeetingMemberPersistRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/request/MeetingMemberPersistRequest.java index a0a02a19..3ba010b5 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/request/MeetingMemberPersistRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/request/MeetingMemberPersistRequest.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.request; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.request; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.time.LocalDate; import java.util.List; -import org.depromeet.sambad.moring.common.domain.Gender; -import org.depromeet.sambad.moring.meeting.member.domain.MBTI; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberRole; +import org.depromeet.sambad.moring.domain.common.domain.Gender; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MBTI; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberRole; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyDetailResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyDetailResponse.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyDetailResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyDetailResponse.java index f0514324..e8c3d0cd 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyDetailResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyDetailResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyResponse.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyResponse.java index 78b76e2f..043e9f61 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/HobbyResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/HobbyResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; +import org.depromeet.sambad.moring.domain.meeting.member.domain.Hobby; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponse.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponse.java index 51d72ed2..edb3a297 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponseDetail.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponseDetail.java index c3cea213..4aec1ebf 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberListResponseDetail.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberRole; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberRole; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberPersistResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberPersistResponse.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberPersistResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberPersistResponse.java index df3ca88f..d593c680 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberPersistResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberPersistResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberResponse.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberResponse.java index a57b5051..3a6d302d 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberResponse.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.time.LocalDate; import java.util.List; -import org.depromeet.sambad.moring.common.domain.Gender; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.member.domain.MBTI; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberRole; +import org.depromeet.sambad.moring.domain.common.domain.Gender; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MBTI; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberRole; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberSummaryResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberSummaryResponse.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberSummaryResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberSummaryResponse.java index 8d996bfd..9945c70c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/response/MeetingMemberSummaryResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/member/presentation/response/MeetingMemberSummaryResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.member.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberRole; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberRole; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionRepository.java similarity index 69% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionRepository.java index 7b44233a..47774d75 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionRepository.java @@ -1,15 +1,15 @@ -package org.depromeet.sambad.moring.meeting.question.application; +package org.depromeet.sambad.moring.domain.meeting.question.application; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus; -import org.depromeet.sambad.moring.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; import org.springframework.data.domain.Pageable; public interface MeetingQuestionRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionService.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionService.java index 28c5d971..f40eacb0 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionService.java @@ -1,33 +1,32 @@ -package org.depromeet.sambad.moring.meeting.question.application; - -import static org.depromeet.sambad.moring.event.domain.EventType.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; +package org.depromeet.sambad.moring.domain.meeting.question.application; import java.time.Clock; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.meeting.handwaving.application.HandWavingRepository; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberListResponse; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.NotFoundMeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.presentation.request.MeetingQuestionRequest; -import org.depromeet.sambad.moring.meeting.question.presentation.response.CurrentMeetingQuestionResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionAndAnswerListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.question.application.QuestionService; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.presentation.exception.DuplicateQuestionException; -import org.depromeet.sambad.moring.question.presentation.response.QuestionResponse; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.domain.meeting.handwaving.application.HandWavingRepository; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberService; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.NotFoundMeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.request.MeetingQuestionRequest; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.CurrentMeetingQuestionResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionAndAnswerListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.question.application.QuestionService; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.presentation.exception.DuplicateQuestionException; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionResponse; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -57,7 +56,7 @@ public CurrentMeetingQuestionResponse save(Long userId, Long meetingId, MeetingQ loginMember.validateNextTarget(nextTargetMember); Optional<MeetingQuestion> registeredMeetingQuestion = meetingQuestionRepository.findFirstByMeetingIdAndStatus( - meetingId, ACTIVE); + meetingId, MeetingQuestionStatus.ACTIVE); Question activeQuestion = questionService.getById(request.questionId()); validateNonDuplicateQuestion(meetingId, activeQuestion.getId()); @@ -71,9 +70,9 @@ public CurrentMeetingQuestionResponse save(Long userId, Long meetingId, MeetingQ currentMeetingQuestion = createActiveQuestion(meeting, loginMember, activeQuestion); } - eventService.inactivateLastEventByType(userId, meetingId, TARGET_MEMBER); + eventService.inactivateLastEventByType(userId, meetingId, EventType.TARGET_MEMBER); meeting.getMeetingMembers().forEach(member -> - eventService.publish(member.getUser().getId(), meetingId, QUESTION_REGISTERED)); + eventService.publish(member.getUser().getId(), meetingId, EventType.QUESTION_REGISTERED)); MeetingQuestion nextMeetingQuestion = MeetingQuestion.createNextMeetingQuestion( meeting, nextTargetMember, currentMeetingQuestion.getNextStartTime(), meeting.getTotalMemberCount()); @@ -165,7 +164,7 @@ private CurrentMeetingQuestionResponse getCurrentMeetingQuestionResponse( } else { MeetingMember nextTargetMember = meetingQuestionRepository.findFirstByMeetingIdAndStatusAndStartTimeAfterOrderByStartTime( activeMeetingQuestion.getMeeting().getId(), - NOT_STARTED, + MeetingQuestionStatus.NOT_STARTED, LocalDateTime.now()) .map(MeetingQuestion::getTargetMember) .orElse(null); diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionStatusCheckScheduler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionStatusCheckScheduler.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionStatusCheckScheduler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionStatusCheckScheduler.java index 8325d886..dd826b5e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionStatusCheckScheduler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionStatusCheckScheduler.java @@ -1,14 +1,14 @@ -package org.depromeet.sambad.moring.meeting.question.application; +package org.depromeet.sambad.moring.domain.meeting.question.application; import static java.time.LocalDateTime.*; -import static org.depromeet.sambad.moring.event.domain.EventType.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; import java.util.List; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -32,7 +32,8 @@ public class MeetingQuestionStatusCheckScheduler { @Transactional public void inactivate() { // 활성 상태이지만 만료 시간이 지나 INACTIVE 상태가 되어야 하는 질문 목록 조회 - List<MeetingQuestion> targets = meetingQuestionRepository.findAllByStatusAndExpiredAtBefore(ACTIVE, now()); + List<MeetingQuestion> targets = meetingQuestionRepository.findAllByStatusAndExpiredAtBefore( + MeetingQuestionStatus.ACTIVE, now()); // 질문 비활성화 처리 targets.forEach(MeetingQuestion::updateStatusToInactive); @@ -49,7 +50,7 @@ public void inactivate() { private void activate(Meeting meeting) { Long meetingId = meeting.getId(); - meetingQuestionRepository.findFirstByMeetingIdAndStatus(meetingId, NOT_STARTED) + meetingQuestionRepository.findFirstByMeetingIdAndStatus(meetingId, MeetingQuestionStatus.NOT_STARTED) .ifPresent(targetMeetingQuestion -> { targetMeetingQuestion.updateStatusToActive(now()); reissueTargetMemberEvent(targetMeetingQuestion); @@ -61,9 +62,9 @@ private void reissueTargetMemberEvent(MeetingQuestion target) { Long meetingId = target.getMeeting().getId(); Long targetMemberUserId = target.getTargetMember().getUser().getId(); - eventService.inactivateLastEventsOfAllMemberByType(meetingId, QUESTION_REGISTERED); - eventService.inactivateLastEventByType(targetMemberUserId, meetingId, TARGET_MEMBER); - eventService.publish(targetMemberUserId, meetingId, TARGET_MEMBER); + eventService.inactivateLastEventsOfAllMemberByType(meetingId, EventType.QUESTION_REGISTERED); + eventService.inactivateLastEventByType(targetMemberUserId, meetingId, EventType.TARGET_MEMBER); + eventService.publish(targetMemberUserId, meetingId, EventType.TARGET_MEMBER); } private void logResults(List<MeetingQuestion> targets) { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java index a63887b3..b173361c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/application/MeetingQuestionTargetReplaceScheduler.java @@ -1,14 +1,13 @@ -package org.depromeet.sambad.moring.meeting.question.application; - -import static org.depromeet.sambad.moring.event.domain.EventType.*; +package org.depromeet.sambad.moring.domain.meeting.question.application; import java.util.List; -import org.depromeet.sambad.moring.event.application.EventService; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRandomGenerator; -import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberRepository; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.event.application.EventService; +import org.depromeet.sambad.moring.domain.event.domain.EventType; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRandomGenerator; +import org.depromeet.sambad.moring.domain.meeting.member.application.MeetingMemberRepository; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -30,7 +29,8 @@ public class MeetingQuestionTargetReplaceScheduler { @Transactional @SchedulerLock(name = "meetingQuestionTargetReplace", lockAtLeastFor = "PT5M", lockAtMostFor = "PT10M") - @Scheduled(fixedDelay = 5 * 60 * 1000) + // @Scheduled(fixedDelay = 5 * 60 * 1000) + @Scheduled(fixedDelay = 1000 * 10) public void replace() { // 각 모임 별로, 가장 최근 만료된 질문이 비활성화 상태인 경우만 조회 List<MeetingQuestion> unregisteredQuestions = meetingQuestionRepository.findAllInactiveAndQuestionNotRegistered(); @@ -68,7 +68,7 @@ private void publishTargetMemberEvent(MeetingMember nextTarget) { Long nextTargetMemberUserId = nextTarget.getUser().getId(); Long meetingId = nextTarget.getMeeting().getId(); - eventService.inactivateLastEventByType(nextTargetMemberUserId, meetingId, TARGET_MEMBER); - eventService.publish(nextTargetMemberUserId, meetingId, TARGET_MEMBER); + eventService.inactivateLastEventByType(nextTargetMemberUserId, meetingId, EventType.TARGET_MEMBER); + eventService.publish(nextTargetMemberUserId, meetingId, EventType.TARGET_MEMBER); } } diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestion.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestion.java similarity index 84% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestion.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestion.java index 52c8da94..93dc5451 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestion.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestion.java @@ -1,23 +1,23 @@ -package org.depromeet.sambad.moring.meeting.question.domain; +package org.depromeet.sambad.moring.domain.meeting.question.domain; import static java.time.LocalDateTime.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus.*; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; import java.util.List; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.common.logging.LoggingUtils; -import org.depromeet.sambad.moring.meeting.answer.domain.MeetingAnswer; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.DuplicateMeetingQuestionException; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.FinishedMeetingQuestionException; -import org.depromeet.sambad.moring.meeting.question.presentation.exception.InvalidMeetingMemberTargetException; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.domain.QuestionType; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.meeting.answer.domain.MeetingAnswer; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.DuplicateMeetingQuestionException; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.FinishedMeetingQuestionException; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.InvalidMeetingMemberTargetException; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.domain.QuestionType; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestionStatus.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestionStatus.java similarity index 51% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestionStatus.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestionStatus.java index 5018bbae..111d5945 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/domain/MeetingQuestionStatus.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/domain/MeetingQuestionStatus.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.question.domain; +package org.depromeet.sambad.moring.domain.meeting.question.domain; public enum MeetingQuestionStatus { ACTIVE, INACTIVE, NOT_STARTED; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionJpaRepository.java similarity index 79% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionJpaRepository.java index 0211dea6..204fb0a9 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionJpaRepository.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.question.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.question.infrastructure; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; import org.springframework.data.jpa.repository.JpaRepository; public interface MeetingQuestionJpaRepository extends JpaRepository<MeetingQuestion, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionQueryRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionQueryRepository.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionQueryRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionQueryRepository.java index 341c7155..c90b6081 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionQueryRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionQueryRepository.java @@ -1,25 +1,25 @@ -package org.depromeet.sambad.moring.meeting.question.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.question.infrastructure; import static com.querydsl.jpa.JPAExpressions.*; -import static org.depromeet.sambad.moring.meeting.answer.domain.QMeetingAnswer.*; -import static org.depromeet.sambad.moring.meeting.member.domain.QMeetingMember.*; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; -import static org.depromeet.sambad.moring.meeting.question.domain.QMeetingQuestion.*; -import static org.depromeet.sambad.moring.question.domain.QQuestion.*; +import static org.depromeet.sambad.moring.domain.meeting.answer.domain.QMeetingAnswer.*; +import static org.depromeet.sambad.moring.domain.meeting.member.domain.QMeetingMember.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.QMeetingQuestion.*; +import static org.depromeet.sambad.moring.domain.question.domain.QQuestion.*; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.common.response.PageableResponse; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.domain.QMeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponseDetail; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.common.response.PageableResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; +import org.depromeet.sambad.moring.domain.meeting.question.domain.QMeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponseDetail; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Repository; @@ -44,7 +44,7 @@ public Optional<MeetingQuestion> findNextQuestion(Long meetingId) { .from(meetingQuestion) .where( meetingQuestion.meeting.id.eq(meetingId), - meetingQuestion.status.eq(NOT_STARTED) + meetingQuestion.status.eq(MeetingQuestionStatus.NOT_STARTED) ) .orderBy(meetingQuestion.startTime.asc()) .limit(1) @@ -166,7 +166,7 @@ public List<MeetingQuestion> findAllInactiveAndQuestionNotRegistered() { return queryFactory.selectFrom(mq1) .where( mq1.question.isNull(), - mq1.status.eq(INACTIVE), + mq1.status.eq(MeetingQuestionStatus.INACTIVE), mq1.expiredAt.eq( select(mq2.expiredAt.max()) .from(mq2) @@ -193,6 +193,6 @@ private Optional<Answer> getBestAnswer(MeetingQuestion meetingQuestion) { private BooleanExpression inactiveCond() { return meetingQuestion.expiredAt.lt(LocalDateTime.now()) - .or(meetingQuestion.status.eq(INACTIVE)); + .or(meetingQuestion.status.eq(MeetingQuestionStatus.INACTIVE)); } } diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java similarity index 79% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java index c3f54402..3bf426ce 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/infrastructure/MeetingQuestionRepositoryImpl.java @@ -1,18 +1,18 @@ -package org.depromeet.sambad.moring.meeting.question.infrastructure; +package org.depromeet.sambad.moring.domain.meeting.question.infrastructure; -import static org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus.*; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.question.application.MeetingQuestionRepository; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestionStatus; -import org.depromeet.sambad.moring.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; -import org.depromeet.sambad.moring.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.question.application.MeetingQuestionRepository; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestionStatus; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.FullInactiveMeetingQuestionListResponse; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MeetingQuestionStatisticsDetail; +import org.depromeet.sambad.moring.domain.meeting.question.presentation.response.MostInactiveMeetingQuestionListResponse; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Repository; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java new file mode 100644 index 00000000..7125a82c --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class DuplicateMeetingQuestionException extends BusinessException { + + public DuplicateMeetingQuestionException() { + super(MeetingQuestionExceptionCode.DUPLICATE_MEETING_QUESTION); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/FinishedMeetingQuestionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/FinishedMeetingQuestionException.java new file mode 100644 index 00000000..1f54d2d0 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/FinishedMeetingQuestionException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class FinishedMeetingQuestionException extends BusinessException { + + public FinishedMeetingQuestionException() { + super(FINISHED_MEETING_QUESTION); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java new file mode 100644 index 00000000..61d048ed --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidMeetingMemberNextTargetException extends BusinessException { + + public InvalidMeetingMemberNextTargetException() { + super(INVALID_MEETING_MEMBER_NEXT_TARGET); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java new file mode 100644 index 00000000..3622a4b3 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class InvalidMeetingMemberTargetException extends BusinessException { + + public InvalidMeetingMemberTargetException() { + super(INVALID_MEETING_MEMBER_TARGET); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java index 080f0fc1..4429c82c 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/MeetingQuestionExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/NotFoundMeetingQuestion.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/NotFoundMeetingQuestion.java new file mode 100644 index 00000000..ab205fdc --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/exception/NotFoundMeetingQuestion.java @@ -0,0 +1,10 @@ +package org.depromeet.sambad.moring.domain.meeting.question.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundMeetingQuestion extends BusinessException { + + public NotFoundMeetingQuestion() { + super(MeetingQuestionExceptionCode.NOT_FOUND_MEETING_QUESTION); + } +} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/request/MeetingQuestionRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/request/MeetingQuestionRequest.java similarity index 80% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/request/MeetingQuestionRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/request/MeetingQuestionRequest.java index c403e01b..af01240e 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/request/MeetingQuestionRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/request/MeetingQuestionRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.request; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java similarity index 87% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java index f64ca8af..e8b68628 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/CurrentMeetingQuestionResponse.java @@ -1,12 +1,12 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java index 25ce86ec..3580c413 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponse.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.common.response.PageableResponse; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.common.response.PageableResponse; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java index cb964e0d..77e1c915 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/FullInactiveMeetingQuestionListResponseDetail.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.member.presentation.response.MeetingMemberSummaryResponse; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.meeting.domain.Meeting; +import org.depromeet.sambad.moring.domain.meeting.member.presentation.response.MeetingMemberSummaryResponse; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java similarity index 71% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java index 0d2721f6..a3e67df9 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionAndAnswerListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; -import org.depromeet.sambad.moring.question.domain.QuestionType; -import org.depromeet.sambad.moring.question.presentation.response.QuestionResponse; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.question.domain.QuestionType; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionResponse; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java index 0e1033f6..22a7d719 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsDetail.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java similarity index 85% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java index b22a3346..972acbdd 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MeetingQuestionStatisticsResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java similarity index 87% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java index 663a1f37..c970ed66 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponse.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java index 4a443574..4327c399 100644 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/meeting/question/presentation/response/MostInactiveMeetingQuestionListResponseDetail.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.response; +package org.depromeet.sambad.moring.domain.meeting.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.Optional; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; diff --git a/src/main/java/org/depromeet/sambad/moring/question/application/QuestionRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionRepository.java similarity index 62% rename from src/main/java/org/depromeet/sambad/moring/question/application/QuestionRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionRepository.java index 574ddae9..a01e5e7f 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/application/QuestionRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionRepository.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.question.application; +package org.depromeet.sambad.moring.domain.question.application; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.presentation.response.QuestionListResponse; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionListResponse; import org.springframework.data.domain.Pageable; public interface QuestionRepository { diff --git a/src/main/java/org/depromeet/sambad/moring/question/application/QuestionService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionService.java similarity index 66% rename from src/main/java/org/depromeet/sambad/moring/question/application/QuestionService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionService.java index d69a34fc..a781407f 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/application/QuestionService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/application/QuestionService.java @@ -1,17 +1,17 @@ -package org.depromeet.sambad.moring.question.application; +package org.depromeet.sambad.moring.domain.question.application; import java.util.List; import java.util.Random; -import org.depromeet.sambad.moring.file.application.FileService; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.presentation.exception.NotFoundAvailableQuestionException; -import org.depromeet.sambad.moring.question.presentation.exception.NotFoundQuestionException; -import org.depromeet.sambad.moring.question.presentation.request.QuestionRequest; -import org.depromeet.sambad.moring.question.presentation.response.QuestionListResponse; -import org.depromeet.sambad.moring.question.presentation.response.QuestionResponse; +import org.depromeet.sambad.moring.domain.file.application.FileService; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.presentation.exception.NotFoundAvailableQuestionException; +import org.depromeet.sambad.moring.domain.question.presentation.exception.NotFoundQuestionException; +import org.depromeet.sambad.moring.domain.question.presentation.request.QuestionRequest; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionListResponse; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionResponse; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/question/domain/Question.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/Question.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/question/domain/Question.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/Question.java index 7b1137c2..ca39b079 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/domain/Question.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/Question.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.question.domain; +package org.depromeet.sambad.moring.domain.question.domain; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.answer.domain.Answer; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion; +import org.depromeet.sambad.moring.domain.answer.domain.Answer; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.meeting.question.domain.MeetingQuestion; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; diff --git a/src/main/java/org/depromeet/sambad/moring/question/domain/QuestionType.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/QuestionType.java similarity index 78% rename from src/main/java/org/depromeet/sambad/moring/question/domain/QuestionType.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/QuestionType.java index c6075e90..509533d2 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/domain/QuestionType.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/domain/QuestionType.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.question.domain; +package org.depromeet.sambad.moring.domain.question.domain; -import org.depromeet.sambad.moring.question.presentation.exception.AnswerCountOutOfRangeException; +import org.depromeet.sambad.moring.domain.question.presentation.exception.AnswerCountOutOfRangeException; public enum QuestionType { SINGLE_CHOICE, MULTIPLE_SHORT_CHOICE, MULTIPLE_DESCRIPTIVE_CHOICE; diff --git a/src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionJpaRepository.java similarity index 51% rename from src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionJpaRepository.java index c683b359..41622c47 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionJpaRepository.java @@ -1,6 +1,6 @@ -package org.depromeet.sambad.moring.question.infrastructure; +package org.depromeet.sambad.moring.domain.question.infrastructure; -import org.depromeet.sambad.moring.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.domain.Question; import org.springframework.data.jpa.repository.JpaRepository; public interface QuestionJpaRepository extends JpaRepository<Question, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionRepositoryImpl.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionRepositoryImpl.java index c6333a33..1e4c66a0 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/infrastructure/QuestionRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/infrastructure/QuestionRepositoryImpl.java @@ -1,18 +1,18 @@ -package org.depromeet.sambad.moring.question.infrastructure; +package org.depromeet.sambad.moring.domain.question.infrastructure; import static com.querydsl.core.types.dsl.Expressions.*; import static com.querydsl.jpa.JPAExpressions.*; -import static org.depromeet.sambad.moring.meeting.question.domain.QMeetingQuestion.*; -import static org.depromeet.sambad.moring.question.domain.QQuestion.*; +import static org.depromeet.sambad.moring.domain.meeting.question.domain.QMeetingQuestion.*; +import static org.depromeet.sambad.moring.domain.question.domain.QQuestion.*; import java.util.List; import java.util.Optional; -import org.depromeet.sambad.moring.common.response.PageableResponse; -import org.depromeet.sambad.moring.question.application.QuestionRepository; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.presentation.response.QuestionListResponse; -import org.depromeet.sambad.moring.question.presentation.response.QuestionSummaryResponse; +import org.depromeet.sambad.moring.domain.common.response.PageableResponse; +import org.depromeet.sambad.moring.domain.question.application.QuestionRepository; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionListResponse; +import org.depromeet.sambad.moring.domain.question.presentation.response.QuestionSummaryResponse; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Repository; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/AnswerCountOutOfRangeException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/AnswerCountOutOfRangeException.java new file mode 100644 index 00000000..053731fe --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/AnswerCountOutOfRangeException.java @@ -0,0 +1,11 @@ +package org.depromeet.sambad.moring.domain.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.question.presentation.exception.QuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class AnswerCountOutOfRangeException extends BusinessException { + public AnswerCountOutOfRangeException() { + super(ANSWER_COUNT_OUT_OF_RANGE); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/DuplicateQuestionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/DuplicateQuestionException.java new file mode 100644 index 00000000..b171094f --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/DuplicateQuestionException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.question.presentation.exception.QuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class DuplicateQuestionException extends BusinessException { + + public DuplicateQuestionException() { + super(DUPLICATE_QUESTION); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundAvailableQuestionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundAvailableQuestionException.java new file mode 100644 index 00000000..2ffd8bea --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundAvailableQuestionException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.question.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundAvailableQuestionException extends BusinessException { + public NotFoundAvailableQuestionException() { + super(QuestionExceptionCode.NOT_FOUND_AVAILABLE_QUESTION); + } +} diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundQuestionException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundQuestionException.java new file mode 100644 index 00000000..49b0333e --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/NotFoundQuestionException.java @@ -0,0 +1,12 @@ +package org.depromeet.sambad.moring.domain.question.presentation.exception; + +import static org.depromeet.sambad.moring.domain.question.presentation.exception.QuestionExceptionCode.*; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundQuestionException extends BusinessException { + + public NotFoundQuestionException() { + super(NOT_FOUND_QUESTION); + } +} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/QuestionExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/QuestionExceptionCode.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/exception/QuestionExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/QuestionExceptionCode.java index 1cdfe410..bd9bf57c 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/QuestionExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/exception/QuestionExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.question.presentation.exception; +package org.depromeet.sambad.moring.domain.question.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/request/QuestionRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/request/QuestionRequest.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/request/QuestionRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/request/QuestionRequest.java index c81b4386..6719879a 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/request/QuestionRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/request/QuestionRequest.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.question.presentation.request; +package org.depromeet.sambad.moring.domain.question.presentation.request; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.question.domain.QuestionType; +import org.depromeet.sambad.moring.domain.question.domain.QuestionType; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionListResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionListResponse.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionListResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionListResponse.java index b2071ec4..e4df2d4b 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionListResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionListResponse.java @@ -1,10 +1,10 @@ -package org.depromeet.sambad.moring.question.presentation.response; +package org.depromeet.sambad.moring.domain.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.common.response.PageableResponse; +import org.depromeet.sambad.moring.domain.common.response.PageableResponse; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionResponse.java similarity index 73% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionResponse.java index f9328851..e44b696f 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionResponse.java @@ -1,13 +1,13 @@ -package org.depromeet.sambad.moring.question.presentation.response; +package org.depromeet.sambad.moring.domain.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import java.util.List; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.meeting.answer.presentation.response.AnswerResponse; -import org.depromeet.sambad.moring.question.domain.Question; -import org.depromeet.sambad.moring.question.domain.QuestionType; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.meeting.answer.presentation.response.AnswerResponse; +import org.depromeet.sambad.moring.domain.question.domain.Question; +import org.depromeet.sambad.moring.domain.question.domain.QuestionType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionSummaryResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionSummaryResponse.java similarity index 82% rename from src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionSummaryResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionSummaryResponse.java index 6d32c22b..ae78956f 100644 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/response/QuestionSummaryResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/question/presentation/response/QuestionSummaryResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.question.presentation.response; +package org.depromeet.sambad.moring.domain.question.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; import com.querydsl.core.annotations.QueryProjection; diff --git a/src/main/java/org/depromeet/sambad/moring/user/application/UserService.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/application/UserService.java similarity index 66% rename from src/main/java/org/depromeet/sambad/moring/user/application/UserService.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/application/UserService.java index 4121d45b..ce3a6b8d 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/application/UserService.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/application/UserService.java @@ -1,11 +1,11 @@ -package org.depromeet.sambad.moring.user.application; - -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMemberValidator; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.domain.UserRepository; -import org.depromeet.sambad.moring.user.presentation.exception.NotFoundUserException; -import org.depromeet.sambad.moring.user.presentation.response.OnboardingResponse; -import org.depromeet.sambad.moring.user.presentation.response.UserResponse; +package org.depromeet.sambad.moring.domain.user.application; + +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMemberValidator; +import org.depromeet.sambad.moring.domain.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.UserRepository; +import org.depromeet.sambad.moring.domain.user.presentation.exception.NotFoundUserException; +import org.depromeet.sambad.moring.domain.user.presentation.response.OnboardingResponse; +import org.depromeet.sambad.moring.domain.user.presentation.response.UserResponse; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/depromeet/sambad/moring/user/domain/LoginProvider.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/LoginProvider.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/user/domain/LoginProvider.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/LoginProvider.java index c1fd939e..6f2f0620 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/domain/LoginProvider.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/LoginProvider.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.user.domain; +package org.depromeet.sambad.moring.domain.user.domain; import java.util.Objects; diff --git a/src/main/java/org/depromeet/sambad/moring/user/domain/User.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/User.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/user/domain/User.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/User.java index 0db87bbf..e12d7019 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/domain/User.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/User.java @@ -1,14 +1,14 @@ -package org.depromeet.sambad.moring.user.domain; +package org.depromeet.sambad.moring.domain.user.domain; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; -import org.depromeet.sambad.moring.auth.application.dto.AuthAttributes; -import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; -import org.depromeet.sambad.moring.file.domain.FileEntity; -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; +import org.depromeet.sambad.moring.domain.auth.application.dto.AuthAttributes; +import org.depromeet.sambad.moring.domain.common.domain.BaseTimeEntity; +import org.depromeet.sambad.moring.domain.file.domain.FileEntity; +import org.depromeet.sambad.moring.domain.meeting.member.domain.MeetingMember; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/org/depromeet/sambad/moring/user/domain/UserRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/UserRepository.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/user/domain/UserRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/UserRepository.java index c87081fb..9286cd07 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/domain/UserRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/domain/UserRepository.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.user.domain; +package org.depromeet.sambad.moring.domain.user.domain; import java.util.Optional; diff --git a/src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserJpaRepository.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserJpaRepository.java similarity index 62% rename from src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserJpaRepository.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserJpaRepository.java index 280fbebf..18c1069a 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserJpaRepository.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserJpaRepository.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.user.infrastructure; +package org.depromeet.sambad.moring.domain.user.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.User; import org.springframework.data.jpa.repository.JpaRepository; public interface UserJpaRepository extends JpaRepository<User, Long> { diff --git a/src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserRepositoryImpl.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserRepositoryImpl.java similarity index 74% rename from src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserRepositoryImpl.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserRepositoryImpl.java index 7514b1f2..f932dfc4 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/infrastructure/UserRepositoryImpl.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/infrastructure/UserRepositoryImpl.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.user.infrastructure; +package org.depromeet.sambad.moring.domain.user.infrastructure; import java.util.Optional; -import org.depromeet.sambad.moring.user.domain.User; -import org.depromeet.sambad.moring.user.domain.UserRepository; +import org.depromeet.sambad.moring.domain.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.UserRepository; import org.springframework.stereotype.Repository; import lombok.RequiredArgsConstructor; diff --git a/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/NotFoundUserException.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/NotFoundUserException.java new file mode 100644 index 00000000..09428789 --- /dev/null +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/NotFoundUserException.java @@ -0,0 +1,9 @@ +package org.depromeet.sambad.moring.domain.user.presentation.exception; + +import org.depromeet.sambad.moring.domain.common.exception.BusinessException; + +public class NotFoundUserException extends BusinessException { + public NotFoundUserException() { + super(UserExceptionCode.NOT_FOUND_USER); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/exception/UserExceptionCode.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/UserExceptionCode.java similarity index 75% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/exception/UserExceptionCode.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/UserExceptionCode.java index 7943e909..efdfc420 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/exception/UserExceptionCode.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/exception/UserExceptionCode.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.user.presentation.exception; +package org.depromeet.sambad.moring.domain.user.presentation.exception; import static org.springframework.http.HttpStatus.*; -import org.depromeet.sambad.moring.common.exception.ExceptionCode; +import org.depromeet.sambad.moring.domain.common.exception.ExceptionCode; import org.springframework.http.HttpStatus; import lombok.Getter; diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/request/LastMeetingRequest.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/request/LastMeetingRequest.java similarity index 80% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/request/LastMeetingRequest.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/request/LastMeetingRequest.java index d5945241..920fb393 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/request/LastMeetingRequest.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/request/LastMeetingRequest.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.user.presentation.request; +package org.depromeet.sambad.moring.domain.user.presentation.request; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/response/OnboardingResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/OnboardingResponse.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/response/OnboardingResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/OnboardingResponse.java index 02eca150..5635208d 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/response/OnboardingResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/OnboardingResponse.java @@ -1,8 +1,8 @@ -package org.depromeet.sambad.moring.user.presentation.response; +package org.depromeet.sambad.moring.domain.user.presentation.response; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.user.domain.User; +import org.depromeet.sambad.moring.domain.user.domain.User; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/response/UserResponse.java b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/UserResponse.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/response/UserResponse.java rename to moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/UserResponse.java index 7d1d6f7a..36d15713 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/response/UserResponse.java +++ b/moring-domain/src/main/java/org/depromeet/sambad/moring/domain/user/presentation/response/UserResponse.java @@ -1,9 +1,9 @@ -package org.depromeet.sambad.moring.user.presentation.response; +package org.depromeet.sambad.moring.domain.user.presentation.response; -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; -import org.depromeet.sambad.moring.file.presentation.annotation.FullFileUrl; -import org.depromeet.sambad.moring.user.domain.User; +import org.depromeet.sambad.moring.domain.file.presentation.annotation.FullFileUrl; +import org.depromeet.sambad.moring.domain.user.domain.User; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/moring-domain/src/test/java/org/depromeet/sambad/moring/domain/.gitkeep b/moring-domain/src/test/java/org/depromeet/sambad/moring/domain/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/moring-global-utils/build.gradle b/moring-global-utils/build.gradle new file mode 100644 index 00000000..b97e334c --- /dev/null +++ b/moring-global-utils/build.gradle @@ -0,0 +1,7 @@ +bootJar { + enabled = false +} + +jar { + enabled = true +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionTimer.java b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/ExecutionTimer.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionTimer.java rename to moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/ExecutionTimer.java index 27b343d7..ebf4131b 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/ExecutionTimer.java +++ b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/ExecutionTimer.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.globalutils.logging; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/LoggingUtils.java b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/LoggingUtils.java similarity index 83% rename from src/main/java/org/depromeet/sambad/moring/common/logging/LoggingUtils.java rename to moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/LoggingUtils.java index 17e3b0af..b08ce516 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/LoggingUtils.java +++ b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/LoggingUtils.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.globalutils.logging; import java.util.Arrays; import java.util.List; @@ -24,13 +24,13 @@ public static void error(String message) { log.error("[SERVER ERROR] {}", message); } - static List<String> getArguments(JoinPoint joinPoint) { + public static List<String> getArguments(JoinPoint joinPoint) { return Arrays.stream(joinPoint.getArgs()) .map(Object::toString) .toList(); } - static String getParameterMessage(String[] parameterNames, List<String> arguments) { + public static String getParameterMessage(String[] parameterNames, List<String> arguments) { if (parameterNames == null || arguments == null) return ""; diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/NoLogging.java b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/NoLogging.java similarity index 86% rename from src/main/java/org/depromeet/sambad/moring/common/logging/NoLogging.java rename to moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/NoLogging.java index 313baabd..65ea6265 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/NoLogging.java +++ b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/NoLogging.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.globalutils.logging; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/depromeet/sambad/moring/common/logging/P6spySqlLoggingFormatter.java b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/P6spySqlLoggingFormatter.java similarity index 95% rename from src/main/java/org/depromeet/sambad/moring/common/logging/P6spySqlLoggingFormatter.java rename to moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/P6spySqlLoggingFormatter.java index d75302fa..c3070294 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/logging/P6spySqlLoggingFormatter.java +++ b/moring-global-utils/src/main/java/org/depromeet/sambad/moring/globalutils/logging/P6spySqlLoggingFormatter.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.common.logging; +package org.depromeet.sambad.moring.globalutils.logging; import java.util.Locale; diff --git a/moring-global-utils/src/test/java/org/depromeet/sambad/moring/globalutils/MoringGlobalUtilsApplicationTests.java b/moring-global-utils/src/test/java/org/depromeet/sambad/moring/globalutils/MoringGlobalUtilsApplicationTests.java new file mode 100644 index 00000000..1db51be4 --- /dev/null +++ b/moring-global-utils/src/test/java/org/depromeet/sambad/moring/globalutils/MoringGlobalUtilsApplicationTests.java @@ -0,0 +1,13 @@ +package org.depromeet.sambad.moring.globalutils; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MoringGlobalUtilsApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/moring-infra/build.gradle b/moring-infra/build.gradle new file mode 100644 index 00000000..64ff51a4 --- /dev/null +++ b/moring-infra/build.gradle @@ -0,0 +1,11 @@ +bootJar { + enabled = false +} + +jar { + enabled = true +} + +dependencies { + implementation project(':moring-global-utils') +} diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/EnableMoringConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/EnableMoringConfig.java new file mode 100644 index 00000000..069dead5 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/EnableMoringConfig.java @@ -0,0 +1,16 @@ +package org.depromeet.sambad.moring.infra; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.context.annotation.Import; + +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Import(MoringConfigImportSelector.class) +public @interface EnableMoringConfig { + + MoringConfigGroup[] value(); +} diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfig.java new file mode 100644 index 00000000..42ef4960 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfig.java @@ -0,0 +1,4 @@ +package org.depromeet.sambad.moring.infra; + +public interface MoringConfig { +} diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigGroup.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigGroup.java new file mode 100644 index 00000000..7eac1e0d --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigGroup.java @@ -0,0 +1,40 @@ +package org.depromeet.sambad.moring.infra; + +import org.depromeet.sambad.moring.infra.config.AsyncConfig; +import org.depromeet.sambad.moring.infra.config.CacheConfig; +import org.depromeet.sambad.moring.infra.config.JpaAuditingConfig; +import org.depromeet.sambad.moring.infra.config.JpaConfig; +import org.depromeet.sambad.moring.infra.config.ObjectStorageConfig; +import org.depromeet.sambad.moring.infra.config.P6spyConfig; +import org.depromeet.sambad.moring.infra.config.PropertiesConfig; +import org.depromeet.sambad.moring.infra.config.SchedulingConfig; +import org.depromeet.sambad.moring.infra.config.SwaggerConfig; +import org.depromeet.sambad.moring.infra.config.TimeConfig; +import org.depromeet.sambad.moring.infra.config.UserIdArgumentResolverConfig; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum MoringConfigGroup { + + // TODO: 현재 해당 설정은 moring-domain 모듈에 존재하며, request/response 의존성을 api 모듈로 옮긴 후 infra 모듈로 이동해야 함 + // FULL_FILE_URL_ANNOTATION(FullFileUrlConfig.class), + JPA(JpaConfig.class), + JPA_AUDITING(JpaAuditingConfig.class), + OBJECT_STORAGE(ObjectStorageConfig.class), + P6SPY(P6spyConfig.class), + CONFIGURATION_PROPERTIES(PropertiesConfig.class), + SWAGGER(SwaggerConfig.class), + TIME(TimeConfig.class), + USER_ID_ARGUMENT_RESOLVER(UserIdArgumentResolverConfig.class), + SCHEDULING(SchedulingConfig.class), + SPRING_CACHE(CacheConfig.class), + ASYNC(AsyncConfig.class), + + ; + + private final Class<? extends MoringConfig> configClass; + +} diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigImportSelector.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigImportSelector.java new file mode 100644 index 00000000..e70f5594 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/MoringConfigImportSelector.java @@ -0,0 +1,24 @@ +package org.depromeet.sambad.moring.infra; + +import java.util.Arrays; +import java.util.Map; + +import org.apache.commons.collections4.MapUtils; +import org.springframework.context.annotation.DeferredImportSelector; +import org.springframework.core.type.AnnotationMetadata; + +class MoringConfigImportSelector implements DeferredImportSelector { + + @Override + public String[] selectImports(AnnotationMetadata metadata) { + return Arrays.stream(getValues(metadata)) + .map(MoringConfigGroup::getConfigClass) + .map(Class::getName) + .toArray(String[]::new); + } + + private MoringConfigGroup[] getValues(AnnotationMetadata metadata) { + Map<String, Object> attributes = metadata.getAnnotationAttributes(EnableMoringConfig.class.getName()); + return (MoringConfigGroup[])MapUtils.getObject(attributes, "value", new MoringConfigGroup[] {}); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserId.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/annotation/UserId.java similarity index 81% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserId.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/annotation/UserId.java index a323a3d8..13d39b89 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserId.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/annotation/UserId.java @@ -1,4 +1,4 @@ -package org.depromeet.sambad.moring.user.presentation.resolver; +package org.depromeet.sambad.moring.infra.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -11,7 +11,7 @@ * 해당 Annotation을 부착한 파라미터에 UserId를 주입합니다.<br /> * Controller의 Parameter는 모두 Swagger에 표시되기 때문에, @Parameter(hidden = true)를 추가합니다. * - * @see UserIdArgumentResolver + * @see org.depromeet.sambad.moring.infra.resolver.UserIdArgumentResolver */ @Parameter(hidden = true) @Target({ElementType.PARAMETER}) diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/AsyncConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/AsyncConfig.java similarity index 88% rename from src/main/java/org/depromeet/sambad/moring/common/config/AsyncConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/AsyncConfig.java index 6240585b..086611d9 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/AsyncConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/AsyncConfig.java @@ -1,21 +1,20 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; import java.util.concurrent.Executor; -import org.depromeet.sambad.moring.common.logging.LoggingUtils; +import org.depromeet.sambad.moring.globalutils.logging.LoggingUtils; +import org.depromeet.sambad.moring.infra.MoringConfig; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import io.sentry.Sentry; -@Configuration @EnableAsync -public class AsyncConfig implements AsyncConfigurer { +public class AsyncConfig implements AsyncConfigurer, MoringConfig { @Value("${spring.task.execution.pool.core-size}") private int CORE_POOL_SIZE; diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/CacheConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/CacheConfig.java similarity index 76% rename from src/main/java/org/depromeet/sambad/moring/common/config/CacheConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/CacheConfig.java index bc33009f..3745e661 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/CacheConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/CacheConfig.java @@ -1,16 +1,15 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; import java.util.List; +import org.depromeet.sambad.moring.infra.MoringConfig; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.concurrent.ConcurrentMapCacheManager; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; @EnableCaching -@Configuration -public class CacheConfig { +public class CacheConfig implements MoringConfig { @Bean public CacheManager cacheManager() { diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaAuditingConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaAuditingConfig.java new file mode 100644 index 00000000..3dd5ebc5 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaAuditingConfig.java @@ -0,0 +1,8 @@ +package org.depromeet.sambad.moring.infra.config; + +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; + +@EnableJpaAuditing +public class JpaAuditingConfig implements MoringConfig { +} diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaConfig.java new file mode 100644 index 00000000..fa88eedd --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/JpaConfig.java @@ -0,0 +1,27 @@ +package org.depromeet.sambad.moring.infra.config; + +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.Bean; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; + +import com.querydsl.jpa.impl.JPAQueryFactory; + +import jakarta.persistence.EntityManager; + +@EntityScan(basePackages = "org.depromeet.sambad.moring.domain") +@EnableJpaRepositories(basePackages = "org.depromeet.sambad.moring.domain") +public class JpaConfig implements MoringConfig { + + private final EntityManager entityManager; + + public JpaConfig(EntityManager entityManager) { + this.entityManager = entityManager; + } + + @Bean + public JPAQueryFactory jpaQueryFactory() { + return new JPAQueryFactory(entityManager); + } +} + diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/ObjectStorageConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/ObjectStorageConfig.java new file mode 100644 index 00000000..c1c9ffa1 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/ObjectStorageConfig.java @@ -0,0 +1,38 @@ +package org.depromeet.sambad.moring.infra.config; + +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; + +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.client.builder.AwsClientBuilder; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; + +public class ObjectStorageConfig implements MoringConfig { + + @Value("${cloud.ncp.object-storage.credentials.access-key}") + private String accessKey; + + @Value("${cloud.ncp.object-storage.credentials.secret-key}") + private String secretKey; + + @Value("${cloud.ncp.object-storage.endpoint}") + private String endpoint; + + @Value("${cloud.ncp.region.static-region}") + private String region; + + @Bean + public AmazonS3 amazonS3() { + BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey); + + return AmazonS3ClientBuilder + .standard() + .withEndpointConfiguration( + new AwsClientBuilder.EndpointConfiguration(endpoint, region)) + .withCredentials(new AWSStaticCredentialsProvider(credentials)) + .build(); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/P6spyConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/P6spyConfig.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/common/config/P6spyConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/P6spyConfig.java index 2ebc2d3a..b2df22e4 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/P6spyConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/P6spyConfig.java @@ -1,7 +1,7 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; -import org.depromeet.sambad.moring.common.logging.P6spySqlLoggingFormatter; -import org.springframework.context.annotation.Configuration; +import org.depromeet.sambad.moring.globalutils.logging.P6spySqlLoggingFormatter; +import org.depromeet.sambad.moring.infra.MoringConfig; import org.springframework.context.annotation.Profile; import com.p6spy.engine.logging.P6LogLoadableOptions; @@ -12,8 +12,7 @@ import jakarta.annotation.PostConstruct; @Profile({"local", "dev"}) -@Configuration -public class P6spyConfig { +public class P6spyConfig implements MoringConfig { @PostConstruct public void setLogMessageFormat() { diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/PropertiesConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/PropertiesConfig.java new file mode 100644 index 00000000..5ca92592 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/PropertiesConfig.java @@ -0,0 +1,8 @@ +package org.depromeet.sambad.moring.infra.config; + +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@ConfigurationPropertiesScan(basePackages = "org.depromeet.sambad.moring") +public class PropertiesConfig implements MoringConfig { +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/SchedulingConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SchedulingConfig.java similarity index 77% rename from src/main/java/org/depromeet/sambad/moring/common/config/SchedulingConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SchedulingConfig.java index ab592bf4..590bc93f 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/SchedulingConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SchedulingConfig.java @@ -1,19 +1,18 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; import javax.sql.DataSource; +import org.depromeet.sambad.moring.infra.MoringConfig; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; import net.javacrumbs.shedlock.core.LockProvider; import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider; import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock; -@Configuration @EnableScheduling @EnableSchedulerLock(defaultLockAtMostFor = "PT30S") -public class SchedulingConfig { +public class SchedulingConfig implements MoringConfig { @Bean public LockProvider lockProvider(DataSource dataSource) { diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/SwaggerConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SwaggerConfig.java similarity index 94% rename from src/main/java/org/depromeet/sambad/moring/common/config/SwaggerConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SwaggerConfig.java index 486946a5..f6a7a109 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/SwaggerConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/SwaggerConfig.java @@ -1,15 +1,14 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; import static java.lang.String.*; import static org.springframework.security.config.Elements.*; -import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.depromeet.sambad.moring.infra.MoringConfig; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import io.swagger.v3.oas.models.Components; @@ -21,8 +20,7 @@ import lombok.RequiredArgsConstructor; @RequiredArgsConstructor -@Configuration -public class SwaggerConfig { +public class SwaggerConfig implements MoringConfig { private final Environment environment; diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/TimeConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/TimeConfig.java new file mode 100644 index 00000000..f158dec2 --- /dev/null +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/TimeConfig.java @@ -0,0 +1,14 @@ +package org.depromeet.sambad.moring.infra.config; + +import java.time.Clock; + +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.springframework.context.annotation.Bean; + +public class TimeConfig implements MoringConfig { + + @Bean + public Clock clock() { + return Clock.systemDefaultZone(); + } +} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/WebConfig.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/UserIdArgumentResolverConfig.java similarity index 54% rename from src/main/java/org/depromeet/sambad/moring/common/config/WebConfig.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/UserIdArgumentResolverConfig.java index 8bee68f7..0245a349 100644 --- a/src/main/java/org/depromeet/sambad/moring/common/config/WebConfig.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/config/UserIdArgumentResolverConfig.java @@ -1,14 +1,13 @@ -package org.depromeet.sambad.moring.common.config; +package org.depromeet.sambad.moring.infra.config; import java.util.List; -import org.depromeet.sambad.moring.user.presentation.resolver.UserIdArgumentResolver; -import org.springframework.context.annotation.Configuration; +import org.depromeet.sambad.moring.infra.MoringConfig; +import org.depromeet.sambad.moring.infra.resolver.UserIdArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -@Configuration -public class WebConfig implements WebMvcConfigurer { +public class UserIdArgumentResolverConfig implements WebMvcConfigurer, MoringConfig { @Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) { diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/introspector/.gitkeep b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/introspector/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserIdArgumentResolver.java b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/resolver/UserIdArgumentResolver.java similarity index 91% rename from src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserIdArgumentResolver.java rename to moring-infra/src/main/java/org/depromeet/sambad/moring/infra/resolver/UserIdArgumentResolver.java index a885917d..26de6a16 100644 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/resolver/UserIdArgumentResolver.java +++ b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/resolver/UserIdArgumentResolver.java @@ -1,7 +1,8 @@ -package org.depromeet.sambad.moring.user.presentation.resolver; +package org.depromeet.sambad.moring.infra.resolver; import java.util.Optional; +import org.depromeet.sambad.moring.infra.annotation.UserId; import org.springframework.core.MethodParameter; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; diff --git a/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/serializer/.gitkeep b/moring-infra/src/main/java/org/depromeet/sambad/moring/infra/serializer/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/moring-infra/src/test/java/org/depromeet/sambad/moring/infra/.gitkeep b/moring-infra/src/test/java/org/depromeet/sambad/moring/infra/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/settings.gradle b/settings.gradle index 17b068ea..a237cb3d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,6 @@ rootProject.name = 'moring' + +include 'moring-global-utils' +include 'moring-infra' +include 'moring-domain' +include 'moring-api' diff --git a/src/main/java/org/depromeet/sambad/moring/MoringApplication.java b/src/main/java/org/depromeet/sambad/moring/MoringApplication.java deleted file mode 100644 index 090b163e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/MoringApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.depromeet.sambad.moring; - -import java.util.TimeZone; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -import jakarta.annotation.PostConstruct; - -@SpringBootApplication -public class MoringApplication { - - private static final String TIMEZONE_KST = "Asia/Seoul"; - - public static void main(String[] args) { - SpringApplication.run(MoringApplication.class, args); - } - - @PostConstruct - public void init() { - TimeZone.setDefault(TimeZone.getTimeZone(TIMEZONE_KST)); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/InvalidAnswerContentException.java b/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/InvalidAnswerContentException.java deleted file mode 100644 index 38fd3566..00000000 --- a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/InvalidAnswerContentException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.answer.presentation.exception; - -import static org.depromeet.sambad.moring.answer.presentation.exception.AnswerExceptionCode.INVALID_ANSWER_CONTENT; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidAnswerContentException extends BusinessException { - public InvalidAnswerContentException() { - super(INVALID_ANSWER_CONTENT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/NotFoundAnswerException.java b/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/NotFoundAnswerException.java deleted file mode 100644 index fdf9ea5f..00000000 --- a/src/main/java/org/depromeet/sambad/moring/answer/presentation/exception/NotFoundAnswerException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.answer.presentation.exception; - -import static org.depromeet.sambad.moring.answer.presentation.exception.AnswerExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundAnswerException extends BusinessException { - - public NotFoundAnswerException() { - super(NOT_FOUND_ANSWER); - } -} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AlreadyRegisteredUserException.java b/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AlreadyRegisteredUserException.java deleted file mode 100644 index c4f30e5d..00000000 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AlreadyRegisteredUserException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; - -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class AlreadyRegisteredUserException extends BusinessException { - public AlreadyRegisteredUserException() { - super(ALREADY_REGISTERED_USER); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthenticationRequiredException.java b/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthenticationRequiredException.java deleted file mode 100644 index a775bb27..00000000 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/AuthenticationRequiredException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; - -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class AuthenticationRequiredException extends BusinessException { - public AuthenticationRequiredException() { - super(AUTHENTICATION_REQUIRED); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/RefreshTokenNotValidaException.java b/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/RefreshTokenNotValidaException.java deleted file mode 100644 index 0267091f..00000000 --- a/src/main/java/org/depromeet/sambad/moring/auth/presentation/exception/RefreshTokenNotValidaException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.auth.presentation.exception; - -import static org.depromeet.sambad.moring.auth.presentation.exception.AuthExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class RefreshTokenNotValidaException extends BusinessException { - public RefreshTokenNotValidaException() { - super(REFRESH_TOKEN_NOT_VALID); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/JpaAuditingConfig.java b/src/main/java/org/depromeet/sambad/moring/common/config/JpaAuditingConfig.java deleted file mode 100644 index decc1211..00000000 --- a/src/main/java/org/depromeet/sambad/moring/common/config/JpaAuditingConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.depromeet.sambad.moring.common.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.jpa.repository.config.EnableJpaAuditing; - -import com.querydsl.jpa.impl.JPAQueryFactory; - -import jakarta.persistence.EntityManager; - -@Configuration -@EnableJpaAuditing -public class JpaAuditingConfig { - - private final EntityManager entityManager; - - public JpaAuditingConfig(EntityManager entityManager) { - this.entityManager = entityManager; - } - - @Bean - public JPAQueryFactory jpaQueryFactory() { - return new JPAQueryFactory(entityManager); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/ObjectStorageConfig.java b/src/main/java/org/depromeet/sambad/moring/common/config/ObjectStorageConfig.java deleted file mode 100644 index c7f3eb5e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/common/config/ObjectStorageConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.depromeet.sambad.moring.common.config; - -import org.depromeet.sambad.moring.file.infrastructure.ObjectStorageProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import com.amazonaws.auth.AWSStaticCredentialsProvider; -import com.amazonaws.auth.BasicAWSCredentials; -import com.amazonaws.client.builder.AwsClientBuilder; -import com.amazonaws.services.s3.AmazonS3; -import com.amazonaws.services.s3.AmazonS3ClientBuilder; - -import lombok.RequiredArgsConstructor; - -@Configuration -@RequiredArgsConstructor -public class ObjectStorageConfig { - - private final ObjectStorageProperties objectStorageProperties; - - @Bean - public AmazonS3 amazonS3() { - BasicAWSCredentials credentials = new BasicAWSCredentials( - objectStorageProperties.objectStorage().credentials().accessKey(), - objectStorageProperties.objectStorage().credentials().secretKey()); - - return AmazonS3ClientBuilder - .standard() - .withEndpointConfiguration( - new AwsClientBuilder.EndpointConfiguration( - objectStorageProperties.objectStorage().endpoint(), - objectStorageProperties.region().staticRegion())) - .withCredentials(new AWSStaticCredentialsProvider(credentials)) - .build(); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/PropertiesConfig.java b/src/main/java/org/depromeet/sambad/moring/common/config/PropertiesConfig.java deleted file mode 100644 index ebd87aeb..00000000 --- a/src/main/java/org/depromeet/sambad/moring/common/config/PropertiesConfig.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.depromeet.sambad.moring.common.config; - -import org.springframework.boot.context.properties.ConfigurationPropertiesScan; -import org.springframework.context.annotation.Configuration; - -@Configuration -@ConfigurationPropertiesScan(basePackages = "org.depromeet.sambad.moring") -public class PropertiesConfig { -} diff --git a/src/main/java/org/depromeet/sambad/moring/common/config/TimeConfig.java b/src/main/java/org/depromeet/sambad/moring/common/config/TimeConfig.java deleted file mode 100644 index 6bb8e4e3..00000000 --- a/src/main/java/org/depromeet/sambad/moring/common/config/TimeConfig.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.depromeet.sambad.moring.common.config; - -import java.time.Clock; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class TimeConfig { - - @Bean - public Clock clock() { - return Clock.systemDefaultZone(); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/common/domain/Gender.java b/src/main/java/org/depromeet/sambad/moring/common/domain/Gender.java deleted file mode 100644 index 0cfa1992..00000000 --- a/src/main/java/org/depromeet/sambad/moring/common/domain/Gender.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.depromeet.sambad.moring.common.domain; - -public enum Gender { - MALE, - FEMALE, - - ; -} diff --git a/src/main/java/org/depromeet/sambad/moring/event/application/EventMessageTemplateRepository.java b/src/main/java/org/depromeet/sambad/moring/event/application/EventMessageTemplateRepository.java deleted file mode 100644 index ea5efc7b..00000000 --- a/src/main/java/org/depromeet/sambad/moring/event/application/EventMessageTemplateRepository.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.event.application; - -import java.util.Optional; - -import org.depromeet.sambad.moring.event.domain.EventMessageTemplate; -import org.depromeet.sambad.moring.event.domain.EventType; - -public interface EventMessageTemplateRepository { - - Optional<EventMessageTemplate> findByType(EventType type); -} diff --git a/src/main/java/org/depromeet/sambad/moring/event/domain/EventStatus.java b/src/main/java/org/depromeet/sambad/moring/event/domain/EventStatus.java deleted file mode 100644 index 8e7de04c..00000000 --- a/src/main/java/org/depromeet/sambad/moring/event/domain/EventStatus.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.depromeet.sambad.moring.event.domain; - -public enum EventStatus { - ACTIVE, - INACTIVE, - ; -} diff --git a/src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/NotFoundEventException.java b/src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/NotFoundEventException.java deleted file mode 100644 index 8d684e0e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/event/presentation/excepiton/NotFoundEventException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.event.presentation.excepiton; - -import static org.depromeet.sambad.moring.event.presentation.excepiton.EventExceptionCode.NOT_FOUND_EVENT; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundEventException extends BusinessException { - public NotFoundEventException() { - super(NOT_FOUND_EVENT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ExceedFileCountException.java b/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ExceedFileCountException.java deleted file mode 100644 index d5fd5981..00000000 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ExceedFileCountException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.file.presentation.exception; - -import static org.depromeet.sambad.moring.file.presentation.exception.FileExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class ExceedFileCountException extends BusinessException { - public ExceedFileCountException() { - super(EXCEED_FILE_COUNT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/NotFoundFileException.java b/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/NotFoundFileException.java deleted file mode 100644 index 3c12d576..00000000 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/NotFoundFileException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.file.presentation.exception; - -import static org.depromeet.sambad.moring.file.presentation.exception.FileExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundFileException extends BusinessException { - public NotFoundFileException() { - super(NOT_FOUND_FILE); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ObjectStorageServerException.java b/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ObjectStorageServerException.java deleted file mode 100644 index 420798e5..00000000 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/ObjectStorageServerException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.file.presentation.exception; - -import static org.depromeet.sambad.moring.file.presentation.exception.FileExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class ObjectStorageServerException extends BusinessException { - public ObjectStorageServerException() { - super(OBJECTSTORAGE_SERVER_ERROR); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/UnsupportedFileTypeException.java b/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/UnsupportedFileTypeException.java deleted file mode 100644 index 74a5296d..00000000 --- a/src/main/java/org/depromeet/sambad/moring/file/presentation/exception/UnsupportedFileTypeException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.file.presentation.exception; - -import static org.depromeet.sambad.moring.file.presentation.exception.FileExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class UnsupportedFileTypeException extends BusinessException { - public UnsupportedFileTypeException() { - super(UNSUPPORTED_FILE_TYPE); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java b/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java deleted file mode 100644 index 6c1109a7..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/answer/presentation/exception/DuplicateMeetingAnswerException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.answer.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.answer.presentation.exception.MeetingAnswerExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class DuplicateMeetingAnswerException extends BusinessException { - - public DuplicateMeetingAnswerException() { - super(DUPLICATE_MEETING_ANSWER); - } -} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java b/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java deleted file mode 100644 index 8dc91edf..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/InvalidCommentWriterException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception; - -import static org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception.MeetingQuestionCommentExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidCommentWriterException extends BusinessException { - public InvalidCommentWriterException() { - super(INVALID_COMMENT_WRITER); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java b/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java deleted file mode 100644 index f17ef12e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/comment/exception/NotFoundMeetingQuestionCommentException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception; - -import static org.depromeet.sambad.moring.meeting.comment.presentation.comment.exception.MeetingQuestionCommentExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundMeetingQuestionCommentException extends BusinessException { - - public NotFoundMeetingQuestionCommentException() { - super(NOT_FOUND_MEETING_QUESTION_COMMENT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java b/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java deleted file mode 100644 index 1a410e99..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/InvalidCommentReplyWriterException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception; - -import static org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception.MeetingQuestionCommentReplyExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidCommentReplyWriterException extends BusinessException { - public InvalidCommentReplyWriterException() { - super(INVALID_COMMENT_REPLY_WRITER); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java b/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java deleted file mode 100644 index 7b7fb68c..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/comment/presentation/reply/exception/NotFoundMeetingQuestionCommentReplyException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception; - -import static org.depromeet.sambad.moring.meeting.comment.presentation.reply.exception.MeetingQuestionCommentReplyExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundMeetingQuestionCommentReplyException extends BusinessException { - public NotFoundMeetingQuestionCommentReplyException() { - super(NOT_FOUND_MEETING_QUESTION_COMMENT_REPLY); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java b/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java deleted file mode 100644 index b2d6f933..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingReceiverException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.HandWavingExceptionCode.INVALID_HAND_WAVING_RECEIVER; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidHandWavingReceiverException extends BusinessException { - public InvalidHandWavingReceiverException() { - super(INVALID_HAND_WAVING_RECEIVER); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java b/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java deleted file mode 100644 index edeb4d05..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/InvalidHandWavingStatusChangeException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.HandWavingExceptionCode.INVALID_HAND_WAVING_STATUS_CHANGE; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidHandWavingStatusChangeException extends BusinessException { - - public InvalidHandWavingStatusChangeException() { - super(INVALID_HAND_WAVING_STATUS_CHANGE); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java b/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java deleted file mode 100644 index 49b12480..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/handwaving/presentation/exception/NotFoundHandWavingException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.handwaving.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.handwaving.presentation.exception.HandWavingExceptionCode.NOT_FOUND_HAND_WAVING; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundHandWavingException extends BusinessException { - public NotFoundHandWavingException() { - super(NOT_FOUND_HAND_WAVING); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingCodeGenerator.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingCodeGenerator.java deleted file mode 100644 index dc10befd..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingCodeGenerator.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; - -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; - -public interface MeetingCodeGenerator { - - MeetingCode generate(); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingRepository.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingRepository.java deleted file mode 100644 index 9e62217b..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/MeetingRepository.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; - -import java.util.Optional; - -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; - -public interface MeetingRepository { - - Optional<Meeting> findById(Long id); - - void save(Meeting meeting); - - Optional<Meeting> findByCode(MeetingCode code); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/TypesPerMeetingRepository.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/TypesPerMeetingRepository.java deleted file mode 100644 index a136bc57..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/application/TypesPerMeetingRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.application; - -import java.util.List; - -import org.depromeet.sambad.moring.meeting.meeting.domain.TypesPerMeeting; - -public interface TypesPerMeetingRepository { - - void saveAll(List<TypesPerMeeting> types); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingJpaRepository.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingJpaRepository.java deleted file mode 100644 index df5437b3..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/infrastructure/MeetingJpaRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.infrastructure; - -import java.util.Optional; - -import org.depromeet.sambad.moring.meeting.meeting.domain.Meeting; -import org.depromeet.sambad.moring.meeting.meeting.domain.MeetingCode; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface MeetingJpaRepository extends JpaRepository<Meeting, Long> { - - Optional<Meeting> findByCode(MeetingCode code); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java deleted file mode 100644 index 65865c5a..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/ExceedMaxMeetingCountException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.meeting.presentation.exception.MeetingExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class ExceedMaxMeetingCountException extends BusinessException { - public ExceedMaxMeetingCountException() { - super(EXCEED_MAX_MEETING_COUNT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingNotFoundException.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingNotFoundException.java deleted file mode 100644 index 9e3006bd..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/MeetingNotFoundException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.meeting.presentation.exception.MeetingExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class MeetingNotFoundException extends BusinessException { - public MeetingNotFoundException() { - super(MEETING_NOT_FOUND); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java b/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java deleted file mode 100644 index c0a642af..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/meeting/presentation/exception/NotJoinedAnyMeetingException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.meeting.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.meeting.presentation.exception.MeetingExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotJoinedAnyMeetingException extends BusinessException { - public NotJoinedAnyMeetingException() { - super(NOT_JOINED_ANY_MEETING); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyRepository.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyRepository.java deleted file mode 100644 index bec29c8e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/HobbyRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.application; - -import java.util.List; - -import org.depromeet.sambad.moring.meeting.member.domain.Hobby; - -public interface HobbyRepository { - - List<Hobby> findAll(); - - List<Hobby> findByIdIn(List<Long> ids); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRandomGenerator.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRandomGenerator.java deleted file mode 100644 index 716c24bf..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/application/MeetingMemberRandomGenerator.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.application; - -import java.util.List; - -import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; - -public interface MeetingMemberRandomGenerator { - - MeetingMember generate(List<MeetingMember> nextTargets); -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberRole.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberRole.java deleted file mode 100644 index 211bbf1c..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/domain/MeetingMemberRole.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.domain; - -public enum MeetingMemberRole { - - OWNER, - ADMIN, - MEMBER, - ; -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxMemberCountException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxMemberCountException.java deleted file mode 100644 index 71976682..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxMemberCountException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class ExceedMaxMemberCountException extends BusinessException { - public ExceedMaxMemberCountException() { - super(EXCEED_MAX_MEMBER_COUNT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java deleted file mode 100644 index 54e0d9ae..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/ExceedMaxOwnerCountException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class ExceedMaxOwnerCountException extends BusinessException { - public ExceedMaxOwnerCountException() { - super(EXCEED_MAX_OWNER_COUNT); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java deleted file mode 100644 index 3bdcb014..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberAlreadyExistsException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class MeetingMemberAlreadyExistsException extends BusinessException { - public MeetingMemberAlreadyExistsException() { - super(MEETING_MEMBER_ALREADY_EXISTS); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberNotFoundException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberNotFoundException.java deleted file mode 100644 index dfd2fb03..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/MeetingMemberNotFoundException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class MeetingMemberNotFoundException extends BusinessException { - public MeetingMemberNotFoundException() { - super(MEETING_MEMBER_NOT_FOUND); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java deleted file mode 100644 index d79153d0..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/NoMeetingMemberInConditionException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NoMeetingMemberInConditionException extends BusinessException { - public NoMeetingMemberInConditionException() { - super(NO_MEETING_MEMBER_IN_CONDITION); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java b/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java deleted file mode 100644 index b84115e6..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/member/presentation/exception/UserNotMemberOfMeetingException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.meeting.member.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.member.presentation.exception.MeetingMemberExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class UserNotMemberOfMeetingException extends BusinessException { - public UserNotMemberOfMeetingException() { - super(USER_NOT_MEMBER_OF_MEETING); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java b/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java deleted file mode 100644 index ff3fadc2..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/DuplicateMeetingQuestionException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class DuplicateMeetingQuestionException extends BusinessException { - - public DuplicateMeetingQuestionException() { - super(DUPLICATE_MEETING_QUESTION); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/FinishedMeetingQuestionException.java b/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/FinishedMeetingQuestionException.java deleted file mode 100644 index 944a48e8..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/FinishedMeetingQuestionException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class FinishedMeetingQuestionException extends BusinessException { - - public FinishedMeetingQuestionException() { - super(FINISHED_MEETING_QUESTION); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java b/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java deleted file mode 100644 index 1416198e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberNextTargetException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidMeetingMemberNextTargetException extends BusinessException { - - public InvalidMeetingMemberNextTargetException() { - super(INVALID_MEETING_MEMBER_NEXT_TARGET); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java b/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java deleted file mode 100644 index 62f562dd..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/InvalidMeetingMemberTargetException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class InvalidMeetingMemberTargetException extends BusinessException { - - public InvalidMeetingMemberTargetException() { - super(INVALID_MEETING_MEMBER_TARGET); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/NotFoundMeetingQuestion.java b/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/NotFoundMeetingQuestion.java deleted file mode 100644 index 01b0da57..00000000 --- a/src/main/java/org/depromeet/sambad/moring/meeting/question/presentation/exception/NotFoundMeetingQuestion.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.meeting.question.presentation.exception; - -import static org.depromeet.sambad.moring.meeting.question.presentation.exception.MeetingQuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundMeetingQuestion extends BusinessException { - - public NotFoundMeetingQuestion() { - super(NOT_FOUND_MEETING_QUESTION); - } -} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/AnswerCountOutOfRangeException.java b/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/AnswerCountOutOfRangeException.java deleted file mode 100644 index 7a4c9ba8..00000000 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/AnswerCountOutOfRangeException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.question.presentation.exception; - -import static org.depromeet.sambad.moring.question.presentation.exception.QuestionExceptionCode.ANSWER_COUNT_OUT_OF_RANGE; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class AnswerCountOutOfRangeException extends BusinessException { - public AnswerCountOutOfRangeException() { - super(ANSWER_COUNT_OUT_OF_RANGE); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/DuplicateQuestionException.java b/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/DuplicateQuestionException.java deleted file mode 100644 index 6425c4ba..00000000 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/DuplicateQuestionException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.question.presentation.exception; - -import static org.depromeet.sambad.moring.question.presentation.exception.QuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class DuplicateQuestionException extends BusinessException { - - public DuplicateQuestionException() { - super(DUPLICATE_QUESTION); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundAvailableQuestionException.java b/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundAvailableQuestionException.java deleted file mode 100644 index dbc46692..00000000 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundAvailableQuestionException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.question.presentation.exception; - -import static org.depromeet.sambad.moring.question.presentation.exception.QuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundAvailableQuestionException extends BusinessException { - public NotFoundAvailableQuestionException() { - super(NOT_FOUND_AVAILABLE_QUESTION); - } -} diff --git a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundQuestionException.java b/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundQuestionException.java deleted file mode 100644 index def10c3e..00000000 --- a/src/main/java/org/depromeet/sambad/moring/question/presentation/exception/NotFoundQuestionException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.depromeet.sambad.moring.question.presentation.exception; - -import static org.depromeet.sambad.moring.question.presentation.exception.QuestionExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundQuestionException extends BusinessException { - - public NotFoundQuestionException() { - super(NOT_FOUND_QUESTION); - } -} \ No newline at end of file diff --git a/src/main/java/org/depromeet/sambad/moring/user/presentation/exception/NotFoundUserException.java b/src/main/java/org/depromeet/sambad/moring/user/presentation/exception/NotFoundUserException.java deleted file mode 100644 index c5a2c9a8..00000000 --- a/src/main/java/org/depromeet/sambad/moring/user/presentation/exception/NotFoundUserException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.depromeet.sambad.moring.user.presentation.exception; - -import static org.depromeet.sambad.moring.user.presentation.exception.UserExceptionCode.*; - -import org.depromeet.sambad.moring.common.exception.BusinessException; - -public class NotFoundUserException extends BusinessException { - public NotFoundUserException() { - super(NOT_FOUND_USER); - } -} diff --git a/src/test/java/org/depromeet/sambad/moring/SampleTests.java b/src/test/java/org/depromeet/sambad/moring/SampleTests.java deleted file mode 100644 index 8d053f94..00000000 --- a/src/test/java/org/depromeet/sambad/moring/SampleTests.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.depromeet.sambad.moring; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import org.junit.jupiter.api.Test; - -public class SampleTests { - - @Test - void alwaysPassTest1() { - assertTrue(true); - } - - @Test - void alwaysPassTest2() { - assertTrue(true); - } - - @Test - void alwaysPassTest3() { - assertTrue(true); - } - - @Test - void alwaysPassTest4() { - assertTrue(true); - } - - // @Test - // void alwaysFalseTest() { - // fail(); - // } -}