diff --git a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepositoryImpl.kt b/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepositoryImpl.kt index 805f8a74..e507d481 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepositoryImpl.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepositoryImpl.kt @@ -3,6 +3,7 @@ package com.myongsik.myongsikandroid.data.repository.restaurant import com.myongsik.myongsikandroid.data.db.RestaurantDatabase import com.myongsik.myongsikandroid.data.model.kakao.toInsertFoodData import com.myongsik.myongsikandroid.domain.model.restaurant.InsertRestaurantEntity +import com.myongsik.myongsikandroid.domain.repository.restaurant.RestaurantRepository import javax.inject.Inject class RestaurantRepositoryImpl @Inject constructor( diff --git a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepositoryImpl.kt b/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepositoryImpl.kt index 068847b4..f916f655 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepositoryImpl.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepositoryImpl.kt @@ -5,6 +5,7 @@ import com.myongsik.myongsikandroid.data.model.user.toRequestUserData import com.myongsik.myongsikandroid.data.model.user.toResponseUserEntity import com.myongsik.myongsikandroid.domain.model.user.RequestUserEntity import com.myongsik.myongsikandroid.domain.model.user.ResponseUserEntity +import com.myongsik.myongsikandroid.domain.repository.user.UserRepository import javax.inject.Inject class UserRepositoryImpl @Inject constructor(private val userApi: UserApi) : UserRepository { diff --git a/app/src/main/java/com/myongsik/myongsikandroid/di/RepositoryModule.kt b/app/src/main/java/com/myongsik/myongsikandroid/di/RepositoryModule.kt index 6e1414f2..6bf7e8fe 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/di/RepositoryModule.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/di/RepositoryModule.kt @@ -2,11 +2,11 @@ package com.myongsik.myongsikandroid.di import com.myongsik.myongsikandroid.data.repository.food.FoodRepository import com.myongsik.myongsikandroid.data.repository.food.FoodRepositoryImpl -import com.myongsik.myongsikandroid.data.repository.restaurant.RestaurantRepository +import com.myongsik.myongsikandroid.domain.repository.restaurant.RestaurantRepository import com.myongsik.myongsikandroid.data.repository.restaurant.RestaurantRepositoryImpl import com.myongsik.myongsikandroid.data.repository.search.SearchFoodRepository import com.myongsik.myongsikandroid.data.repository.search.SearchFoodRepositoryImpl -import com.myongsik.myongsikandroid.data.repository.user.UserRepository +import com.myongsik.myongsikandroid.domain.repository.user.UserRepository import com.myongsik.myongsikandroid.data.repository.user.UserRepositoryImpl import dagger.Binds import dagger.Module diff --git a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepository.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/repository/restaurant/RestaurantRepository.kt similarity index 75% rename from app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepository.kt rename to app/src/main/java/com/myongsik/myongsikandroid/domain/repository/restaurant/RestaurantRepository.kt index bf1acaa7..e67e2ecf 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepository.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/domain/repository/restaurant/RestaurantRepository.kt @@ -1,4 +1,4 @@ -package com.myongsik.myongsikandroid.data.repository.restaurant +package com.myongsik.myongsikandroid.domain.repository.restaurant import com.myongsik.myongsikandroid.domain.model.restaurant.InsertRestaurantEntity diff --git a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepository.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/repository/user/UserRepository.kt similarity index 81% rename from app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepository.kt rename to app/src/main/java/com/myongsik/myongsikandroid/domain/repository/user/UserRepository.kt index 850546a4..40eda3fb 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepository.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/domain/repository/user/UserRepository.kt @@ -1,4 +1,4 @@ -package com.myongsik.myongsikandroid.data.repository.user +package com.myongsik.myongsikandroid.domain.repository.user import com.myongsik.myongsikandroid.domain.model.user.RequestUserEntity import com.myongsik.myongsikandroid.domain.model.user.ResponseUserEntity diff --git a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/InsertRestaurantDataUseCase.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/InsertRestaurantDataUseCase.kt index 3eb4093c..c97cedfb 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/InsertRestaurantDataUseCase.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/InsertRestaurantDataUseCase.kt @@ -1,12 +1,12 @@ package com.myongsik.myongsikandroid.domain.usecase.restaurant -import com.myongsik.myongsikandroid.data.repository.restaurant.RestaurantRepository +import com.myongsik.myongsikandroid.domain.repository.restaurant.RestaurantRepository import com.myongsik.myongsikandroid.domain.model.restaurant.InsertRestaurantEntity import javax.inject.Inject class InsertRestaurantDataUseCase @Inject constructor( private val restaurantRepository : RestaurantRepository -) : LoveCase { +) { suspend operator fun invoke(insertRestaurantEntity: InsertRestaurantEntity) = restaurantRepository.insertRestaurant(insertRestaurantEntity) diff --git a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/LoveCase.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/LoveCase.kt deleted file mode 100644 index c8d3211a..00000000 --- a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/LoveCase.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.myongsik.myongsikandroid.domain.usecase.restaurant - -interface LoveCase { - -} \ No newline at end of file diff --git a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/PostUserDataUseCase.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/PostUserDataUseCase.kt index 5c76022d..ecde165f 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/PostUserDataUseCase.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/PostUserDataUseCase.kt @@ -1,9 +1,9 @@ package com.myongsik.myongsikandroid.domain.usecase.user -import com.myongsik.myongsikandroid.data.repository.user.UserRepository +import com.myongsik.myongsikandroid.domain.repository.user.UserRepository import com.myongsik.myongsikandroid.domain.model.user.RequestUserEntity import javax.inject.Inject -class PostUserDataUseCase @Inject constructor(private val userRepository: UserRepository) : UserCase { +class PostUserDataUseCase @Inject constructor(private val userRepository: UserRepository) { suspend operator fun invoke(requestUserEntity: RequestUserEntity) = userRepository.postUser(requestUserEntity) } \ No newline at end of file diff --git a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/UserCase.kt b/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/UserCase.kt deleted file mode 100644 index fc1ad3d4..00000000 --- a/app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/UserCase.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.myongsik.myongsikandroid.domain.usecase.user - -interface UserCase { - -} \ No newline at end of file