From 372d87861a1cee6e0bcc7beeccfafb59e3ab2418 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 4 Feb 2024 01:21:14 +0900 Subject: [PATCH 01/16] =?UTF-8?q?[build]=20domain=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/domain/build.gradle.kts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 core/domain/build.gradle.kts diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts new file mode 100644 index 00000000..df94074b --- /dev/null +++ b/core/domain/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + `java-library` + alias(libs.plugins.funch.jvm.library) + alias(libs.plugins.ktlint) +} + +tasks.withType { + useJUnitPlatform() +} + +dependencies { + implementation(libs.javax.inject) + // test + testImplementation(kotlin("test")) + testImplementation(libs.bundles.junit5) + testImplementation(libs.truth) + testImplementation(libs.kotlin.coroutines.test) +} From f707e694b677f14c2d5af7dd5ff481460ce9c4a4 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 4 Feb 2024 01:21:47 +0900 Subject: [PATCH 02/16] =?UTF-8?q?[feat]=20match,=20profile=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20domain=20entity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/moya/funch/entity/Blood.kt | 11 ++++++++ .../java/com/moya/funch/entity/Chemistry.kt | 6 +++++ .../main/java/com/moya/funch/entity/Club.kt | 12 +++++++++ .../main/java/com/moya/funch/entity/Job.kt | 11 ++++++++ .../main/java/com/moya/funch/entity/Mbti.kt | 15 +++++++++++ .../com/moya/funch/entity/SubwayStation.kt | 25 +++++++++++++++++++ .../com/moya/funch/entity/match/Chemistry.kt | 6 +++++ .../moya/funch/entity/match/MatchingResult.kt | 18 +++++++++++++ .../com/moya/funch/entity/match/Recommend.kt | 5 ++++ .../com/moya/funch/entity/profile/Profile.kt | 17 +++++++++++++ 10 files changed, 126 insertions(+) create mode 100644 core/domain/src/main/java/com/moya/funch/entity/Blood.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/Club.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/Job.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/Mbti.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/match/Recommend.kt create mode 100644 core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt diff --git a/core/domain/src/main/java/com/moya/funch/entity/Blood.kt b/core/domain/src/main/java/com/moya/funch/entity/Blood.kt new file mode 100644 index 00000000..e8451002 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/Blood.kt @@ -0,0 +1,11 @@ +package com.moya.funch.entity + +enum class Blood { + A, B, AB, O, IDLE; + + companion object { + fun find(name: String): Blood { + return requireNotNull(entries.find { it.name == name }) { "Blood : $name not found" } + } + } +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt b/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt new file mode 100644 index 00000000..725a87ac --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt @@ -0,0 +1,6 @@ +package com.moya.funch.entity + +data class Chemistry( + val title: String = "", + val description: String = "", +) diff --git a/core/domain/src/main/java/com/moya/funch/entity/Club.kt b/core/domain/src/main/java/com/moya/funch/entity/Club.kt new file mode 100644 index 00000000..e192d724 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/Club.kt @@ -0,0 +1,12 @@ +package com.moya.funch.entity + +enum class Club(val label: String) { + NEXTERS("넥스터즈"), SOPT("SOPT"), + DEPROMEET("Depromeet"), IDLE(""); + + companion object { + fun find(clubName: String): Club { + return requireNotNull(entries.find { it.label == clubName }) { "Club : $clubName not found" } + } + } +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/Job.kt b/core/domain/src/main/java/com/moya/funch/entity/Job.kt new file mode 100644 index 00000000..55531cf0 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/Job.kt @@ -0,0 +1,11 @@ +package com.moya.funch.entity + +enum class Job(val krName: String) { + DEVELOPER("개발자"), DESIGNER("디자이너"), IDLE(""); + + companion object { + fun find(krName: String): Job { + return requireNotNull(entries.find { it.krName == krName }) { "Job : $krName not found" } + } + } +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt b/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt new file mode 100644 index 00000000..6828fc57 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt @@ -0,0 +1,15 @@ +package com.moya.funch.entity + +enum class Mbti { + ENFJ, ENFP, ENTJ, ENTP, + ESFJ, ESFP, ESTJ, ESTP, + INFJ, INFP, INTJ, INTP, + ISFJ, ISFP, ISTJ, ISTP, + IDLE; + + companion object { + fun find(mbti: String): Mbti { + return requireNotNull(entries.find { it.name == mbti }) { "Mbti : $mbti not found" } + } + } +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt b/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt new file mode 100644 index 00000000..e5385bc2 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt @@ -0,0 +1,25 @@ +package com.moya.funch.entity + +data class SubwayStation( + val name: String = "", + val lines: List = emptyList(), +) + +enum class SubwayLine { + ONE, + TWO, + THREE, + FOUR, + FIVE, + SIX, + SEVEN, + EIGHT, + NINE, + AIRPORT, + BUNDANG, + EVERLINE, + GYEONGCHUN, + GYEONGUI, + SINBUNDANG, + SUIN, +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt new file mode 100644 index 00000000..4be4ff0a --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt @@ -0,0 +1,6 @@ +package com.moya.funch.entity.match + +data class Chemistry( + val title: String, + val description: String, +) diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt b/core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt new file mode 100644 index 00000000..28f97f8d --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt @@ -0,0 +1,18 @@ +package com.moya.funch.entity.match + +import com.moya.funch.entity.profile.Profile +import com.moya.funch.entity.SubwayStation + +data class MatchingResult( + val profile: Profile = Profile(), + val similarity: Int = 0, + val chemistrys: List = emptyList(), + val recommends: List = emptyList(), + val subways: List = emptyList(), +){ + init { + require(similarity in 0 .. 100){ + "similarity must be in 0..100" + } + } +} diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/Recommend.kt b/core/domain/src/main/java/com/moya/funch/entity/match/Recommend.kt new file mode 100644 index 00000000..7b7d78a8 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/match/Recommend.kt @@ -0,0 +1,5 @@ +package com.moya.funch.entity.match + +data class Recommend( + val title: String, +) diff --git a/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt b/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt new file mode 100644 index 00000000..55e6d819 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt @@ -0,0 +1,17 @@ +package com.moya.funch.entity.profile + +import com.moya.funch.entity.Blood +import com.moya.funch.entity.Club +import com.moya.funch.entity.Job +import com.moya.funch.entity.Mbti + +data class Profile( + val id: String = "", + val code: String = "", + val name: String = "", + val job: Job = Job.IDLE, + val clubs: List = emptyList(), + val mbti: Mbti = Mbti.IDLE, + val blood: Blood = Blood.IDLE, + val subwayNames: List = emptyList(), +) From 3e915e4024be14359d054ed07274ea915cf0b831 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 4 Feb 2024 01:22:05 +0900 Subject: [PATCH 03/16] [feat] MatchingRepository --- .../com/moya/funch/repository/MatchingRepository.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt diff --git a/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt b/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt new file mode 100644 index 00000000..e698f87c --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt @@ -0,0 +1,11 @@ +package com.moya.funch.repository + +import com.moya.funch.entity.match.MatchingResult + +fun interface MatchingRepository { + + suspend fun matchProfile( + userId: String, + targetCode: String, + ): MatchingResult +} From 32dbf9323d674fcf7c475bd4aa4e461243ba2e66 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 4 Feb 2024 01:22:16 +0900 Subject: [PATCH 04/16] [feat] MatchProfileUseCase --- .../moya/funch/usecase/MatchProfileUseCase.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt diff --git a/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt new file mode 100644 index 00000000..c97b7e33 --- /dev/null +++ b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt @@ -0,0 +1,21 @@ +package com.moya.funch.usecase + +import com.moya.funch.entity.match.MatchingResult +import com.moya.funch.repository.MatchingRepository +import javax.inject.Inject + +class DefaultMatchProfileUseCase @Inject constructor( + private val matchingRepository: MatchingRepository, +) : MatchProfileUseCase { + override suspend operator fun invoke( + userId: String, + targetCode: String, + ): MatchingResult = matchingRepository.matchProfile(userId, targetCode) +} + +fun interface MatchProfileUseCase { + suspend operator fun invoke( + userId: String, + targetCode: String, + ): MatchingResult +} From 223b3c70ade3e7e596dc6ac8ae1c133d1f2b8b42 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:42:46 +0900 Subject: [PATCH 05/16] =?UTF-8?q?[build]=20project=20build.gradle=EC=97=90?= =?UTF-8?q?=20domain=20=EC=9D=98=EC=A1=B4=EC=84=B1=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index a3eb709a..528d1d44 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,7 +24,7 @@ include(":core:designsystem") include(":core:testing") include(":core:network") include(":core:datastore") - +include(":core:domain") // feature include(":feature:profile") include(":feature:home") From 6788b914831e241fef7be721283d0a6c73b8ecf4 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:43:12 +0900 Subject: [PATCH 06/16] [feat/test] Job enum --- .../src/main/java/com/moya/funch/entity/Job.kt | 7 +++++-- .../src/test/java/com/moya/funch/entity/JobTest.kt | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 core/domain/src/test/java/com/moya/funch/entity/JobTest.kt diff --git a/core/domain/src/main/java/com/moya/funch/entity/Job.kt b/core/domain/src/main/java/com/moya/funch/entity/Job.kt index 55531cf0..7232533a 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/Job.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/Job.kt @@ -1,10 +1,13 @@ package com.moya.funch.entity enum class Job(val krName: String) { - DEVELOPER("개발자"), DESIGNER("디자이너"), IDLE(""); + DEVELOPER("개발자"), + DESIGNER("디자이너"), + IDLE("idle"), + ; companion object { - fun find(krName: String): Job { + fun of(krName: String): Job { return requireNotNull(entries.find { it.krName == krName }) { "Job : $krName not found" } } } diff --git a/core/domain/src/test/java/com/moya/funch/entity/JobTest.kt b/core/domain/src/test/java/com/moya/funch/entity/JobTest.kt new file mode 100644 index 00000000..5ba20247 --- /dev/null +++ b/core/domain/src/test/java/com/moya/funch/entity/JobTest.kt @@ -0,0 +1,13 @@ +package com.moya.funch.entity + +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +internal class JobTest { + @Test + fun `직군에 해당하지 않는 한글 이름으로 찾을 수 없다`() { + assertThrows("Job : 디발자 not found") { + Job.of("디발자") + } + } +} From 1dcea2a6b556e403276eeec4a37de096616b1f9e Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:43:19 +0900 Subject: [PATCH 07/16] [feat/test] Club enum --- .../src/main/java/com/moya/funch/entity/Club.kt | 9 ++++++--- .../src/test/java/com/moya/funch/entity/ClubTest.kt | 13 +++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 core/domain/src/test/java/com/moya/funch/entity/ClubTest.kt diff --git a/core/domain/src/main/java/com/moya/funch/entity/Club.kt b/core/domain/src/main/java/com/moya/funch/entity/Club.kt index e192d724..b4ecd27e 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/Club.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/Club.kt @@ -1,11 +1,14 @@ package com.moya.funch.entity enum class Club(val label: String) { - NEXTERS("넥스터즈"), SOPT("SOPT"), - DEPROMEET("Depromeet"), IDLE(""); + NEXTERS("넥스터즈"), + SOPT("SOPT"), + DEPROMEET("Depromeet"), + IDLE("idle"), + ; companion object { - fun find(clubName: String): Club { + fun of(clubName: String): Club { return requireNotNull(entries.find { it.label == clubName }) { "Club : $clubName not found" } } } diff --git a/core/domain/src/test/java/com/moya/funch/entity/ClubTest.kt b/core/domain/src/test/java/com/moya/funch/entity/ClubTest.kt new file mode 100644 index 00000000..d3b84ca0 --- /dev/null +++ b/core/domain/src/test/java/com/moya/funch/entity/ClubTest.kt @@ -0,0 +1,13 @@ +package com.moya.funch.entity + +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +internal class ClubTest { + @Test + fun `동아리에 포함되지 않는 이름으로 찾을 수 없다`() { + assertThrows("Club : 닭아리 not found") { + Club.of("닭아리") + } + } +} From 5512347ee4eb9ef0f6d8684304503151f7c39b15 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:43:43 +0900 Subject: [PATCH 08/16] [feat] Mbti enum --- .../main/java/com/moya/funch/entity/Mbti.kt | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt b/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt index 6828fc57..f69a8b6d 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/Mbti.kt @@ -1,15 +1,21 @@ package com.moya.funch.entity enum class Mbti { - ENFJ, ENFP, ENTJ, ENTP, - ESFJ, ESFP, ESTJ, ESTP, - INFJ, INFP, INTJ, INTP, - ISFJ, ISFP, ISTJ, ISTP, - IDLE; - - companion object { - fun find(mbti: String): Mbti { - return requireNotNull(entries.find { it.name == mbti }) { "Mbti : $mbti not found" } - } - } + ENFJ, + ENFP, + ENTJ, + ENTP, + ESFJ, + ESFP, + ESTJ, + ESTP, + INFJ, + INFP, + INTJ, + INTP, + ISFJ, + ISFP, + ISTJ, + ISTP, + IDLE, } From b75772df1e0dca38ee6c15767b47e8b2d4a8d036 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:43:53 +0900 Subject: [PATCH 09/16] [feat] Blood enum --- .../src/main/java/com/moya/funch/entity/Blood.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/domain/src/main/java/com/moya/funch/entity/Blood.kt b/core/domain/src/main/java/com/moya/funch/entity/Blood.kt index e8451002..1ce0e59e 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/Blood.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/Blood.kt @@ -1,11 +1,9 @@ package com.moya.funch.entity enum class Blood { - A, B, AB, O, IDLE; - - companion object { - fun find(name: String): Blood { - return requireNotNull(entries.find { it.name == name }) { "Blood : $name not found" } - } - } + A, + B, + AB, + O, + IDLE, } From 849cfc6bcec69760ea90317cc0b3455006a1fe44 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:44:25 +0900 Subject: [PATCH 10/16] [feat] Chemistry entity --- .../src/main/java/com/moya/funch/entity/match/Chemistry.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt index 4be4ff0a..3ce3effe 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt @@ -1,6 +1,6 @@ package com.moya.funch.entity.match -data class Chemistry( +data class 름Chemistry( val title: String, val description: String, ) From 87afb6d4493aaa960e736dd0465798356e3c5e13 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:45:50 +0900 Subject: [PATCH 11/16] [chore] MatchingResult -> Matching --- .../src/main/java/com/moya/funch/entity/Chemistry.kt | 6 ------ .../main/java/com/moya/funch/entity/match/Chemistry.kt | 2 +- .../entity/match/{MatchingResult.kt => Matching.kt} | 10 +++++----- 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt rename core/domain/src/main/java/com/moya/funch/entity/match/{MatchingResult.kt => Matching.kt} (77%) diff --git a/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt b/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt deleted file mode 100644 index 725a87ac..00000000 --- a/core/domain/src/main/java/com/moya/funch/entity/Chemistry.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.moya.funch.entity - -data class Chemistry( - val title: String = "", - val description: String = "", -) diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt index 3ce3effe..4be4ff0a 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/match/Chemistry.kt @@ -1,6 +1,6 @@ package com.moya.funch.entity.match -data class 름Chemistry( +data class Chemistry( val title: String, val description: String, ) diff --git a/core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt b/core/domain/src/main/java/com/moya/funch/entity/match/Matching.kt similarity index 77% rename from core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt rename to core/domain/src/main/java/com/moya/funch/entity/match/Matching.kt index 28f97f8d..f093d451 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/match/MatchingResult.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/match/Matching.kt @@ -1,17 +1,17 @@ package com.moya.funch.entity.match -import com.moya.funch.entity.profile.Profile import com.moya.funch.entity.SubwayStation +import com.moya.funch.entity.profile.Profile -data class MatchingResult( - val profile: Profile = Profile(), +data class Matching( + val profile: Profile, val similarity: Int = 0, val chemistrys: List = emptyList(), val recommends: List = emptyList(), val subways: List = emptyList(), -){ +) { init { - require(similarity in 0 .. 100){ + require(similarity in 0..100) { "similarity must be in 0..100" } } From f414b5834285c41944c1c9103fc5015633e617c9 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:46:53 +0900 Subject: [PATCH 12/16] [feat] MatchingRepository --- .../java/com/moya/funch/repository/MatchingRepository.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt b/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt index e698f87c..f57d832b 100644 --- a/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt +++ b/core/domain/src/main/java/com/moya/funch/repository/MatchingRepository.kt @@ -1,11 +1,10 @@ package com.moya.funch.repository -import com.moya.funch.entity.match.MatchingResult +import com.moya.funch.entity.match.Matching fun interface MatchingRepository { - suspend fun matchProfile( userId: String, targetCode: String, - ): MatchingResult + ): Matching } From cd26dfc8e70d5dda2428a4e5d1dc78359a96d54f Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:47:01 +0900 Subject: [PATCH 13/16] [feat] DefaultMatchProfileUseCase --- .../moya/funch/usecase/MatchProfileUseCase.kt | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt index c97b7e33..70ef6dbe 100644 --- a/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt +++ b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt @@ -1,21 +1,23 @@ package com.moya.funch.usecase -import com.moya.funch.entity.match.MatchingResult +import com.moya.funch.entity.match.Matching import com.moya.funch.repository.MatchingRepository import javax.inject.Inject -class DefaultMatchProfileUseCase @Inject constructor( - private val matchingRepository: MatchingRepository, -) : MatchProfileUseCase { - override suspend operator fun invoke( - userId: String, - targetCode: String, - ): MatchingResult = matchingRepository.matchProfile(userId, targetCode) -} +class DefaultMatchProfileUseCase + @Inject + constructor( + private val matchingRepository: MatchingRepository, + ) : MatchProfileUseCase { + override suspend operator fun invoke( + userId: String, + targetCode: String, + ): Matching = matchingRepository.matchProfile(userId, targetCode) + } fun interface MatchProfileUseCase { suspend operator fun invoke( userId: String, targetCode: String, - ): MatchingResult + ): Matching } From 95e1cbf05d81dac322abb57fdd78f9f3d5438478 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 01:56:27 +0900 Subject: [PATCH 14/16] =?UTF-8?q?[feat]=20PR=20=ED=85=9C=ED=94=8C=EB=A6=BF?= =?UTF-8?q?=EC=97=90=20=EB=8B=A4=EC=9D=8C=20=EC=9E=91=EC=97=85=ED=95=A0=20?= =?UTF-8?q?=EA=B1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/pull_request_template.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4749c979..a3340d77 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,9 @@ - closed #이슈넘버 ## 작업한 내용 -- +- ## PR 포인트 -- +- + +## 🚀Next Feature From 418eac5736b78ec9ccc5f8715908bae197c4a057 Mon Sep 17 00:00:00 2001 From: murjune Date: Mon, 5 Feb 2024 12:49:49 +0900 Subject: [PATCH 15/16] =?UTF-8?q?[chore]=20=EC=BD=94=EB=A6=AC=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/moya/funch/entity/SubwayStation.kt | 1 - .../src/main/java/com/moya/funch/entity/profile/Profile.kt | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt b/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt index e5385bc2..b7c532d2 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/SubwayStation.kt @@ -16,7 +16,6 @@ enum class SubwayLine { EIGHT, NINE, AIRPORT, - BUNDANG, EVERLINE, GYEONGCHUN, GYEONGUI, diff --git a/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt b/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt index 55e6d819..e817fd26 100644 --- a/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt +++ b/core/domain/src/main/java/com/moya/funch/entity/profile/Profile.kt @@ -4,6 +4,7 @@ import com.moya.funch.entity.Blood import com.moya.funch.entity.Club import com.moya.funch.entity.Job import com.moya.funch.entity.Mbti +import com.moya.funch.entity.SubwayStation data class Profile( val id: String = "", @@ -13,5 +14,5 @@ data class Profile( val clubs: List = emptyList(), val mbti: Mbti = Mbti.IDLE, val blood: Blood = Blood.IDLE, - val subwayNames: List = emptyList(), + val subways: List = emptyList(), ) From 2cd9b31787c11ccf1af6561c2a1e14d42a0a6f99 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 6 Feb 2024 19:25:29 +0900 Subject: [PATCH 16/16] [chore] DefaultMatchProfileUseCase -> MatchProfileUseCaseImpl --- .../src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt index 70ef6dbe..701d8675 100644 --- a/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt +++ b/core/domain/src/main/java/com/moya/funch/usecase/MatchProfileUseCase.kt @@ -4,7 +4,7 @@ import com.moya.funch.entity.match.Matching import com.moya.funch.repository.MatchingRepository import javax.inject.Inject -class DefaultMatchProfileUseCase +class MatchProfileUseCaseImpl @Inject constructor( private val matchingRepository: MatchingRepository,