-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from Cat-JiYoung/develop
[FEAT] 회고 작성 api 연결
- Loading branch information
Showing
32 changed files
with
705 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
app/src/main/java/com/puzzling/puzzlingaos/data/repository/WriteReviewRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.puzzling.puzzlingaos.data.repository | ||
|
||
import com.puzzling.puzzlingaos.data.model.request.RequestReview5FDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewAARDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewTILDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponsePreviousTemplateDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponseSaveReviewDto | ||
import com.puzzling.puzzlingaos.data.source.remote.WriteReviewDataSource | ||
import com.puzzling.puzzlingaos.domain.entity.ReviewType | ||
import com.puzzling.puzzlingaos.domain.repository.WriteReviewRepository | ||
import javax.inject.Inject | ||
|
||
class WriteReviewRepositoryImpl @Inject constructor( | ||
private val writeReviewDataSource: WriteReviewDataSource, | ||
) : WriteReviewRepository { | ||
override suspend fun getReviewType(): Result<List<ReviewType>> = runCatching { | ||
writeReviewDataSource.getReviewTemplate().toReviewType() | ||
} | ||
|
||
override suspend fun uploadTIL( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewTIL: RequestReviewTILDto, | ||
|
||
): Result<ResponseSaveReviewDto> = runCatching { | ||
writeReviewDataSource.uploadReviewTIL( | ||
memberId, | ||
projectId, | ||
requestReviewTIL, | ||
) | ||
} | ||
|
||
override suspend fun upload5F( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReview5F: RequestReview5FDto, | ||
): Result<ResponseSaveReviewDto> = runCatching { | ||
writeReviewDataSource.uploadReview5F( | ||
memberId, | ||
projectId, | ||
requestReview5F, | ||
) | ||
} | ||
|
||
override suspend fun uploadAAR( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewAAR: RequestReviewAARDto, | ||
): Result<ResponseSaveReviewDto> = runCatching { | ||
writeReviewDataSource.uploadReviewAAR( | ||
memberId, | ||
projectId, | ||
requestReviewAAR, | ||
) | ||
} | ||
|
||
override suspend fun getPreviousTemplate( | ||
memberId: Int, | ||
projectId: Int, | ||
): Result<ResponsePreviousTemplateDto> = | ||
runCatching { | ||
writeReviewDataSource.getPreviousTemplate(memberId, projectId) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...c/main/java/com/puzzling/puzzlingaos/data/source/remote/impl/WriteReviewDataSourceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.puzzling.puzzlingaos.data.source.remote.impl | ||
|
||
import com.puzzling.puzzlingaos.data.model.request.RequestReview5FDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewAARDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewTILDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponsePreviousTemplateDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponseReviewTypeDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponseSaveReviewDto | ||
import com.puzzling.puzzlingaos.data.service.WriteReviewService | ||
import com.puzzling.puzzlingaos.data.source.remote.WriteReviewDataSource | ||
import javax.inject.Inject | ||
|
||
class WriteReviewDataSourceImpl @Inject constructor( | ||
private val apiService: WriteReviewService, | ||
) : WriteReviewDataSource { | ||
override suspend fun getReviewTemplate(): ResponseReviewTypeDto = | ||
apiService.getReviewTemplate() | ||
|
||
override suspend fun uploadReviewTIL( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewTIL: RequestReviewTILDto, | ||
): ResponseSaveReviewDto = | ||
apiService.postSaveReviewTIL(memberId, projectId, requestReviewTIL) | ||
|
||
override suspend fun uploadReview5F( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReview5F: RequestReview5FDto, | ||
): ResponseSaveReviewDto = | ||
apiService.postSaveReview5F(memberId, projectId, requestReview5F) | ||
|
||
override suspend fun uploadReviewAAR( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewAAR: RequestReviewAARDto, | ||
): ResponseSaveReviewDto = | ||
apiService.postSaveReviewAAR(memberId, projectId, requestReviewAAR) | ||
|
||
override suspend fun getPreviousTemplate( | ||
memberId: Int, | ||
projectId: Int, | ||
): ResponsePreviousTemplateDto = apiService.getPreviousTemplate( | ||
memberId, | ||
projectId, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/puzzling/puzzlingaos/domain/entity/AAR.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.puzzling.puzzlingaos.domain.entity | ||
|
||
data class AAR( | ||
val reviewTemplateId: Int, | ||
val initialGoal: String, | ||
val result: String, | ||
val difference: String, | ||
val persistence: String, | ||
val actionPlan: String, | ||
) |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/puzzling/puzzlingaos/domain/entity/F5.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.puzzling.puzzlingaos.domain.entity | ||
|
||
data class F5( | ||
val reviewTemplateId: Int, | ||
val fact: String, | ||
val feeling: String, | ||
val finding: String, | ||
val feedback: String, | ||
val actionPlan: String, | ||
|
||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/puzzling/puzzlingaos/domain/entity/TIL.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.puzzling.puzzlingaos.domain.entity | ||
|
||
data class TIL( | ||
val reviewTemplateId: Int, | ||
val liked: String, | ||
val lacked: String, | ||
val actionPlan: String, | ||
) |
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/puzzling/puzzlingaos/domain/repository/WriteReviewRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.puzzling.puzzlingaos.domain.repository | ||
|
||
import com.puzzling.puzzlingaos.data.model.request.RequestReview5FDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewAARDto | ||
import com.puzzling.puzzlingaos.data.model.request.RequestReviewTILDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponsePreviousTemplateDto | ||
import com.puzzling.puzzlingaos.data.model.response.ResponseSaveReviewDto | ||
import com.puzzling.puzzlingaos.domain.entity.ReviewType | ||
|
||
interface WriteReviewRepository { | ||
suspend fun getReviewType(): Result<List<ReviewType>> | ||
|
||
suspend fun uploadTIL( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewTIL: RequestReviewTILDto, | ||
): Result<ResponseSaveReviewDto> | ||
|
||
suspend fun upload5F( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReview5F: RequestReview5FDto, | ||
): Result<ResponseSaveReviewDto> | ||
|
||
suspend fun uploadAAR( | ||
memberId: Int, | ||
projectId: Int, | ||
requestReviewAAR: RequestReviewAARDto, | ||
): Result<ResponseSaveReviewDto> | ||
|
||
suspend fun getPreviousTemplate( | ||
memberId: Int, | ||
projectId: Int, | ||
): Result<ResponsePreviousTemplateDto> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.