Skip to content

Commit

Permalink
refact: organize packages by domain
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji-soo708 committed Jan 11, 2025
1 parent a37f65c commit ccd66c3
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dobby.backend.application.mapper
import com.dobby.backend.application.usecase.signup.CreateResearcherUseCase
import com.dobby.backend.application.usecase.signup.CreateParticipantUseCase
import com.dobby.backend.application.usecase.member.CreateResearcherUseCase
import com.dobby.backend.application.usecase.member.CreateParticipantUseCase
import com.dobby.backend.domain.model.member.Participant
import com.dobby.backend.domain.model.member.Researcher
import com.dobby.backend.infrastructure.database.entity.member.MemberEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.dobby.backend.application.mapper

import com.dobby.backend.application.usecase.signup.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.signup.email.EmailVerificationUseCase
import com.dobby.backend.application.usecase.member.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.member.email.EmailVerificationUseCase
import com.dobby.backend.infrastructure.database.entity.VerificationEntity
import com.dobby.backend.infrastructure.database.entity.enum.VerificationStatus
import com.dobby.backend.presentation.api.dto.request.signup.EmailSendRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.dobby.backend.application.service

import com.dobby.backend.application.usecase.*
import com.dobby.backend.application.usecase.auth.FetchGoogleUserInfoUseCase
import com.dobby.backend.application.usecase.auth.FetchNaverUserInfoUseCase
import com.dobby.backend.application.usecase.auth.GenerateTestTokenUseCase
import com.dobby.backend.application.usecase.auth.GenerateTokenWithRefreshTokenUseCase
import org.springframework.stereotype.Service

@Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.dobby.backend.application.service

import com.dobby.backend.application.usecase.signup.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.signup.email.EmailVerificationUseCase
import com.dobby.backend.application.usecase.member.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.member.email.EmailVerificationUseCase
import jakarta.transaction.Transactional
import org.springframework.stereotype.Service

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.dobby.backend.application.service

import com.dobby.backend.application.usecase.signup.CreateParticipantUseCase
import com.dobby.backend.application.usecase.signup.CreateResearcherUseCase
import com.dobby.backend.application.usecase.signup.VerifyResearcherEmailUseCase
import com.dobby.backend.application.usecase.member.CreateParticipantUseCase
import com.dobby.backend.application.usecase.member.CreateResearcherUseCase
import com.dobby.backend.application.usecase.member.VerifyResearcherEmailUseCase
import com.dobby.backend.domain.exception.SignupOauthEmailDuplicateException
import com.dobby.backend.domain.gateway.MemberGateway
import com.dobby.backend.infrastructure.database.entity.enum.MemberStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dobby.backend.application.usecase
package com.dobby.backend.application.usecase.auth

import com.dobby.backend.application.usecase.UseCase
import com.dobby.backend.domain.gateway.MemberGateway
import com.dobby.backend.domain.gateway.TokenGateway
import com.dobby.backend.domain.model.member.Member
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dobby.backend.application.usecase
package com.dobby.backend.application.usecase.auth

import com.dobby.backend.application.usecase.UseCase
import com.dobby.backend.domain.gateway.MemberGateway
import com.dobby.backend.domain.gateway.TokenGateway
import com.dobby.backend.domain.model.member.Member
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.application.usecase.signup
package com.dobby.backend.application.usecase.member

import com.dobby.backend.application.mapper.SignupMapper
import com.dobby.backend.application.usecase.UseCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.application.usecase.signup
package com.dobby.backend.application.usecase.member

import com.dobby.backend.application.mapper.SignupMapper
import com.dobby.backend.application.usecase.UseCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.application.usecase.signup
package com.dobby.backend.application.usecase.member


import com.dobby.backend.application.usecase.UseCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.application.usecase.signup.email
package com.dobby.backend.application.usecase.member.email

import com.dobby.backend.application.mapper.VerificationMapper
import com.dobby.backend.application.usecase.UseCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.application.usecase.signup.email
package com.dobby.backend.application.usecase.member.email

import com.dobby.backend.application.mapper.VerificationMapper
import com.dobby.backend.application.usecase.UseCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.dobby.backend.infrastructure.database.entity.enum.RoleType
import com.dobby.backend.presentation.api.dto.request.auth.google.GoogleOauthLoginRequest
import com.dobby.backend.presentation.api.dto.request.auth.MemberRefreshTokenRequest
import com.dobby.backend.presentation.api.dto.request.auth.NaverOauthLoginRequest
import com.dobby.backend.presentation.api.dto.response.MemberResponse
import com.dobby.backend.presentation.api.dto.response.member.MemberResponse
import com.dobby.backend.presentation.api.dto.response.auth.TestMemberSignInResponse
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package com.dobby.backend.presentation.api.controller
import com.dobby.backend.application.service.EmailService
import com.dobby.backend.presentation.api.dto.request.signup.EmailSendRequest
import com.dobby.backend.presentation.api.dto.request.signup.EmailVerificationRequest
import com.dobby.backend.presentation.api.dto.response.signup.EmailSendResponse
import com.dobby.backend.presentation.api.dto.response.signup.EmailVerificationResponse
import com.dobby.backend.presentation.api.dto.response.member.EmailSendResponse
import com.dobby.backend.presentation.api.dto.response.member.EmailVerificationResponse
import com.dobby.backend.presentation.api.mapper.EmailMapper
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.dobby.backend.presentation.api.controller
import com.dobby.backend.application.service.SignupService
import com.dobby.backend.presentation.api.dto.request.signup.ParticipantSignupRequest
import com.dobby.backend.presentation.api.dto.request.signup.ResearcherSignupRequest
import com.dobby.backend.presentation.api.dto.response.signup.SignupResponse
import com.dobby.backend.presentation.api.dto.response.member.SignupResponse
import com.dobby.backend.presentation.api.mapper.SignupMapper
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dobby.backend.presentation.api.dto.response.auth

