From dca7009dd3dfe543708d65a5f0b088aa2fe05fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=ABsungmin?= Date: Wed, 13 Nov 2024 16:11:59 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20:=20#8=20=ED=8C=A8=ED=82=A4=EC=A7=80?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/sopt/and/data/remote/source/AuthRepositoryImpl.kt | 8 ++++---- .../main/java/org/sopt/and/domain/mapper/AuthMapper.kt | 8 ++++---- .../and/domain/model/{user => auth}/LoginUserEntity.kt | 2 +- .../and/domain/model/{user => auth}/RegisterUserEntity.kt | 2 +- .../sopt/and/domain/model/{user => auth}/UserIdEntity.kt | 2 +- .../and/domain/model/{user => auth}/UserTokenEntity.kt | 2 +- .../java/org/sopt/and/domain/repository/AuthRepository.kt | 8 ++++---- .../java/org/sopt/and/domain/usecase/LoginUserUseCase.kt | 4 ++-- .../org/sopt/and/domain/usecase/RegisterUserUseCase.kt | 4 ++-- .../sopt/and/presentation/viewmodel/SignInViewModel.kt | 2 +- .../sopt/and/presentation/viewmodel/SignUpViewModel.kt | 3 +-- 11 files changed, 22 insertions(+), 23 deletions(-) rename app/src/main/java/org/sopt/and/domain/model/{user => auth}/LoginUserEntity.kt (67%) rename app/src/main/java/org/sopt/and/domain/model/{user => auth}/RegisterUserEntity.kt (73%) rename app/src/main/java/org/sopt/and/domain/model/{user => auth}/UserIdEntity.kt (54%) rename app/src/main/java/org/sopt/and/domain/model/{user => auth}/UserTokenEntity.kt (57%) diff --git a/app/src/main/java/org/sopt/and/data/remote/source/AuthRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/remote/source/AuthRepositoryImpl.kt index 58690f0..851ed51 100644 --- a/app/src/main/java/org/sopt/and/data/remote/source/AuthRepositoryImpl.kt +++ b/app/src/main/java/org/sopt/and/data/remote/source/AuthRepositoryImpl.kt @@ -1,10 +1,10 @@ package org.sopt.and.data.remote.source import org.sopt.and.domain.mapper.AuthMapper -import org.sopt.and.domain.model.user.LoginUserEntity -import org.sopt.and.domain.model.user.RegisterUserEntity -import org.sopt.and.domain.model.user.UserIdEntity -import org.sopt.and.domain.model.user.UserTokenEntity +import org.sopt.and.domain.model.auth.LoginUserEntity +import org.sopt.and.domain.model.auth.RegisterUserEntity +import org.sopt.and.domain.model.auth.UserIdEntity +import org.sopt.and.domain.model.auth.UserTokenEntity import org.sopt.and.domain.repository.AuthRepository import org.sopt.and.utils.TokenManager import javax.inject.Inject diff --git a/app/src/main/java/org/sopt/and/domain/mapper/AuthMapper.kt b/app/src/main/java/org/sopt/and/domain/mapper/AuthMapper.kt index 5e8d3fa..1987b8e 100644 --- a/app/src/main/java/org/sopt/and/domain/mapper/AuthMapper.kt +++ b/app/src/main/java/org/sopt/and/domain/mapper/AuthMapper.kt @@ -4,10 +4,10 @@ import org.sopt.and.data.model.request.UserLoginRequestDto import org.sopt.and.data.model.request.UserRegisterRequestDto import org.sopt.and.data.model.response.UserLoginResponse import org.sopt.and.data.model.response.UserRegisterResponse -import org.sopt.and.domain.model.user.LoginUserEntity -import org.sopt.and.domain.model.user.RegisterUserEntity -import org.sopt.and.domain.model.user.UserIdEntity -import org.sopt.and.domain.model.user.UserTokenEntity +import org.sopt.and.domain.model.auth.LoginUserEntity +import org.sopt.and.domain.model.auth.RegisterUserEntity +import org.sopt.and.domain.model.auth.UserIdEntity +import org.sopt.and.domain.model.auth.UserTokenEntity object AuthMapper { fun mapperToUserRegisterRequestDto(entity: RegisterUserEntity) = UserRegisterRequestDto( diff --git a/app/src/main/java/org/sopt/and/domain/model/user/LoginUserEntity.kt b/app/src/main/java/org/sopt/and/domain/model/auth/LoginUserEntity.kt similarity index 67% rename from app/src/main/java/org/sopt/and/domain/model/user/LoginUserEntity.kt rename to app/src/main/java/org/sopt/and/domain/model/auth/LoginUserEntity.kt index 8f82b8b..ad9204e 100644 --- a/app/src/main/java/org/sopt/and/domain/model/user/LoginUserEntity.kt +++ b/app/src/main/java/org/sopt/and/domain/model/auth/LoginUserEntity.kt @@ -1,4 +1,4 @@ -package org.sopt.and.domain.model.user +package org.sopt.and.domain.model.auth data class LoginUserEntity( val username: String, diff --git a/app/src/main/java/org/sopt/and/domain/model/user/RegisterUserEntity.kt b/app/src/main/java/org/sopt/and/domain/model/auth/RegisterUserEntity.kt similarity index 73% rename from app/src/main/java/org/sopt/and/domain/model/user/RegisterUserEntity.kt rename to app/src/main/java/org/sopt/and/domain/model/auth/RegisterUserEntity.kt index 9c26ef9..173a645 100644 --- a/app/src/main/java/org/sopt/and/domain/model/user/RegisterUserEntity.kt +++ b/app/src/main/java/org/sopt/and/domain/model/auth/RegisterUserEntity.kt @@ -1,4 +1,4 @@ -package org.sopt.and.domain.model.user +package org.sopt.and.domain.model.auth data class RegisterUserEntity( val username: String, diff --git a/app/src/main/java/org/sopt/and/domain/model/user/UserIdEntity.kt b/app/src/main/java/org/sopt/and/domain/model/auth/UserIdEntity.kt similarity index 54% rename from app/src/main/java/org/sopt/and/domain/model/user/UserIdEntity.kt rename to app/src/main/java/org/sopt/and/domain/model/auth/UserIdEntity.kt index d3bb083..ce6147c 100644 --- a/app/src/main/java/org/sopt/and/domain/model/user/UserIdEntity.kt +++ b/app/src/main/java/org/sopt/and/domain/model/auth/UserIdEntity.kt @@ -1,4 +1,4 @@ -package org.sopt.and.domain.model.user +package org.sopt.and.domain.model.auth data class UserIdEntity ( val no : Long diff --git a/app/src/main/java/org/sopt/and/domain/model/user/UserTokenEntity.kt b/app/src/main/java/org/sopt/and/domain/model/auth/UserTokenEntity.kt similarity index 57% rename from app/src/main/java/org/sopt/and/domain/model/user/UserTokenEntity.kt rename to app/src/main/java/org/sopt/and/domain/model/auth/UserTokenEntity.kt index 9b5c909..5ff5c45 100644 --- a/app/src/main/java/org/sopt/and/domain/model/user/UserTokenEntity.kt +++ b/app/src/main/java/org/sopt/and/domain/model/auth/UserTokenEntity.kt @@ -1,4 +1,4 @@ -package org.sopt.and.domain.model.user +package org.sopt.and.domain.model.auth data class UserTokenEntity( val token: String diff --git a/app/src/main/java/org/sopt/and/domain/repository/AuthRepository.kt b/app/src/main/java/org/sopt/and/domain/repository/AuthRepository.kt index 2989b41..d359251 100644 --- a/app/src/main/java/org/sopt/and/domain/repository/AuthRepository.kt +++ b/app/src/main/java/org/sopt/and/domain/repository/AuthRepository.kt @@ -1,9 +1,9 @@ package org.sopt.and.domain.repository -import org.sopt.and.domain.model.user.LoginUserEntity -import org.sopt.and.domain.model.user.RegisterUserEntity -import org.sopt.and.domain.model.user.UserIdEntity -import org.sopt.and.domain.model.user.UserTokenEntity +import org.sopt.and.domain.model.auth.LoginUserEntity +import org.sopt.and.domain.model.auth.RegisterUserEntity +import org.sopt.and.domain.model.auth.UserIdEntity +import org.sopt.and.domain.model.auth.UserTokenEntity interface AuthRepository { suspend fun registerUser(userEntity: RegisterUserEntity): Result diff --git a/app/src/main/java/org/sopt/and/domain/usecase/LoginUserUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/LoginUserUseCase.kt index 2da3f20..31129e0 100644 --- a/app/src/main/java/org/sopt/and/domain/usecase/LoginUserUseCase.kt +++ b/app/src/main/java/org/sopt/and/domain/usecase/LoginUserUseCase.kt @@ -1,7 +1,7 @@ package org.sopt.and.domain.usecase -import org.sopt.and.domain.model.user.LoginUserEntity -import org.sopt.and.domain.model.user.UserTokenEntity +import org.sopt.and.domain.model.auth.LoginUserEntity +import org.sopt.and.domain.model.auth.UserTokenEntity import org.sopt.and.domain.repository.AuthRepository class LoginUserUseCase( diff --git a/app/src/main/java/org/sopt/and/domain/usecase/RegisterUserUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/RegisterUserUseCase.kt index f737bb1..3426388 100644 --- a/app/src/main/java/org/sopt/and/domain/usecase/RegisterUserUseCase.kt +++ b/app/src/main/java/org/sopt/and/domain/usecase/RegisterUserUseCase.kt @@ -1,7 +1,7 @@ package org.sopt.and.domain.usecase -import org.sopt.and.domain.model.user.RegisterUserEntity -import org.sopt.and.domain.model.user.UserIdEntity +import org.sopt.and.domain.model.auth.RegisterUserEntity +import org.sopt.and.domain.model.auth.UserIdEntity import org.sopt.and.domain.repository.AuthRepository class RegisterUserUseCase( diff --git a/app/src/main/java/org/sopt/and/presentation/viewmodel/SignInViewModel.kt b/app/src/main/java/org/sopt/and/presentation/viewmodel/SignInViewModel.kt index 1db26db..b36bf6b 100644 --- a/app/src/main/java/org/sopt/and/presentation/viewmodel/SignInViewModel.kt +++ b/app/src/main/java/org/sopt/and/presentation/viewmodel/SignInViewModel.kt @@ -5,7 +5,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.launch import org.sopt.and.GlobalApplication import org.sopt.and.base.BaseViewModel -import org.sopt.and.domain.model.user.LoginUserEntity +import org.sopt.and.domain.model.auth.LoginUserEntity import org.sopt.and.domain.usecase.LoginUserUseCase import org.sopt.and.presentation.utils.UiEffect import org.sopt.and.presentation.utils.UiEvent diff --git a/app/src/main/java/org/sopt/and/presentation/viewmodel/SignUpViewModel.kt b/app/src/main/java/org/sopt/and/presentation/viewmodel/SignUpViewModel.kt index b0a0551..295f944 100644 --- a/app/src/main/java/org/sopt/and/presentation/viewmodel/SignUpViewModel.kt +++ b/app/src/main/java/org/sopt/and/presentation/viewmodel/SignUpViewModel.kt @@ -3,9 +3,8 @@ package org.sopt.and.presentation.viewmodel import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.launch -import org.sopt.and.R import org.sopt.and.base.BaseViewModel -import org.sopt.and.domain.model.user.RegisterUserEntity +import org.sopt.and.domain.model.auth.RegisterUserEntity import org.sopt.and.domain.usecase.RegisterUserUseCase import org.sopt.and.presentation.utils.UiEffect import org.sopt.and.presentation.utils.UiEvent