diff --git a/src/main/kotlin/org/meogo/domain/user/presentation/dto/request/UserCheckRequest.kt b/src/main/kotlin/org/meogo/domain/user/presentation/dto/request/UserCheckRequest.kt new file mode 100644 index 0000000..7cc0ba6 --- /dev/null +++ b/src/main/kotlin/org/meogo/domain/user/presentation/dto/request/UserCheckRequest.kt @@ -0,0 +1,5 @@ +package org.meogo.domain.user.presentation.dto.request + +data class UserCheckRequest( + val accountId: String +) diff --git a/src/main/kotlin/org/meogo/domain/user/service/CheckAccountIdService.kt b/src/main/kotlin/org/meogo/domain/user/service/CheckAccountIdService.kt new file mode 100644 index 0000000..b8afa47 --- /dev/null +++ b/src/main/kotlin/org/meogo/domain/user/service/CheckAccountIdService.kt @@ -0,0 +1,14 @@ +package org.meogo.domain.user.service + +import org.meogo.domain.user.presentation.dto.request.UserCheckRequest +import org.meogo.domain.user.repository.UserRepository +import org.springframework.stereotype.Service + +@Service +class CheckAccountIdService( + private val userRepository: UserRepository +) { + fun execute(request: UserCheckRequest): Boolean { + return userRepository.existsByAccountId(request.accountId) + } +}