import com.dobby.backend.presentation.api.dto.response.MemberResponse
import com.dobby.backend.presentation.api.dto.response.member.MemberResponse
import io.swagger.v3.oas.annotations.media.Schema

@Schema(description = "로그인 결과 DTO")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dobby.backend.presentation.api.dto.response.auth

import com.dobby.backend.presentation.api.dto.response.MemberResponse
import com.dobby.backend.presentation.api.dto.response.member.MemberResponse
import io.swagger.v3.oas.annotations.media.Schema
import lombok.Getter

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.presentation.api.dto.response.signup
package com.dobby.backend.presentation.api.dto.response.member

import io.swagger.v3.oas.annotations.media.Schema

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.presentation.api.dto.response.signup
package com.dobby.backend.presentation.api.dto.response.member

import io.swagger.v3.oas.annotations.media.Schema

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dobby.backend.presentation.api.dto.response
package com.dobby.backend.presentation.api.dto.response.member

import com.dobby.backend.domain.model.member.Member
import com.dobby.backend.infrastructure.database.entity.enum.ProviderType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.dobby.backend.presentation.api.dto.response.signup
package com.dobby.backend.presentation.api.dto.response.member

import com.dobby.backend.presentation.api.dto.response.MemberResponse
import io.swagger.v3.oas.annotations.media.Schema

data class SignupResponse(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.dobby.backend.presentation.api.mapper

import com.dobby.backend.application.usecase.signup.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.signup.email.EmailVerificationUseCase
import com.dobby.backend.application.usecase.member.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.member.email.EmailVerificationUseCase
import com.dobby.backend.presentation.api.dto.request.signup.EmailSendRequest
import com.dobby.backend.presentation.api.dto.request.signup.EmailVerificationRequest
import com.dobby.backend.presentation.api.dto.response.signup.EmailSendResponse
import com.dobby.backend.presentation.api.dto.response.signup.EmailVerificationResponse
import com.dobby.backend.presentation.api.dto.response.member.EmailSendResponse
import com.dobby.backend.presentation.api.dto.response.member.EmailVerificationResponse

object EmailMapper {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.dobby.backend.presentation.api.mapper

import com.dobby.backend.application.usecase.signup.CreateResearcherUseCase
import com.dobby.backend.application.usecase.signup.CreateParticipantUseCase
import com.dobby.backend.application.usecase.member.CreateResearcherUseCase
import com.dobby.backend.application.usecase.member.CreateParticipantUseCase
import com.dobby.backend.presentation.api.dto.request.signup.ParticipantSignupRequest
import com.dobby.backend.presentation.api.dto.request.signup.ResearcherSignupRequest
import com.dobby.backend.presentation.api.dto.response.MemberResponse
import com.dobby.backend.presentation.api.dto.response.signup.SignupResponse
import com.dobby.backend.presentation.api.dto.response.member.MemberResponse
import com.dobby.backend.presentation.api.dto.response.member.SignupResponse

object SignupMapper {
fun toCreateResearcherInput(req: ResearcherSignupRequest) : CreateResearcherUseCase.Input{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dobby.backend.application.service
import com.dobby.backend.application.usecase.signup.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.signup.email.EmailVerificationUseCase
import com.dobby.backend.application.usecase.member.email.EmailCodeSendUseCase
import com.dobby.backend.application.usecase.member.email.EmailVerificationUseCase
import io.kotest.core.spec.style.BehaviorSpec
import io.kotest.matchers.shouldBe
import io.mockk.every
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dobby.backend.application.usecase

import com.dobby.backend.application.usecase.auth.GenerateTestTokenUseCase
import com.dobby.backend.domain.gateway.MemberGateway
import io.kotest.core.spec.style.BehaviorSpec
import com.dobby.backend.domain.gateway.TokenGateway
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dobby.backend.application.usecase

import com.dobby.backend.application.usecase.auth.GenerateTokenWithRefreshTokenUseCase
import com.dobby.backend.domain.gateway.MemberGateway
import com.dobby.backend.domain.gateway.TokenGateway
import com.dobby.backend.domain.model.member.Member
Expand Down

0 comments on commit ccd66c3

Please sign in to comment.