Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 중첩 UseCase 연결 #40

Merged
merged 5 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package ac.dnd.bookkeeping.android.data.di

import ac.dnd.bookkeeping.android.data.repository.authentication.MockAuthenticationRepository
import ac.dnd.bookkeeping.android.data.repository.file.MockFileRepository
import ac.dnd.bookkeeping.android.data.repository.group.MockGroupRepository
import ac.dnd.bookkeeping.android.data.repository.heart.MockHeartRepository
import ac.dnd.bookkeeping.android.data.repository.feature.group.MockGroupRepository
import ac.dnd.bookkeeping.android.data.repository.feature.heart.MockHeartRepository
import ac.dnd.bookkeeping.android.data.repository.member.MockMemberRepository
import ac.dnd.bookkeeping.android.data.repository.relation.MockRelationRepository
import ac.dnd.bookkeeping.android.data.repository.schedule.MockScheduleRepository
import ac.dnd.bookkeeping.android.data.repository.sociallogin.KakaoLoginRepositoryImpl
import ac.dnd.bookkeeping.android.data.repository.statistics.MockStatisticsRepository
import ac.dnd.bookkeeping.android.data.repository.feature.relation.MockRelationRepository
import ac.dnd.bookkeeping.android.data.repository.feature.schedule.MockScheduleRepository
import ac.dnd.bookkeeping.android.data.repository.authentication.sociallogin.KakaoLoginRepositoryImpl
import ac.dnd.bookkeeping.android.data.repository.feature.statistics.MockStatisticsRepository
import ac.dnd.bookkeeping.android.domain.repository.AuthenticationRepository
import ac.dnd.bookkeeping.android.domain.repository.FileRepository
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HeartApi @Inject constructor(
money: Long,
day: LocalDate,
event: String,
memo: String = "",
memo: String,
tags: List<String>
): Result<Unit> {
return client.patch("$baseUrl/api/v1/hearts/$id") {
Expand Down Expand Up @@ -98,8 +98,8 @@ class HeartApi @Inject constructor(
}

suspend fun getHeartList(
sort: String = "recent",
name: String = ""
sort: String,
name: String
): Result<GetHeartListRes> {
return client.get("$baseUrl/api/v1/hearts/me") {
parameter("sort", sort) // recent, intimacy
Expand All @@ -109,7 +109,7 @@ class HeartApi @Inject constructor(

suspend fun getRelatedHeartList(
id: Long,
sort: String = "recent"
sort: String
): Result<GetRelatedHeartListRes> {
return client.get("$baseUrl/api/v1/hearts/me/$id") {
parameter("sort", sort) // recent, old
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RelationApi @Inject constructor(
groupId: Long,
name: String,
imageUrl: String,
memo: String = ""
memo: String
): Result<AddRelationRes> {
return client.post("$baseUrl/api/v1/relations") {
setBody(
Expand All @@ -49,7 +49,7 @@ class RelationApi @Inject constructor(
groupId: Long,
name: String,
imageUrl: String,
memo: String = ""
memo: String
): Result<Unit> {
return client.patch("$baseUrl/api/v1/relations/$id") {
setBody(
Expand Down Expand Up @@ -78,7 +78,7 @@ class RelationApi @Inject constructor(
}

suspend fun getRelationList(
name: String = ""
name: String
): Result<GetRelationListRes> {
return client.get("$baseUrl/api/v1/relations/me") {
parameter("name", name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ScheduleApi @Inject constructor(
time: LocalTime,
link: String,
location: String,
memo: String = "",
memo: String
): Result<AddScheduleRes> {
return client.post("$baseUrl/api/v1/schedules") {
setBody(
Expand Down Expand Up @@ -69,7 +69,7 @@ class ScheduleApi @Inject constructor(
time: LocalTime,
link: String,
location: String,
memo: String = "",
memo: String
): Result<Unit> {
return client.patch("$baseUrl/api/v1/schedules/$id") {
setBody(
Expand Down Expand Up @@ -97,7 +97,7 @@ class ScheduleApi @Inject constructor(
}

suspend fun getUnrecordedScheduleList(
name: String = ""
name: String
): Result<GetUnrecordedScheduleListRes> {
return client.get("$baseUrl/api/v1/schedules/unrecorded") {
parameter("name", name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.group

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.heart

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.heart.HeartGroup
import ac.dnd.bookkeeping.android.domain.model.feature.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.feature.heart.HeartGroup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.heart

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.heart.RelatedHeart
import ac.dnd.bookkeeping.android.domain.model.feature.heart.RelatedHeart
import kotlinx.datetime.LocalDate
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.relation

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimpleGroup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.relation

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.relation.RelationDetailGroup
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationDetailGroup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.schedule

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.schedule.UnrecordedScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedScheduleRelation
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.LocalTime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.statistics

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.statistics.GroupStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.GroupStatistics
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.statistics

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsEvent
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsGive
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsTake
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsEvent
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsGive
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsTake
import kotlinx.datetime.LocalDate
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.dnd.bookkeeping.android.data.repository.sociallogin
package ac.dnd.bookkeeping.android.data.repository.authentication.sociallogin

import ac.dnd.bookkeeping.android.domain.model.error.ServerException
import ac.dnd.bookkeeping.android.domain.model.sociallogin.KakaoUserInformation
import ac.dnd.bookkeeping.android.domain.model.authentication.sociallogin.KakaoUserInformation
import ac.dnd.bookkeeping.android.domain.repository.KakaoLoginRepository
import android.content.Context
import com.kakao.sdk.common.model.ClientError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ac.dnd.bookkeeping.android.data.repository.group
package ac.dnd.bookkeeping.android.data.repository.feature.group

import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import kotlinx.coroutines.delay
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ac.dnd.bookkeeping.android.data.repository.group
package ac.dnd.bookkeeping.android.data.repository.feature.group

import ac.dnd.bookkeeping.android.data.remote.local.SharedPreferencesManager
import ac.dnd.bookkeeping.android.data.remote.network.api.GroupApi
import ac.dnd.bookkeeping.android.data.remote.network.util.toDomain
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ac.dnd.bookkeeping.android.data.repository.heart
package ac.dnd.bookkeeping.android.data.repository.feature.heart

import ac.dnd.bookkeeping.android.domain.model.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.heart.HeartGroup
import ac.dnd.bookkeeping.android.domain.model.heart.RelatedHeart
import ac.dnd.bookkeeping.android.domain.model.feature.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.feature.heart.HeartGroup
import ac.dnd.bookkeeping.android.domain.model.feature.heart.RelatedHeart
import ac.dnd.bookkeeping.android.domain.repository.HeartRepository
import kotlinx.coroutines.delay
import kotlinx.datetime.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ac.dnd.bookkeeping.android.data.repository.heart
package ac.dnd.bookkeeping.android.data.repository.feature.heart

import ac.dnd.bookkeeping.android.data.remote.local.SharedPreferencesManager
import ac.dnd.bookkeeping.android.data.remote.network.api.HeartApi
import ac.dnd.bookkeeping.android.data.remote.network.util.toDomain
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.heart.RelatedHeart
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.heart.Heart
import ac.dnd.bookkeeping.android.domain.model.feature.heart.RelatedHeart
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import ac.dnd.bookkeeping.android.domain.repository.HeartRepository
import kotlinx.datetime.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ac.dnd.bookkeeping.android.data.repository.relation
package ac.dnd.bookkeeping.android.data.repository.feature.relation

import ac.dnd.bookkeeping.android.domain.model.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.relation.RelationDetailGroup
import ac.dnd.bookkeeping.android.domain.model.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationDetailGroup
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.repository.RelationRepository
import kotlinx.coroutines.delay
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ac.dnd.bookkeeping.android.data.repository.relation
package ac.dnd.bookkeeping.android.data.repository.feature.relation

import ac.dnd.bookkeeping.android.data.remote.local.SharedPreferencesManager
import ac.dnd.bookkeeping.android.data.remote.network.api.RelationApi
import ac.dnd.bookkeeping.android.data.remote.network.util.toDomain
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationDetail
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import ac.dnd.bookkeeping.android.domain.repository.RelationRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.dnd.bookkeeping.android.data.repository.schedule
package ac.dnd.bookkeeping.android.data.repository.feature.schedule

import ac.dnd.bookkeeping.android.domain.model.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.schedule.UnrecordedScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedScheduleRelation
import ac.dnd.bookkeeping.android.domain.repository.ScheduleRepository
import kotlinx.coroutines.delay
import kotlinx.datetime.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ac.dnd.bookkeeping.android.data.repository.schedule
package ac.dnd.bookkeeping.android.data.repository.feature.schedule

import ac.dnd.bookkeeping.android.data.remote.local.SharedPreferencesManager
import ac.dnd.bookkeeping.android.data.remote.network.api.ScheduleApi
import ac.dnd.bookkeeping.android.data.remote.network.util.toDomain
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import ac.dnd.bookkeeping.android.domain.repository.ScheduleRepository
import kotlinx.datetime.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ac.dnd.bookkeeping.android.data.repository.statistics
package ac.dnd.bookkeeping.android.data.repository.feature.statistics

import ac.dnd.bookkeeping.android.domain.model.statistics.GroupStatistics
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsEvent
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsGive
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatisticsTake
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.GroupStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsEvent
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsGive
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatisticsTake
import ac.dnd.bookkeeping.android.domain.repository.StatisticsRepository
import kotlinx.coroutines.delay
import kotlinx.datetime.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ac.dnd.bookkeeping.android.data.repository.statistics
package ac.dnd.bookkeeping.android.data.repository.feature.statistics

import ac.dnd.bookkeeping.android.data.remote.local.SharedPreferencesManager
import ac.dnd.bookkeeping.android.data.remote.network.api.StatisticsApi
import ac.dnd.bookkeeping.android.data.remote.network.util.toDomain
import ac.dnd.bookkeeping.android.domain.model.group.Group
import ac.dnd.bookkeeping.android.domain.model.statistics.GroupStatistics
import ac.dnd.bookkeeping.android.domain.model.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.GroupStatistics
import ac.dnd.bookkeeping.android.domain.model.feature.statistics.MyStatistics
import ac.dnd.bookkeeping.android.domain.repository.GroupRepository
import ac.dnd.bookkeeping.android.domain.repository.StatisticsRepository
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.sociallogin
package ac.dnd.bookkeeping.android.domain.model.authentication.sociallogin

data class KakaoUserInformation(
val socialId: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package ac.dnd.bookkeeping.android.domain.model.feature.group

data class Group(
val id: Long,
val name: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package ac.dnd.bookkeeping.android.domain.model.feature.group

import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple

data class GroupWithRelation(
val id: Long,
val name: String,
val relationList: List<RelationSimple>
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.heart
package ac.dnd.bookkeeping.android.domain.model.feature.heart

data class Heart(
val id: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.heart
package ac.dnd.bookkeeping.android.domain.model.feature.heart

import kotlinx.datetime.LocalDate

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.relation
package ac.dnd.bookkeeping.android.domain.model.feature.relation

data class RelationDetail(
val id: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.relation
package ac.dnd.bookkeeping.android.domain.model.feature.relation

data class RelationSimple(
val id: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.schedule
package ac.dnd.bookkeeping.android.domain.model.feature.schedule

import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ac.dnd.bookkeeping.android.domain.model.statistics
package ac.dnd.bookkeeping.android.domain.model.feature.statistics

data class GroupStatistics(
val marriage: Long,
Expand Down
Loading
Loading