From c839865bbe42c58c452c2ea597b0ef0b13c33e5e Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 21 Apr 2024 18:46:53 +0900 Subject: [PATCH 001/219] moneymong-307 feature: MDSButtonSize(Large) vertical padding 16 -> 18 --- .../moneymong/design_system/component/button/ButtonSize.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/button/ButtonSize.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/button/ButtonSize.kt index 2c8b0eae..c7826a84 100644 --- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/button/ButtonSize.kt +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/button/ButtonSize.kt @@ -5,7 +5,7 @@ import androidx.compose.ui.unit.dp enum class MDSButtonSize(val verticalPadding: Dp) { - LARGE(verticalPadding = 16.dp), + LARGE(verticalPadding = 18.dp), MEDIUM(verticalPadding = 12.dp), SMALL(verticalPadding = 10.dp) } \ No newline at end of file From e221218df7a6d2c36f6157ec00add10a45c0e263 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 21 Apr 2024 19:39:15 +0900 Subject: [PATCH 002/219] =?UTF-8?q?moneymong-308=20refactor:=20MDSTextFiel?= =?UTF-8?q?d=20Title=20=ED=95=84=EC=88=98=20=ED=91=9C=EC=8B=9C=20=EB=B3=84?= =?UTF-8?q?=EB=8F=84=20=ED=95=A8=EC=88=98=EB=A1=9C=20=EC=B6=94=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/textfield/TextField.kt | 12 ++----- .../textfield/util/TextFiledDecorators.kt | 16 +++++++++ .../ledgerdetail/LedgerDetailScreen.kt | 33 +++---------------- .../ledgermanual/LedgerManualScreen.kt | 32 ++++-------------- 4 files changed, 29 insertions(+), 64 deletions(-) create mode 100755 core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/TextField.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/TextField.kt index 8e1f0816..c0d35c7d 100644 --- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/TextField.kt +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/TextField.kt @@ -13,14 +13,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.focus.onFocusChanged import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.text.AnnotatedString -import androidx.compose.ui.text.SpanStyle -import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation -import androidx.compose.ui.text.withStyle import androidx.compose.ui.tooling.preview.Preview import com.moneymong.moneymong.design_system.component.textfield.util.MDSTextFieldIcons -import com.moneymong.moneymong.design_system.theme.Red03 +import com.moneymong.moneymong.design_system.component.textfield.util.withRequiredMark @Composable @@ -123,12 +120,7 @@ fun MDSTextFieldPreview() { .onFocusChanged { isFilled = !it.isFocused }, value = userInput, onValueChange = { userInput = it }, - title = buildAnnotatedString { - append("title") - withStyle(style = SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("title"), placeholder = "placeholder", isFilled = isFilled, isError = isError, diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt new file mode 100755 index 00000000..bdc8f44e --- /dev/null +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt @@ -0,0 +1,16 @@ +package com.moneymong.moneymong.design_system.component.textfield.util + +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.withStyle +import com.moneymong.moneymong.design_system.theme.Red03 + + +fun withRequiredMark(title: String) = buildAnnotatedString { + val markColor = Red03 + + append(text = title) + withStyle(style = SpanStyle(color = markColor)) { + append(text = "*") + } +} \ No newline at end of file diff --git a/feature/ledgerdetail/src/main/java/com/moneymong/moneymong/ledgerdetail/LedgerDetailScreen.kt b/feature/ledgerdetail/src/main/java/com/moneymong/moneymong/ledgerdetail/LedgerDetailScreen.kt index ef8f3205..e175468d 100644 --- a/feature/ledgerdetail/src/main/java/com/moneymong/moneymong/ledgerdetail/LedgerDetailScreen.kt +++ b/feature/ledgerdetail/src/main/java/com/moneymong/moneymong/ledgerdetail/LedgerDetailScreen.kt @@ -35,11 +35,8 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.res.painterResource -import androidx.compose.ui.text.SpanStyle -import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.TextFieldValue -import androidx.compose.ui.text.withStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -56,6 +53,7 @@ import com.moneymong.moneymong.design_system.component.button.MDSButtonType import com.moneymong.moneymong.design_system.component.modal.MDSModal import com.moneymong.moneymong.design_system.component.textfield.MDSTextField import com.moneymong.moneymong.design_system.component.textfield.util.MDSTextFieldIcons +import com.moneymong.moneymong.design_system.component.textfield.util.withRequiredMark import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.DateVisualTransformation import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.PriceVisualTransformation import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.TimeVisualTransformation @@ -71,7 +69,6 @@ import com.moneymong.moneymong.design_system.theme.Gray03 import com.moneymong.moneymong.design_system.theme.Gray06 import com.moneymong.moneymong.design_system.theme.Gray10 import com.moneymong.moneymong.design_system.theme.MMHorizontalSpacing -import com.moneymong.moneymong.design_system.theme.Red03 import com.moneymong.moneymong.design_system.theme.White import com.moneymong.moneymong.ledgerdetail.view.LedgerDetailTopbarView import org.orbitmvi.orbit.compose.collectAsState @@ -207,12 +204,7 @@ fun LedgerDetailScreen( modifier = Modifier.fillMaxWidth(), value = state.storeNameValue, onValueChange = viewModel::onChangeStoreNameValue, - title = buildAnnotatedString { - append("수입·지출 출처") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("수입·지출 출처"), placeholder = "", isFilled = false, isError = state.isStoreNameError, @@ -248,12 +240,7 @@ fun LedgerDetailScreen( modifier = Modifier.fillMaxWidth(), value = state.totalPriceValue, onValueChange = viewModel::onChangeTotalPriceValue, - title = buildAnnotatedString { - append("${state.fundTypeText} 금액") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("${state.fundTypeText} 금액"), placeholder = "", isFilled = false, isError = state.isTotalPriceError, @@ -290,12 +277,7 @@ fun LedgerDetailScreen( modifier = Modifier.fillMaxWidth(), value = state.paymentDateValue, onValueChange = viewModel::onChangePaymentDateValue, - title = buildAnnotatedString { - append("날짜") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("날짜"), placeholder = "2024/01/01", isFilled = false, isError = state.isPaymentDateError, @@ -332,12 +314,7 @@ fun LedgerDetailScreen( modifier = Modifier.fillMaxWidth(), value = state.paymentTimeValue, onValueChange = viewModel::onChangePaymentTimeValue, - title = buildAnnotatedString { - append("시간") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("시간"), placeholder = "00:00:00", isFilled = false, isError = state.isPaymentTimeError, diff --git a/feature/ledgermanual/src/main/java/com/moneymong/moneymong/ledgermanual/LedgerManualScreen.kt b/feature/ledgermanual/src/main/java/com/moneymong/moneymong/ledgermanual/LedgerManualScreen.kt index fe9d53c5..411531e3 100644 --- a/feature/ledgermanual/src/main/java/com/moneymong/moneymong/ledgermanual/LedgerManualScreen.kt +++ b/feature/ledgermanual/src/main/java/com/moneymong/moneymong/ledgermanual/LedgerManualScreen.kt @@ -57,7 +57,7 @@ import com.bumptech.glide.integration.compose.GlideImage import com.moneymong.moneymong.common.ext.base64ToFile import com.moneymong.moneymong.common.ext.encodingBase64 import com.moneymong.moneymong.common.ui.noRippleClickable -import com.moneymong.moneymong.design_system.R.* +import com.moneymong.moneymong.design_system.R.drawable import com.moneymong.moneymong.design_system.component.button.MDSButton import com.moneymong.moneymong.design_system.component.button.MDSButtonSize import com.moneymong.moneymong.design_system.component.button.MDSButtonType @@ -65,6 +65,7 @@ import com.moneymong.moneymong.design_system.component.modal.MDSModal import com.moneymong.moneymong.design_system.component.selection.MDSSelection import com.moneymong.moneymong.design_system.component.textfield.MDSTextField import com.moneymong.moneymong.design_system.component.textfield.util.MDSTextFieldIcons +import com.moneymong.moneymong.design_system.component.textfield.util.withRequiredMark import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.DateVisualTransformation import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.PriceVisualTransformation import com.moneymong.moneymong.design_system.component.textfield.visualtransformation.TimeVisualTransformation @@ -75,7 +76,6 @@ import com.moneymong.moneymong.design_system.theme.Body3 import com.moneymong.moneymong.design_system.theme.Gray06 import com.moneymong.moneymong.design_system.theme.Gray10 import com.moneymong.moneymong.design_system.theme.MMHorizontalSpacing -import com.moneymong.moneymong.design_system.theme.Red03 import com.moneymong.moneymong.design_system.theme.White import com.moneymong.moneymong.domain.param.ledger.FundType import com.moneymong.moneymong.ledgermanual.view.LedgerManualTopbarView @@ -190,12 +190,7 @@ fun LedgerManualScreen( .onFocusChanged { isStoreNameFilled = !it.isFocused }, value = state.storeNameValue, onValueChange = viewModel::onChangeStoreNameValue, - title = buildAnnotatedString { - append("수입·지출 출처") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("수입·지출 출처"), placeholder = "점포명을 입력해주세요", helperText = "20자 이하로 입력해주세요", maxCount = 20, @@ -214,12 +209,7 @@ fun LedgerManualScreen( .onFocusChanged { isTotalPriceFilled = !it.isFocused }, value = state.totalPriceValue, onValueChange = viewModel::onChangeTotalPriceValue, - title = buildAnnotatedString { - append("금액") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("금액"), placeholder = "거래 금액을 입력해주세요", helperText = "999,999,999,999원 이하로 입력해주세요", isFilled = isTotalPriceFilled, @@ -268,12 +258,7 @@ fun LedgerManualScreen( .onFocusChanged { isPaymentDateFilled = !it.isFocused }, value = state.paymentDateValue, onValueChange = viewModel::onChangePaymentDateValue, - title = buildAnnotatedString { - append("날짜") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("날짜"), placeholder = "YYYY/MM/DD", helperText = "올바른 날짜를 입력해주세요", isFilled = isPaymentDateFilled, @@ -293,12 +278,7 @@ fun LedgerManualScreen( .onFocusChanged { isPaymentTimeFilled = !it.isFocused }, value = state.paymentTimeValue, onValueChange = viewModel::onChangePaymentTimeValue, - title = buildAnnotatedString { - append("시간") - withStyle(SpanStyle(color = Red03)) { - append("*") - } - }, + title = withRequiredMark("시간"), placeholder = "00:00:00 (24시 단위)", helperText = "올바른 시간을 입력해주세요", isFilled = isPaymentTimeFilled, From c7bab2c64515e774274d11ac402b5a8c411cc7a1 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 21 Apr 2024 21:41:04 +0900 Subject: [PATCH 003/219] =?UTF-8?q?moneymong-308=20feature:=20MDSTextField?= =?UTF-8?q?=20Title=20=ED=95=84=EC=88=98=20=ED=91=9C=EC=8B=9C=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=97=90=20margin=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/textfield/util/TextFiledDecorators.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt index bdc8f44e..ffa52cf3 100755 --- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt @@ -1,15 +1,25 @@ package com.moneymong.moneymong.design_system.component.textfield.util +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.withStyle +import androidx.compose.ui.unit.dp import com.moneymong.moneymong.design_system.theme.Red03 +@Composable fun withRequiredMark(title: String) = buildAnnotatedString { + val density = LocalDensity.current + val spacingInSp = with(density) { 2.dp.toSp() } + val markColor = Red03 append(text = title) + withStyle(style = SpanStyle(fontSize = spacingInSp)) { + append("\u2003") + } withStyle(style = SpanStyle(color = markColor)) { append(text = "*") } From c1c61125c7d55051157a24dec587e6681fd980c2 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 5 May 2024 16:42:51 +0900 Subject: [PATCH 004/219] =?UTF-8?q?moneymong-308=20fix:=20TextFieldDecorat?= =?UTF-8?q?ors.kt=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...edDecorators.kt => TextFieldDecorators.kt} | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) rename core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/{TextFiledDecorators.kt => TextFieldDecorators.kt} (93%) diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFieldDecorators.kt similarity index 93% rename from core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt rename to core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFieldDecorators.kt index ffa52cf3..bf9c6f2e 100755 --- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFiledDecorators.kt +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/textfield/util/TextFieldDecorators.kt @@ -1,26 +1,26 @@ -package com.moneymong.moneymong.design_system.component.textfield.util - -import androidx.compose.runtime.Composable -import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.text.SpanStyle -import androidx.compose.ui.text.buildAnnotatedString -import androidx.compose.ui.text.withStyle -import androidx.compose.ui.unit.dp -import com.moneymong.moneymong.design_system.theme.Red03 - - -@Composable -fun withRequiredMark(title: String) = buildAnnotatedString { - val density = LocalDensity.current - val spacingInSp = with(density) { 2.dp.toSp() } - - val markColor = Red03 - - append(text = title) - withStyle(style = SpanStyle(fontSize = spacingInSp)) { - append("\u2003") - } - withStyle(style = SpanStyle(color = markColor)) { - append(text = "*") - } +package com.moneymong.moneymong.design_system.component.textfield.util + +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.withStyle +import androidx.compose.ui.unit.dp +import com.moneymong.moneymong.design_system.theme.Red03 + + +@Composable +fun withRequiredMark(title: String) = buildAnnotatedString { + val density = LocalDensity.current + val spacingInSp = with(density) { 2.dp.toSp() } + + val markColor = Red03 + + append(text = title) + withStyle(style = SpanStyle(fontSize = spacingInSp)) { + append(text = "\u2003") + } + withStyle(style = SpanStyle(color = markColor)) { + append(text = "*") + } } \ No newline at end of file From 28987ba918e57a0ba9a3dda741d400bdf6c9cadc Mon Sep 17 00:00:00 2001 From: Heonbyeong Date: Fri, 17 May 2024 13:45:24 +0900 Subject: [PATCH 005/219] =?UTF-8?q?moneymong-372=20feat:=20core:model=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 1 + core/model/.gitignore | 1 + core/model/build.gradle.kts | 10 ++++++++++ settings.gradle.kts | 1 + 4 files changed, 13 insertions(+) create mode 100644 core/model/.gitignore create mode 100644 core/model/build.gradle.kts diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 294a9f1b..81db6ba1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -64,6 +64,7 @@ dependencies { implementation(projects.core.ui) implementation(projects.core.designSystem) implementation(projects.core.common) + implementation(projects.core.model) implementation(projects.core.network) implementation(projects.data) diff --git a/core/model/.gitignore b/core/model/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/core/model/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts new file mode 100644 index 00000000..5ca32e41 --- /dev/null +++ b/core/model/build.gradle.kts @@ -0,0 +1,10 @@ +@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed +plugins { + id("java-library") + alias(libs.plugins.kotlin.jvm) +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_7 + targetCompatibility = JavaVersion.VERSION_1_7 +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index f1ae5d5d..1295ff85 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -25,6 +25,7 @@ include(":domain") include(":core:design-system") include(":core:ui") include(":core:common") +include(":core:model") include(":core:network") include(":feature:sign") include(":feature:ledger") From f3db29d30f40e2f8e724497b767886f8edfe084f Mon Sep 17 00:00:00 2001 From: Heonbyeong Date: Fri, 17 May 2024 14:34:10 +0900 Subject: [PATCH 006/219] =?UTF-8?q?moneymong-372=20feat:=20agency=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20model=20dependency=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/model/build.gradle.kts | 5 ++--- .../moneymong/model/agency/AgenciesGetResponse.kt | 15 +++++++++++++++ .../moneymong/model/agency/AgencyJoinRequest.kt | 5 +++++ .../moneymong/model/agency/AgencyJoinResponse.kt | 5 +++++ .../model/agency/AgencyRegisterRequest.kt | 9 +++++++++ .../moneymong/model/agency/MyAgencyResponse.kt | 8 ++++++++ .../model/agency/RegisterAgencyResponse.kt | 5 +++++ core/network/build.gradle.kts | 1 + feature/agency/build.gradle.kts | 1 + feature/ledger/build.gradle.kts | 1 + 10 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/AgenciesGetResponse.kt create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinRequest.kt create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinResponse.kt create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyRegisterRequest.kt create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/MyAgencyResponse.kt create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/RegisterAgencyResponse.kt diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts index 5ca32e41..7f024f97 100644 --- a/core/model/build.gradle.kts +++ b/core/model/build.gradle.kts @@ -4,7 +4,6 @@ plugins { alias(libs.plugins.kotlin.jvm) } -java { - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 +dependencies { + implementation(libs.retrofit.gson.converter) } \ No newline at end of file diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgenciesGetResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgenciesGetResponse.kt new file mode 100644 index 00000000..cc23a127 --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgenciesGetResponse.kt @@ -0,0 +1,15 @@ +package com.moneymong.moneymong.model.agency + +import com.google.gson.annotations.SerializedName + +data class AgenciesGetResponse( + @SerializedName("agencyList") + val agencies: List +) + +data class AgencyGetResponse( + val id: Long, + val name: String, + val headCount: Int, + val type: String +) \ No newline at end of file diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinRequest.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinRequest.kt new file mode 100644 index 00000000..6bc28323 --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinRequest.kt @@ -0,0 +1,5 @@ +package com.moneymong.moneymong.model.agency + +data class AgencyJoinRequest( + val invitationCode: String +) \ No newline at end of file diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinResponse.kt new file mode 100644 index 00000000..c2781912 --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyJoinResponse.kt @@ -0,0 +1,5 @@ +package com.moneymong.moneymong.model.agency + +data class AgencyJoinResponse( + val certified: Boolean +) \ No newline at end of file diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyRegisterRequest.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyRegisterRequest.kt new file mode 100644 index 00000000..bea5118f --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyRegisterRequest.kt @@ -0,0 +1,9 @@ +package com.moneymong.moneymong.model.agency + +import com.google.gson.annotations.SerializedName + +data class AgencyRegisterRequest( + val name: String, + @SerializedName("agencyType") + val type: String +) \ No newline at end of file diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/MyAgencyResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/MyAgencyResponse.kt new file mode 100644 index 00000000..ae12949f --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/MyAgencyResponse.kt @@ -0,0 +1,8 @@ +package com.moneymong.moneymong.model.agency + +data class MyAgencyResponse( + val id: Int, + val name: String, + val headCount: Int, + val type: String +) diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/agency/RegisterAgencyResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/agency/RegisterAgencyResponse.kt new file mode 100644 index 00000000..d68fec16 --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/agency/RegisterAgencyResponse.kt @@ -0,0 +1,5 @@ +package com.moneymong.moneymong.model.agency + +data class RegisterAgencyResponse( + val id: Int +) diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index a1f7595b..037f5fcc 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -36,6 +36,7 @@ android { dependencies { implementation(projects.core.common) + implementation(projects.core.model) implementation(projects.domain) implementation(libs.androidx.core.ktx) implementation(libs.appcompat) diff --git a/feature/agency/build.gradle.kts b/feature/agency/build.gradle.kts index 5ece3194..d87843e8 100644 --- a/feature/agency/build.gradle.kts +++ b/feature/agency/build.gradle.kts @@ -11,6 +11,7 @@ android { dependencies { implementation(projects.core.common) + implementation(projects.core.model) implementation(projects.domain) implementation(libs.androidx.core.ktx) diff --git a/feature/ledger/build.gradle.kts b/feature/ledger/build.gradle.kts index 71203458..45ad592a 100644 --- a/feature/ledger/build.gradle.kts +++ b/feature/ledger/build.gradle.kts @@ -11,6 +11,7 @@ android { dependencies { implementation(projects.core.common) + implementation(projects.core.model) implementation(projects.domain) implementation(projects.feature.member) From 732f82e6493f9003587f814fc9ca4d36ffc24e36 Mon Sep 17 00:00:00 2001 From: Heonbyeong Date: Fri, 17 May 2024 15:11:09 +0900 Subject: [PATCH 007/219] =?UTF-8?q?moneymong-372=20feat:=20agency=20model?= =?UTF-8?q?=20=EC=9D=B4=EA=B4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 1 + .../model/agency/AgencyRegisterType.kt | 11 ++++++ .../moneymong/network/api/AgencyApi.kt | 12 +++--- .../moneymong/network/api/MoneyMongApi.kt | 4 -- .../request/agency/AgencyJoinRequest.kt | 5 --- .../request/agency/AgencyRegisterRequest.kt | 9 ----- .../response/agency/AgenciesGetResponse.kt | 15 ------- .../response/agency/AgencyJoinResponse.kt | 5 --- .../response/agency/MyAgencyResponse.kt | 8 ---- .../response/agency/RegisterAgencyResponse.kt | 5 --- data/build.gradle.kts | 1 + .../agency/AgencyRemoteDataSource.kt | 12 +++--- .../agency/AgencyRemoteDataSourceImpl.kt | 12 +++--- .../agency/AgencyRemoteDataSourceMock.kt | 14 +++---- .../data/mapper/agency/AgenciesGetMapper.kt | 25 ------------ .../data/mapper/agency/AgencyJoinMapper.kt | 14 ------- .../mapper/agency/AgencyRegisterMapper.kt | 23 ----------- .../data/pagingsource/AgencyPagingSource.kt | 2 +- .../repository/agency/AgencyRepositoryImpl.kt | 39 +++++++------------ domain/build.gradle.kts | 2 + .../domain/repository/AgencyRepository.kt | 20 +++++----- .../usecase/agency/AgencyJoinUseCase.kt | 7 ++-- .../agency/FetchMyAgencyListUseCase.kt | 6 +-- .../usecase/agency/GetAgenciesUseCase.kt | 4 +- .../usecase/agency/RegisterAgencyUseCase.kt | 10 ++--- .../agency/join/AgencyJoinViewModel.kt | 5 +-- .../register/AgencyRegisterViewModel.kt | 6 +-- .../moneymong/feature/agency/search/Agency.kt | 17 ++++++-- .../agency/search/AgencySearchViewModel.kt | 2 +- .../moneymong/moneymong/ledger/LedgerState.kt | 5 ++- .../view/LedgerAgencySelectBottomSheet.kt | 17 ++------ .../view/item/LedgerAgencySelectItem.kt | 12 +++--- 32 files changed, 111 insertions(+), 219 deletions(-) create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/agency/AgencyRegisterType.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/request/agency/AgencyJoinRequest.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/request/agency/AgencyRegisterRequest.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/response/agency/AgenciesGetResponse.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/response/agency/AgencyJoinResponse.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/response/agency/MyAgencyResponse.kt delete mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/response/agency/RegisterAgencyResponse.kt delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/mapper/agency/AgenciesGetMapper.kt delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/mapper/agency/AgencyJoinMapper.kt delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/mapper/agency/AgencyRegisterMapper.kt diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 99da87be..f55eebcb 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -27,6 +27,7 @@