Skip to content

Commit

Permalink
[refact] : #83 repository 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
SsongSik committed May 8, 2023
1 parent 1149de7 commit 6515f31
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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)
}

This file was deleted.

0 comments on commit 6515f31

Please sign in to comment.