From da9ec5420381f8c26952d562cdcd8c3673c62150 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Wed, 28 Feb 2024 02:01:45 +0900 Subject: [PATCH] [FEATURE] #141 : SignUpRepository --- .../main/java/com/wap/wapp/core/data/di/DataModule.kt | 8 ++++++++ .../core/data/repository/auth/SignUpRepository.kt | 5 +++++ .../core/data/repository/auth/SignUpRepositoryImpl.kt | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepository.kt create mode 100644 core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepositoryImpl.kt diff --git a/core/data/src/main/java/com/wap/wapp/core/data/di/DataModule.kt b/core/data/src/main/java/com/wap/wapp/core/data/di/DataModule.kt index cdd681ec..0618b34a 100644 --- a/core/data/src/main/java/com/wap/wapp/core/data/di/DataModule.kt +++ b/core/data/src/main/java/com/wap/wapp/core/data/di/DataModule.kt @@ -6,6 +6,8 @@ import com.wap.wapp.core.data.repository.attendancestatus.AttendanceStatusReposi import com.wap.wapp.core.data.repository.attendancestatus.AttendanceStatusRepositoryImpl import com.wap.wapp.core.data.repository.auth.AuthRepository import com.wap.wapp.core.data.repository.auth.AuthRepositoryImpl +import com.wap.wapp.core.data.repository.auth.SignUpRepository +import com.wap.wapp.core.data.repository.auth.SignUpRepositoryImpl import com.wap.wapp.core.data.repository.event.EventRepository import com.wap.wapp.core.data.repository.event.EventRepositoryImpl import com.wap.wapp.core.data.repository.management.ManagementRepository @@ -72,4 +74,10 @@ abstract class DataModule { abstract fun bindsAttendanceStatusRepository( attendanceStatusRepositoryImpl: AttendanceStatusRepositoryImpl, ): AttendanceStatusRepository + + @Binds + @Singleton + abstract fun bindsSignUpRepository( + signUpRepositoryImpl: SignUpRepositoryImpl, + ): SignUpRepository } diff --git a/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepository.kt b/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepository.kt new file mode 100644 index 00000000..110e43b8 --- /dev/null +++ b/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepository.kt @@ -0,0 +1,5 @@ +package com.wap.wapp.core.data.repository.auth + +interface SignUpRepository { + suspend fun validationWapCode(code: String): Result +} diff --git a/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepositoryImpl.kt b/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepositoryImpl.kt new file mode 100644 index 00000000..a417a14c --- /dev/null +++ b/core/data/src/main/java/com/wap/wapp/core/data/repository/auth/SignUpRepositoryImpl.kt @@ -0,0 +1,11 @@ +package com.wap.wapp.core.data.repository.auth + +import com.wap.wapp.core.network.source.auth.SignUpDataSource +import javax.inject.Inject + +class SignUpRepositoryImpl @Inject constructor( + private val signUpDataSource: SignUpDataSource, +) : SignUpRepository { + override suspend fun validationWapCode(code: String): Result = + signUpDataSource.validationWapCode(code) +}