-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from KanuKim97/refactor/domain-model
[REFACTOR] Refactoring Domain Module
- Loading branch information
Showing
36 changed files
with
250 additions
and
355 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
...m/example/model/domain/CollectionModel.kt → ...example/data/model/CollectionDataModel.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
15 changes: 10 additions & 5 deletions
15
core/data/src/main/java/com/example/data/repository/DatabaseRepository.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
package com.example.data.repository | ||
|
||
import com.example.model.domain.CollectionModel | ||
import com.example.data.model.CollectionDataModel | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface DatabaseRepository { | ||
fun readAllCollectionEntities(): Flow<List<CollectionModel>> | ||
fun readAllCollectionEntities(): Flow<List<CollectionDataModel>> | ||
|
||
fun readCollectionEntity(placeID: String): Flow<CollectionModel> | ||
fun readCollectionEntity(placeId: String): Flow<CollectionDataModel> | ||
|
||
fun saveUserCollection(content: CollectionModel): Flow<Result<Unit>> | ||
fun saveUserCollection( | ||
placeId: String, | ||
placeName: String, | ||
placeImgUrl: String, | ||
placeLatLng: String | ||
): Flow<Result<Unit>> | ||
|
||
fun deleteUserCollection(content: CollectionModel): Flow<Result<Unit>> | ||
fun deleteUserCollection(content: CollectionDataModel): Flow<Result<Unit>> | ||
} |
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
8 changes: 4 additions & 4 deletions
8
core/data/src/test/java/com/example/data/DataLayerDummyData.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
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
12 changes: 0 additions & 12 deletions
12
core/domain/src/main/java/com/example/domain/database/ReadAllCollectionUseCase.kt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
core/domain/src/main/java/com/example/domain/database/ReadCollectionUseCase.kt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
core/domain/src/main/java/com/example/domain/database/SaveCollectionUseCase.kt
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
core/domain/src/main/java/com/example/domain/model/CollectionDomainModel.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.example.domain.model | ||
|
||
data class CollectionDomainModel( | ||
val id: String, | ||
val name: String, | ||
val latLng: String, | ||
val imgUrl: String = "" | ||
) |
7 changes: 7 additions & 0 deletions
7
core/domain/src/main/java/com/example/domain/model/NearByPlaceItemModel.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,7 @@ | ||
package com.example.domain.model | ||
|
||
data class NearByPlaceItemModel( | ||
val placeId: String, | ||
val placeName: String, | ||
val placePhotoReference: String = "" | ||
) |
4 changes: 2 additions & 2 deletions
4
...com/example/model/domain/DetailedModel.kt → ...mple/domain/model/PlaceDetailItemModel.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
Oops, something went wrong.