-
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
19 changed files
with
119 additions
and
30 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/myongsik/myongsikandroid/data/model/user/RequestUserData.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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/myongsik/myongsikandroid/data/model/user/ResponseUserData.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
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/myongsik/myongsikandroid/data/repository/love/LoveRepository.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.love | ||
|
||
import com.myongsik.myongsikandroid.domain.model.love.InsertFoodEntity | ||
|
||
interface LoveRepository { | ||
|
||
suspend fun insertFood(insertFoodEntity: InsertFoodEntity) | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/myongsik/myongsikandroid/data/repository/love/LoveRepositoryImpl.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.love | ||
|
||
import com.myongsik.myongsikandroid.data.db.RestaurantDatabase | ||
import com.myongsik.myongsikandroid.data.model.kakao.toInsertFoodData | ||
import com.myongsik.myongsikandroid.domain.model.love.InsertFoodEntity | ||
import javax.inject.Inject | ||
|
||
class LoveRepositoryImpl @Inject constructor( | ||
private val loveDb : RestaurantDatabase | ||
) : LoveRepository { | ||
|
||
override suspend fun insertFood(insertFoodEntity: InsertFoodEntity) { | ||
loveDb.restaurantDao().insertGoodFood(insertFoodEntity.toInsertFoodData()) | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepository.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
7 changes: 2 additions & 5 deletions
7
app/src/main/java/com/myongsik/myongsikandroid/data/repository/user/UserRepositoryImpl.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
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
5 changes: 0 additions & 5 deletions
5
app/src/main/java/com/myongsik/myongsikandroid/domain/UserCase.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/myongsik/myongsikandroid/domain/model/love/InsertFoodEntity.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.love | ||
|
||
data class InsertFoodEntity( | ||
val address_name: String, | ||
val category_group_code: String, | ||
val category_group_name: String, | ||
val category_name: String, | ||
val distance: String, | ||
val id: String, | ||
val phone: String, | ||
val place_name: String, | ||
val place_url: String, | ||
val road_address_name: String, | ||
val x: String, | ||
val y: String | ||
) | ||
|
2 changes: 1 addition & 1 deletion
2
...android/domain/model/RequestUserEntity.kt → ...id/domain/model/user/RequestUserEntity.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
2 changes: 1 addition & 1 deletion
2
...ndroid/domain/model/ResponseUserEntity.kt → ...d/domain/model/user/ResponseUserEntity.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
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/love/InsertFoodDataUseCase.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.love | ||
|
||
import com.myongsik.myongsikandroid.data.repository.love.LoveRepository | ||
import com.myongsik.myongsikandroid.domain.model.love.InsertFoodEntity | ||
import javax.inject.Inject | ||
|
||
class InsertFoodDataUseCase @Inject constructor( | ||
private val loveRepository : LoveRepository | ||
) : LoveCase { | ||
|
||
suspend operator fun invoke(insertFoodEntity: InsertFoodEntity) = | ||
loveRepository.insertFood(insertFoodEntity) | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/love/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.love | ||
|
||
interface LoveCase { | ||
|
||
} |
5 changes: 2 additions & 3 deletions
5
...ndroid/domain/user/PostUserDataUseCase.kt → ...omain/usecase/user/PostUserDataUseCase.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
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/myongsik/myongsikandroid/domain/usecase/user/UserCase.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.user | ||
|
||
interface UserCase { | ||
|
||
} |
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
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
6 changes: 0 additions & 6 deletions
6
app/src/main/java/com/myongsik/myongsikandroid/util/FoodEvaluation.kt
This file was deleted.
Oops, something went wrong.