-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
82 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
app/src/main/java/com/myongsik/myongsikandroid/data/repository/love/LoveRepository.kt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
app/src/main/java/com/myongsik/myongsikandroid/data/repository/love/LoveRepositoryImpl.kt
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...main/java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.myongsik.myongsikandroid.data.repository.restaurant | ||
|
||
import com.myongsik.myongsikandroid.domain.model.restaurant.InsertRestaurantEntity | ||
|
||
interface RestaurantRepository { | ||
|
||
suspend fun insertRestaurant(insertRestaurantEntity: InsertRestaurantEntity) | ||
} |
15 changes: 15 additions & 0 deletions
15
.../java/com/myongsik/myongsikandroid/data/repository/restaurant/RestaurantRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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 javax.inject.Inject | ||
|
||
class RestaurantRepositoryImpl @Inject constructor( | ||
private val loveDb : RestaurantDatabase | ||
) : RestaurantRepository { | ||
|
||
override suspend fun insertRestaurant(insertRestaurantEntity: InsertRestaurantEntity) { | ||
loveDb.restaurantDao().insertGoodFood(insertRestaurantEntity.toInsertFoodData()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
app/src/main/java/com/myongsik/myongsikandroid/domain/model/love/InsertFoodEntity.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
.../main/java/com/myongsik/myongsikandroid/domain/model/restaurant/InsertRestaurantEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.myongsik.myongsikandroid.domain.model.restaurant | ||
|
||
data class InsertRestaurantEntity( | ||
val addressName: String, | ||
val categoryGroupCode: String, | ||
val categoryGroupName: String, | ||
val categoryName: String, | ||
val distance: String, | ||
val id: String, | ||
val phone: String, | ||
val placeName: String, | ||
val placeUrl: String, | ||
val roadAddressName: String, | ||
val x: String, | ||
val y: String | ||
) | ||
|
13 changes: 0 additions & 13 deletions
13
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/love/InsertFoodDataUseCase.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/love/LoveCase.kt
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...ava/com/myongsik/myongsikandroid/domain/usecase/restaurant/InsertRestaurantDataUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.myongsik.myongsikandroid.domain.usecase.restaurant | ||
|
||
import com.myongsik.myongsikandroid.data.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) | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/restaurant/LoveCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.myongsik.myongsikandroid.domain.usecase.restaurant | ||
|
||
interface LoveCase { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters