Skip to content

Commit 6df515f

Browse files
authored
[YS-304] refactor: 공고 상세 조회 시, 반환값으로 alarmAgree 필드 추가 (#94)
* feat: add alarmAgree field in application layer * feat: add alarmAgree field in presentation layer
1 parent fbc6cc5 commit 6df515f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/main/kotlin/com/dobby/backend/application/usecase/experiment/GetExperimentPostDetailUseCase.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class GetExperimentPostDetailUseCase(
3838
val content: String,
3939
val imageList: List<String>,
4040
val isAuthor: Boolean,
41-
val isUploaderActive: Boolean
41+
val isUploaderActive: Boolean,
42+
val alarmAgree: Boolean
4243
) {
4344
data class Summary(
4445
val startDate: LocalDate?,
@@ -91,7 +92,8 @@ fun ExperimentPost.toExperimentPostDetail(memberId: String?): GetExperimentPostD
9192
content = this.content,
9293
imageList = this.images.map { it.imageUrl },
9394
isAuthor = this.member.id == memberId,
94-
isUploaderActive = this.member.deletedAt == null
95+
isUploaderActive = this.member.deletedAt == null,
96+
alarmAgree = this.alarmAgree
9597
)
9698
}
9799

src/main/kotlin/com/dobby/backend/presentation/api/dto/response/experiment/ExperimentPostDetailResponse.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ data class ExperimentPostDetailResponse(
4848
val imageList: List<String>,
4949

5050
@Schema(description = "글쓴이 여부", example = "true")
51-
val isAuthor: Boolean
51+
val isAuthor: Boolean,
52+
53+
@Schema(description = "알림 동의 여부", example = "true")
54+
val alarmAgree: Boolean
5255
) {
5356
@Schema(description = "실험 공고 요약 정보")
5457
data class SummaryResponse(

src/main/kotlin/com/dobby/backend/presentation/api/mapper/ExperimentPostMapper.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ object ExperimentPostMapper {
176176
content = response.experimentPostDetail.content,
177177
imageList = response.experimentPostDetail.imageList,
178178
isAuthor = response.experimentPostDetail.isAuthor,
179-
isUploaderActive = response.experimentPostDetail.isUploaderActive
179+
isUploaderActive = response.experimentPostDetail.isUploaderActive,
180+
alarmAgree = response.experimentPostDetail.alarmAgree
180181
)
181182
}
182183

0 commit comments

Comments
 (0)