Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c2bd55b
Refactor: mypage state, sideeffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
ffeafbf
Refactor: login state, sideeffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
ce4dc59
Refactor: guide state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
38caccc
Refactor: emotion state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
1fd7a33
Refactor: home state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
c90c8c6
Refactor: onBoarding state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
c57397f
Refactor: RecommendRoutine state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
76e26e3
Refactor: Report state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
00a2106
Refactor: ReportDetail state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
74edfa1
Refactor: ReportHistory state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
127ab4e
Refactor: RoutineList state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
e72a779
Refactor: Setting state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
3408fae
Refactor: splash state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
e616c63
Refactor: TermsAgreement state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
c849e00
Refactor: withdrawal state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
9cc1a40
Refactor: writeRoutine state, sideEffect를 contract 패키지로 이동
wjdrjs00 Feb 12, 2026
0dc58ed
Chore: 린트 수정
wjdrjs00 Feb 12, 2026
27c557c
Chore: 루틴 관련 Response 네이밍 수정
wjdrjs00 Feb 14, 2026
258078d
Chore: Home Routine관련 UiModel 초기화 로직 변경 및 Parcelize 제거
wjdrjs00 Feb 14, 2026
9018b82
Refactor: TodayEmotion을 DailyEmotion으로 네이밍 변경 및 리팩토링
wjdrjs00 Feb 14, 2026
89508e1
Fix: 추천 루틴 관련 ID 타입을 Int에서 Long으로 변경
wjdrjs00 Feb 14, 2026
85eb3d1
Refactor: 추천 루틴 관련 모델 및 네이밍 변경
wjdrjs00 Feb 14, 2026
289e75c
Refactor: 추천 루틴 카테고리 모델 통합
wjdrjs00 Feb 14, 2026
a9602ac
Chore: 루틴 리스트 관련 UiModel 네이밍 변경
wjdrjs00 Feb 14, 2026
a64ea30
Refactor: recommendedRoutineType 타입을 RecommendCategory로 변경
wjdrjs00 Feb 15, 2026
434bbb9
Refactor: SubRoutine 모델 및 관련 로직 변경
wjdrjs00 Feb 15, 2026
5ad95fc
Chore: Onboarding 관련 UiModel 네이밍 변경 및 Mapper 추가
wjdrjs00 Feb 15, 2026
df2095d
Refactor: Report 관련 Presentation 모델을 Domain 모델로 대체
wjdrjs00 Feb 15, 2026
595254e
Refactor: Emotion 관련 UiModel 매핑 로직 변경
wjdrjs00 Feb 15, 2026
a9dbe2c
Refactor: data 레이어 모델 네이밍에서 Dto 접미사 제거
wjdrjs00 Feb 15, 2026
a0544e1
Chore: 린트 수정
wjdrjs00 Feb 15, 2026
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
@@ -1,13 +1,13 @@
package com.threegap.bitnagil.data.auth.datasource

import com.threegap.bitnagil.data.auth.model.request.LoginRequestDto
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequestDto
import com.threegap.bitnagil.data.auth.model.response.LoginResponseDto
import com.threegap.bitnagil.data.auth.model.request.LoginRequest
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequest
import com.threegap.bitnagil.data.auth.model.response.LoginResponse

interface AuthRemoteDataSource {
suspend fun login(socialAccessToken: String, loginRequestDto: LoginRequestDto): Result<LoginResponseDto>
suspend fun submitAgreement(termsAgreementRequestDto: TermsAgreementRequestDto): Result<Unit>
suspend fun login(socialAccessToken: String, loginRequest: LoginRequest): Result<LoginResponse>
suspend fun submitAgreement(termsAgreementRequest: TermsAgreementRequest): Result<Unit>
suspend fun logout(): Result<Unit>
suspend fun withdrawal(reason: String): Result<Unit>
suspend fun reissueToken(refreshToken: String): Result<LoginResponseDto>
suspend fun reissueToken(refreshToken: String): Result<LoginResponse>
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.threegap.bitnagil.data.auth.datasourceimpl

import com.threegap.bitnagil.data.auth.datasource.AuthRemoteDataSource
import com.threegap.bitnagil.data.auth.model.request.LoginRequestDto
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequestDto
import com.threegap.bitnagil.data.auth.model.request.LoginRequest
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequest
import com.threegap.bitnagil.data.auth.model.request.WithdrawalReasonRequest
import com.threegap.bitnagil.data.auth.model.response.LoginResponseDto
import com.threegap.bitnagil.data.auth.model.response.LoginResponse
import com.threegap.bitnagil.data.auth.service.AuthService
import com.threegap.bitnagil.data.common.safeApiCall
import com.threegap.bitnagil.data.common.safeUnitApiCall
Expand All @@ -13,14 +13,14 @@ import javax.inject.Inject
class AuthRemoteDataSourceImpl @Inject constructor(
private val authService: AuthService,
) : AuthRemoteDataSource {
override suspend fun login(socialAccessToken: String, loginRequestDto: LoginRequestDto): Result<LoginResponseDto> =
override suspend fun login(socialAccessToken: String, loginRequest: LoginRequest): Result<LoginResponse> =
safeApiCall {
authService.postLogin(socialAccessToken, loginRequestDto)
authService.postLogin(socialAccessToken, loginRequest)
}

override suspend fun submitAgreement(termsAgreementRequestDto: TermsAgreementRequestDto): Result<Unit> =
override suspend fun submitAgreement(termsAgreementRequest: TermsAgreementRequest): Result<Unit> =
safeUnitApiCall {
authService.submitAgreement(termsAgreementRequestDto)
authService.submitAgreement(termsAgreementRequest)
}

override suspend fun logout(): Result<Unit> =
Expand All @@ -33,7 +33,7 @@ class AuthRemoteDataSourceImpl @Inject constructor(
authService.postWithdrawal(WithdrawalReasonRequest(reason))
}

override suspend fun reissueToken(refreshToken: String): Result<LoginResponseDto> =
override suspend fun reissueToken(refreshToken: String): Result<LoginResponse> =
safeApiCall {
authService.postReissueToken(refreshToken)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class LoginRequestDto(
data class LoginRequest(
@SerialName("socialType")
val socialType: String,
)
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
package com.threegap.bitnagil.data.auth.model.request

import com.threegap.bitnagil.domain.auth.model.TermsAgreement
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class TermsAgreementRequestDto(
data class TermsAgreementRequest(
@SerialName("agreedToTermsOfService")
val agreedToTermsOfService: Boolean,
@SerialName("agreedToPrivacyPolicy")
val agreedToPrivacyPolicy: Boolean,
@SerialName("isOverFourteen")
val isOverFourteen: Boolean,
)

internal fun TermsAgreement.toDto() =
TermsAgreementRequest(
agreedToTermsOfService = this.agreedToTermsOfService,
agreedToPrivacyPolicy = this.agreedToPrivacyPolicy,
isOverFourteen = this.isOverFourteen,
)
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
package com.threegap.bitnagil.data.auth.model.response

import com.threegap.bitnagil.domain.auth.model.AuthSession
import com.threegap.bitnagil.domain.auth.model.UserRole
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class LoginResponseDto(
data class LoginResponse(
@SerialName("accessToken")
val accessToken: String,
@SerialName("refreshToken")
val refreshToken: String,
@SerialName("role")
val role: UserRole,
)

internal fun LoginResponse.toDomain() =
AuthSession(
accessToken = this.accessToken,
refreshToken = this.refreshToken,
role = this.role,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.threegap.bitnagil.data.auth.repositoryimpl

import com.threegap.bitnagil.data.auth.datasource.AuthLocalDataSource
import com.threegap.bitnagil.data.auth.datasource.AuthRemoteDataSource
import com.threegap.bitnagil.data.auth.mapper.toDomain
import com.threegap.bitnagil.data.auth.mapper.toDto
import com.threegap.bitnagil.data.auth.model.request.LoginRequestDto
import com.threegap.bitnagil.data.auth.model.request.LoginRequest
import com.threegap.bitnagil.data.auth.model.request.toDto
import com.threegap.bitnagil.data.auth.model.response.toDomain
import com.threegap.bitnagil.domain.auth.model.AuthSession
import com.threegap.bitnagil.domain.auth.model.TermsAgreement
import com.threegap.bitnagil.domain.auth.repository.AuthRepository
Expand All @@ -15,7 +15,7 @@ class AuthRepositoryImpl @Inject constructor(
private val authLocalDataSource: AuthLocalDataSource,
) : AuthRepository {
override suspend fun login(socialAccessToken: String, socialType: String): Result<AuthSession> =
authRemoteDataSource.login(socialAccessToken, LoginRequestDto(socialType))
authRemoteDataSource.login(socialAccessToken, LoginRequest(socialType))
.map { it.toDomain() }

override suspend fun submitAgreement(termsAgreement: TermsAgreement): Result<Unit> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.threegap.bitnagil.data.auth.service

import com.threegap.bitnagil.data.auth.model.request.LoginRequestDto
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequestDto
import com.threegap.bitnagil.data.auth.model.request.LoginRequest
import com.threegap.bitnagil.data.auth.model.request.TermsAgreementRequest
import com.threegap.bitnagil.data.auth.model.request.WithdrawalReasonRequest
import com.threegap.bitnagil.data.auth.model.response.LoginResponseDto
import com.threegap.bitnagil.data.auth.model.response.LoginResponse
import com.threegap.bitnagil.network.model.BaseResponse
import retrofit2.http.Body
import retrofit2.http.Header
Expand All @@ -15,12 +15,12 @@ interface AuthService {
@Headers("No-Service-Token: true")
suspend fun postLogin(
@Header("SocialAccessToken") socialAccessToken: String,
@Body loginRequestDto: LoginRequestDto,
): BaseResponse<LoginResponseDto>
@Body loginRequest: LoginRequest,
): BaseResponse<LoginResponse>

@POST("/api/v1/auth/agreements")
suspend fun submitAgreement(
@Body termsAgreementRequestDto: TermsAgreementRequestDto,
@Body termsAgreementRequest: TermsAgreementRequest,
): BaseResponse<Unit>

@POST("/api/v1/auth/withdrawal")
Expand All @@ -33,5 +33,5 @@ interface AuthService {
@Headers("No-Service-Token: true", "Auto-Login: true")
suspend fun postReissueToken(
@Header("Refresh-Token") refreshToken: String,
): BaseResponse<LoginResponseDto>
): BaseResponse<LoginResponse>
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.threegap.bitnagil.data.emotion.datasource

import com.threegap.bitnagil.data.emotion.model.dto.EmotionDto
import com.threegap.bitnagil.data.emotion.model.response.DailyEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.RegisterEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.TodayEmotionResponseDto

interface EmotionDataSource {
suspend fun getEmotions(): Result<List<EmotionDto>>
suspend fun registerEmotion(emotion: String): Result<RegisterEmotionResponse>
suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotionResponseDto>
suspend fun fetchDailyEmotion(currentDate: String): Result<DailyEmotionResponse>
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import com.threegap.bitnagil.data.common.safeApiCall
import com.threegap.bitnagil.data.emotion.datasource.EmotionDataSource
import com.threegap.bitnagil.data.emotion.model.dto.EmotionDto
import com.threegap.bitnagil.data.emotion.model.request.RegisterEmotionRequest
import com.threegap.bitnagil.data.emotion.model.response.DailyEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.RegisterEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.TodayEmotionResponseDto
import com.threegap.bitnagil.data.emotion.service.EmotionService
import javax.inject.Inject

Expand All @@ -25,8 +25,8 @@ class EmotionDataSourceImpl @Inject constructor(
}
}

override suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotionResponseDto> =
override suspend fun fetchDailyEmotion(currentDate: String): Result<DailyEmotionResponse> =
safeApiCall {
emotionService.fetchTodayEmotion(currentDate)
emotionService.fetchDailyEmotion(currentDate)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.threegap.bitnagil.data.emotion.model.response

import com.threegap.bitnagil.domain.emotion.model.DailyEmotion
import com.threegap.bitnagil.domain.emotion.model.EmotionMarbleType
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class DailyEmotionResponse(
@SerialName("emotionMarbleType")
val emotionMarbleType: EmotionMarbleType?,
@SerialName("emotionMarbleName")
val emotionMarbleName: String?,
@SerialName("imageUrl")
val imageUrl: String?,
@SerialName("emotionMarbleHomeMessage")
val emotionMarbleHomeMessage: String?,
)

fun DailyEmotionResponse.toDomain(): DailyEmotion =
DailyEmotion(
type = emotionMarbleType,
name = emotionMarbleName,
imageUrl = imageUrl,
homeMessage = emotionMarbleHomeMessage,
)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.threegap.bitnagil.data.emotion.repositoryImpl

import com.threegap.bitnagil.data.emotion.datasource.EmotionDataSource
import com.threegap.bitnagil.data.emotion.model.response.toDomain
import com.threegap.bitnagil.domain.emotion.model.DailyEmotion
import com.threegap.bitnagil.domain.emotion.model.Emotion
import com.threegap.bitnagil.domain.emotion.model.EmotionChangeEvent
import com.threegap.bitnagil.domain.emotion.model.EmotionRecommendRoutine
import com.threegap.bitnagil.domain.emotion.model.TodayEmotion
import com.threegap.bitnagil.domain.emotion.repository.EmotionRepository
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
Expand Down Expand Up @@ -34,8 +34,8 @@ class EmotionRepositoryImpl @Inject constructor(
}
}

override suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotion?> =
emotionDataSource.fetchTodayEmotion(currentDate).map { it.toDomain() }
override suspend fun fetchDailyEmotion(currentDate: String): Result<DailyEmotion> =
emotionDataSource.fetchDailyEmotion(currentDate).map { it.toDomain() }

private val _emotionChangeEventFlow = MutableSharedFlow<EmotionChangeEvent>()
override suspend fun getEmotionChangeEventFlow(): Flow<EmotionChangeEvent> = _emotionChangeEventFlow.asSharedFlow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.threegap.bitnagil.data.emotion.service

import com.threegap.bitnagil.data.emotion.model.dto.EmotionDto
import com.threegap.bitnagil.data.emotion.model.request.RegisterEmotionRequest
import com.threegap.bitnagil.data.emotion.model.response.DailyEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.RegisterEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.TodayEmotionResponseDto
import com.threegap.bitnagil.network.model.BaseResponse
import retrofit2.http.Body
import retrofit2.http.GET
Expand All @@ -20,7 +20,7 @@ interface EmotionService {
): BaseResponse<RegisterEmotionResponse>

@GET("/api/v2/emotion-marbles/{searchDate}")
suspend fun fetchTodayEmotion(
suspend fun fetchDailyEmotion(
@Path("searchDate") date: String,
): BaseResponse<TodayEmotionResponseDto>
): BaseResponse<DailyEmotionResponse>
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.threegap.bitnagil.data.file.datasource

import com.threegap.bitnagil.data.file.model.request.FileInfoRequestDto
import com.threegap.bitnagil.data.file.model.request.FileInfoRequest

interface FileDataSource {
/**
* presigned URL 요청
* @param fileInfos 파일 정보 리스트 (prefix + fileName)
* @return key: S3 경로, value: presigned URL
*/
suspend fun fetchPresignedUrls(fileInfos: List<FileInfoRequestDto>): Result<Map<String, String>>
suspend fun fetchPresignedUrls(fileInfos: List<FileInfoRequest>): Result<Map<String, String>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package com.threegap.bitnagil.data.file.datasourceImpl

import com.threegap.bitnagil.data.common.safeApiCall
import com.threegap.bitnagil.data.file.datasource.FileDataSource
import com.threegap.bitnagil.data.file.model.request.FileInfoRequestDto
import com.threegap.bitnagil.data.file.model.request.FileInfoRequest
import com.threegap.bitnagil.data.file.service.FileService
import javax.inject.Inject

class FileDataSourceImpl @Inject constructor(
private val fileService: FileService,
) : FileDataSource {
override suspend fun fetchPresignedUrls(fileInfos: List<FileInfoRequestDto>): Result<Map<String, String>> {
override suspend fun fetchPresignedUrls(fileInfos: List<FileInfoRequest>): Result<Map<String, String>> {
return safeApiCall { fileService.fetchPresignedUrls(fileInfos) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class FileInfoRequestDto(
data class FileInfoRequest(
@SerialName("prefix")
val prefix: String,
@SerialName("fileName")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.threegap.bitnagil.data.file.repositoryImpl

import com.threegap.bitnagil.data.file.datasource.FileDataSource
import com.threegap.bitnagil.data.file.model.request.FileInfoRequestDto
import com.threegap.bitnagil.data.file.model.request.FileInfoRequest
import com.threegap.bitnagil.data.file.uploader.ImageUploader
import com.threegap.bitnagil.domain.file.model.ImageFile
import com.threegap.bitnagil.domain.file.repository.FileRepository
Expand All @@ -17,7 +17,7 @@ class FileRepositoryImpl @Inject constructor(
override suspend fun uploadImages(imageFiles: List<ImageFile>): Result<List<String>> {
return runCatching {
val fileInfos = imageFiles.map { imageFile ->
FileInfoRequestDto(prefix = imageFile.prefix, fileName = imageFile.name)
FileInfoRequest(prefix = imageFile.prefix, fileName = imageFile.name)
}

val presignedUrlMap: Map<String, String> = fileDataSource
Expand Down
Loading