Skip to content

Conversation

@chock-cho
Copy link
Member

@chock-cho chock-cho commented Sep 3, 2025

💡 작업 내용

  • YS-505 공고 등록, 공고 목록 조회 시 '교내 실험 여부' 필드 추가

✅ 셀프 체크리스트

  • PR 제목을 형식에 맞게 작성했나요?
  • 브랜치 전략에 맞는 브랜치에 PR을 올리고 있나요?
  • 테스트는 잘 통과했나요?
  • 빌드에 성공했나요?
  • 본인을 assign 해주세요.
  • 해당 PR에 맞는 label을 붙여주세요.

🙋🏻‍ 확인해주세요

  • 관련된 Discussion 등이 있다면 첨부해주세요

🔗 Jira 티켓


https://yappsocks.atlassian.net/browse/YS-505

Summary by CodeRabbit

  • 신기능
    • 실험 모집글에 "교내 진행 여부(isOnCampus)" 옵션이 추가되었습니다. 작성·저장·조회·수정·목록 등 API 응답과 UI에 일관되게 반영됩니다.
  • 테스트
    • 관련 유즈케이스 및 API 경로의 테스트 데이터와 기대값이 새 옵션을 반영하도록 업데이트되었습니다.

🔗 Jira 티켓


https://yappsocks.atlassian.net/browse/YS-505

@chock-cho chock-cho self-assigned this Sep 3, 2025
@chock-cho chock-cho added the ✨ FEATURE 기능 추가 label Sep 3, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 3, 2025

Walkthrough

실험 게시물에 isOnCampus:Boolean 필드를 추가하고 요청 DTO → 매퍼 → 유스케이스 입력/출력 → 도메인 팩토리 → 엔티티로 값을 전달·매핑하도록 코드와 테스트들을 갱신했습니다. 공개 생성자/팩토리/메서드 시그니처에 isOnCampus가 추가되었습니다.

Changes

Cohort / File(s) Summary
Use case: create flow
application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt
InputisOnCampus: Boolean 추가. newExperimentPost(..., isOnCampus = input.isOnCampus)로 전달. Output.PostInfoisOnCampus 포함.
Use case: update & list flows
application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt
application/src/main/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCase.kt
Input/PostInfoisOnCampus: Boolean 추가. 출력 매핑에서 isOnCampus = post.isOnCampus 설정.
Domain: model & factory
domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt
ExperimentPost 생성자에 isOnCampus: Boolean 추가. companion newExperimentPost(..., isOnCampus: Boolean) 파라미터/초기화 추가. update(...).copy(...)isOnCampus 포함.
Infrastructure: entity & mapping
infrastructure/src/main/kotlin/com/dobby/persistence/entity/experiment/ExperimentPostEntity.kt
엔티티에 @Column(name = "is_on_campus") var isOnCampus: Boolean 추가. toDomain/fromDomain 매핑에 포함.
Presentation: request DTOs
presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/CreateExperimentPostRequest.kt
presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/UpdateExperimentPostRequest.kt
요청 DTO들에 isOnCampus: Boolean 필드 추가 (생성/수정 요청 모두).
Presentation: response DTO & mapper
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt
presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt
응답 PostInfoisOnCampus: Boolean 추가. 매퍼에서 요청→유스케이스 입력 및 유스케이스 출력→응답으로 isOnCampus를 전파하도록 매핑 업데이트.
Tests: updated experiment post instances
application/src/test/kotlin/.../experiment/* and .../member/email/*
다수의 테스트에서 ExperimentPostCreateExperimentPostUseCase.Input 초기화에 isOnCampus = true 추가. 테스트 로직·어설션에는 변경 없음.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Controller/API
  participant Mapper as ExperimentPostMapper
  participant UC as CreateExperimentPostUseCase
  participant Domain as ExperimentPost (domain)
  participant Repo as Repository/Entity

  Client->>API: POST /experiments (body includes isOnCampus)
  API->>Mapper: toCreatePostUseCaseInput(request with isOnCampus)
  Mapper-->>UC: Input(..., isOnCampus)
  UC->>Domain: newExperimentPost(..., isOnCampus)
  Domain-->>UC: ExperimentPost{ isOnCampus }
  UC->>Repo: save(ExperimentPost)
  Repo-->>UC: saved entity
  UC-->>API: Output.PostInfo(isOnCampus)
  API-->>Client: 201 Created (response includes isOnCampus)

  rect rgba(50,130,200,0.08)
    note right of Domain: 도메인 모델에 isOnCampus 설정
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

토끼가 깡충 말하네, 깔끔히 한 줄 ✨
요청에 실린 깃발 하나, 캠퍼스라네.
매퍼가 건네고 팩토리가 품어,
엔티티는 칼럼에 조용히 담았네.
테스트들아, 함께 깡충! 🐇

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/YS-505

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (2)

388-416: 요구사항 미반영: 목록 조회 응답에 ‘교내 실험 여부’ 누락

PR 목적에는 “공고 목록 조회 시 ‘교내 실험 여부’ 필드 추가”가 포함되지만, 리스트 매핑(ExperimentPostResponse.PostInfo)에는 미포함입니다.

아래와 같이 매퍼/DTO/유즈케이스 출력에 필드를 전파해 주세요(예시).

                 ExperimentPostResponse(
                     postInfo = PostInfo(
                         experimentPostId = post.postInfo.experimentPostId,
                         title = post.postInfo.title,
                         views = post.postInfo.views,
                         place = post.postInfo.place,
+                        isOnCampus = post.postInfo.isOnCampus,
                         reward = post.postInfo.reward,

추가로 필요한 변경:

  • com.dobby.api.dto.response.experiment.PostInfo에 val isOnCampus: Boolean 추가
  • GetExperimentPostsUseCase.Output.PostInfo(또는 동등 타입)에 isOnCampus 추가 및 도메인->출력 매핑 보강
    원하시면 연쇄 수정 패치 제안 드립니다.

46-47: 응답 DTO 매핑에 isOnCampus 누락

  • toCreatePostInfo(PostInfo) 및 ExperimentPostResponse 매핑에 isOnCampus 추가
  • toGetExperimentPostDetailResponse(ExperimentPostDetailResponse) 매핑에 isOnCampus 반영
  • toExperimentPostResponse(MyExperimentPostResponse) 매핑에 isOnCampus 포함
🧹 Nitpick comments (7)
domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt (4)

35-35: isOnCampus 널 허용 → 비널로 일관성 맞추기 제안

프리젠테이션/유즈케이스 계층은 Boolean(비널)인데 도메인만 Boolean? 입니다. 계층 간 계약 불일치가 NPE/검증 누락을 유발할 수 있습니다.

다음과 같이 타입만 비널로 통일하는 것을 권장합니다.

-    var isOnCampus: Boolean?,
+    var isOnCampus: Boolean,

144-171: ONLINE 매칭 시 isOnCampus=true 조합 방지 검증 추가 필요 여부 확인

온라인(비대면)이라면 ‘교내 실험 여부’가 true인 조합은 모순일 수 있습니다. 요구사항에 따라 금지해야 한다면 아래와 같이 팩토리에서 즉시 검증을 추가하는 것이 안전합니다.

         fun newExperimentPost(
@@
             images: List<ExperimentImage> = listOf()
         ): ExperimentPost {
             validate(title, reward, content, leadResearcher, matchType, place, region, area, count, images = images.map { it.imageUrl })
+            if (matchType == MatchType.ONLINE && isOnCampus) {
+                throw ExperimentPostInvalidOnlineRequestException
+            }

요구사항상 허용이라면 무시해도 됩니다. 결정만 확인 부탁드립니다.


61-118: isOnCampus 업데이트 경로 부재 — 업데이트 가능 여부 확인

update(...)에 isOnCampus 파라미터가 없어 생성 후 수정이 불가합니다. 수정 불가 정책이면 그대로, 수정 가능해야 한다면 파라미터 및 copy 반영이 필요합니다.

원하시면 해당 변경에 맞춘 mapper/DTO까지 일괄 패치 제안 드리겠습니다.


155-180: DB 마이그레이션 및 기본값 전략 점검

인프라 계층에 is_on_campus 컬럼 추가가 필요합니다. 운영 중 스키마 변경 시:

  • 기본값/널 전략(Boolean NOT NULL DEFAULT false vs NULL 허용) 결정
  • 기존 데이터 백필 계획
  • 읽기 경로 캐시/인덱스 영향(필터링/집계에 사용할 예정인지) 검토

필요하면 Flyway/Liquibase 마이그레이션 스크립트 초안 만들어 드릴게요.

presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/CreateExperimentPostRequest.kt (1)

22-22: API 호환성 확인: isOnCampus 필드 필수화

기존 클라이언트가 필드를 보내지 않으면 400이 될 수 있습니다. 단계적 롤아웃이면 기본값을 두는 방안도 고려해 주세요.

-    val isOnCampus: Boolean,
+    val isOnCampus: Boolean = false,

프론트/문서(Swagger) 반영 일정도 함께 확인 부탁드립니다.

presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (1)

151-173: 업데이트 API에 isOnCampus 없음 — 정책 확인

UpdateExperimentPostUseCase.Input/매퍼에도 isOnCampus가 없습니다. 수정 불가 정책인지 확인 부탁드립니다. 수정 가능이라면 필드/매핑 추가가 필요합니다.

원하시면 관련 테스트 케이스도 함께 보강해 드리겠습니다.

application/src/test/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCaseTest.kt (1)

171-203: isOnCampus 의미론 테스트 추가 제안

ONLINE 설정 시(isOnCampus=true/false 조합 등) 허용/금지 규칙이 있다면 별도 테스트로 명시해 주세요. 현재는 “온라인+지역 정보”만 검증 중입니다.

원하시면 케이스 초안 드리겠습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 56fb90a and c6b7ec3.

📒 Files selected for processing (7)
  • application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt (2 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCaseTest.kt (3 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostApplyMethodUseCaseTest.kt (1 hunks)
  • domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt (3 hunks)
  • infrastructure/src/main/kotlin/com/dobby/persistence/entity/experiment/ExperimentPostEntity.kt (3 hunks)
  • presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/CreateExperimentPostRequest.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (7)
application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostApplyMethodUseCaseTest.kt (1)

55-55: LGTM: 테스트 픽스처에 isOnCampus 추가 적절

목표 검증 대상(applyMethod)과 독립적이며, 도메인 생성자 변경을 정확히 반영했습니다.

presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (1)

56-56: LGTM: 생성 입력 매핑에 isOnCampus 전달 추가

CreateExperimentPostUseCase.Input으로 정확히 전달됩니다.

application/src/test/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCaseTest.kt (1)

69-69: LGTM: 생성 유즈케이스 입력에 isOnCampus 추가 적절

세 시나리오 모두 입력 스키마 변경을 정확히 반영했습니다.

Also applies to: 135-135, 193-193

application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt (1)

120-121: 검증 완료: newExperimentPostisOnCampus 파라미터가 포함되어 있어 전달 로직에 문제가 없습니다.

infrastructure/src/main/kotlin/com/dobby/persistence/entity/experiment/ExperimentPostEntity.kt (3)

144-144: toDomain 매핑 적합

엔티티 → 도메인 매핑에 isOnCampus가 누락 없이 전달됩니다.


173-173: fromDomain 매핑 적합

도메인 → 엔티티 매핑에도 isOnCampus가 일관되게 포함됩니다.


73-75: 엔티티 필드 isOnCampus non-nullable 전환 권장 및 필터/정렬 사용 여부 재검증 필요

  • Boolean? 대신 Boolean + nullable = false 전환을 위해 백필(backfill) → NOT NULL 계획 수립
  • 향후 조회·필터·정렬 시 애매모호성 제거를 위해 인덱스 추가 고려
  • 레포지토리·쿼리에서 해당 필드(isOnCampus)로 실제 필터링·정렬 사용 여부를 수동으로 재검증하세요
-    @Column(name = "is_on_campus")
-    var isOnCampus: Boolean?,
+    @Column(name = "is_on_campus", nullable = false)
+    var isOnCampus: Boolean,

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostDetailForUpdateUseCaseTest.kt (1)

63-63: 수정용 상세 DTO에도 isOnCampus 검증 라인 추가

수정 화면에서의 노출/바인딩을 보장하기 위해 assertion을 포함해 주세요.

추가 예:

result.experimentPostDetail.isOnCampus shouldBe true
application/src/test/kotlin/com/dobby/usecase/member/email/SendMatchingEmailUseCaseTest.kt (1)

183-189: 예외 단언 방식 재검토 필요

shouldThrow<EmailDomainNotFoundException>로 이미 타입이 검증되므로 exception shouldBe EmailDomainNotFoundException 비교는 중복이거나, 예외가 object가 아닌 class라면 실패합니다. 아래처럼 메시지나 필드 검증으로 바꾸는 것을 권장합니다.

val ex = shouldThrow<EmailDomainNotFoundException> {
    runBlocking { sendMatchingEmailUseCase.execute(input) }
}
// ex.message shouldContain "유효하지 않은 이메일 도메인"
application/src/test/kotlin/com/dobby/usecase/experiment/GetMyExperimentPostsUseCaseTest.kt (1)

131-150: 목록 응답에 isOnCampus 포함 여부 검증 추가 고려

PR 목적이 “공고 목록 조회 시 ‘교내 실험 여부’ 추가”라면, 해당 UseCase/DTO가 이 필드를 노출하는지 단언을 추가해 주세요(현재는 title/content/views/recruitStatus만 확인).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c6b7ec3 and 2aaf346.

📒 Files selected for processing (7)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostDetailForUpdateUseCaseTest.kt (1 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostDetailUseCaseTest.kt (1 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCaseTest.kt (5 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetMyExperimentPostsUseCaseTest.kt (3 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostRecruitStatusUseCaseTest.kt (2 hunks)
  • application/src/test/kotlin/com/dobby/usecase/member/email/GetMatchingExperimentPostsUseCaseTest.kt (1 hunks)
  • application/src/test/kotlin/com/dobby/usecase/member/email/SendMatchingEmailUseCaseTest.kt (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (4)
application/src/test/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostRecruitStatusUseCaseTest.kt (1)

57-57: isOnCampus 필드 반영 OK

도메인 변경에 맞춘 테스트 픽스가 일관됩니다.

Also applies to: 114-114

application/src/test/kotlin/com/dobby/usecase/member/email/SendMatchingEmailUseCaseTest.kt (1)

99-99: isOnCampus 필드 반영 OK

생성자 인자 업데이트가 적절합니다.

Also applies to: 168-168

application/src/test/kotlin/com/dobby/usecase/member/email/GetMatchingExperimentPostsUseCaseTest.kt (1)

79-79: isOnCampus 필드 반영 OK

데이터 클래스 동등성 비교에 포함되어 간접적으로도 검증됩니다.

application/src/test/kotlin/com/dobby/usecase/experiment/GetMyExperimentPostsUseCaseTest.kt (1)

63-63: isOnCampus 필드 반영 OK

테스트 픽스가 일관되며 다른 필드와 충돌 없습니다.

Also applies to: 91-91, 117-117

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2aaf346 and 9f52042.

📒 Files selected for processing (3)
  • application/src/main/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCase.kt (2 hunks)
  • domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt (3 hunks)
  • infrastructure/src/main/kotlin/com/dobby/persistence/entity/experiment/ExperimentPostEntity.kt (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt
  • infrastructure/src/main/kotlin/com/dobby/persistence/entity/experiment/ExperimentPostEntity.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (1)
application/src/main/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCase.kt (1)

86-86: 도메인 → 출력 매핑 LGTM

post.isOnCampusPostInfoOutput.isOnCampus로 전달하는 매핑이 정확합니다.

@chock-cho
Copy link
Member Author

해당 작업은 일정 지연 이슈로 선 머지 후 리뷰해주시면 감사하겠습니다. 🙇‍♀️

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (1)

100-119: isOnCampus 값이 도메인 update에 전달되지 않아 실제로 수정되지 않습니다

Input과 Mapper에서 받아온 값을 existingPost.update(...) 호출에 넘기지 않아 변경이 반영되지 않습니다.

아래와 같이 넘겨 주세요(도메인 시그니처가 지원한다는 전제):

         val experimentPost = existingPost.update(
             applyMethod = applyMethod,
             targetGroup = targetGroup,
             title = input.title,
             reward = input.reward,
             startDate = input.startDate,
             endDate = input.endDate,
             content = input.content,
             count = input.count,
             leadResearcher = input.leadResearcher,
             detailedAddress = input.detailedAddress,
             matchType = input.matchType,
+            isOnCampus = input.isOnCampus,
             place = input.place,
             region = input.region,
             area = input.area,
             timeRequired = input.timeRequired,
             imageListInfo = input.imageListInfo?.images,
             recruitStatus = input.recruitStatus,
             idGenerator = idGenerator
         )

도메인 메서드가 isOnCampus 파라미터를 받는지 확인:

#!/bin/bash
rg -nC3 'fun\s+update\s*\(' domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt
rg -nC2 '\bisOnCampus\b' domain/src/main/kotlin/com/dobby/model/experiment/ExperimentPost.kt

원하시면 isOnCampus 업데이트 케이스를 검증하는 단위테스트도 추가해 드리겠습니다.

🧹 Nitpick comments (3)
presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/UpdateExperimentPostRequest.kt (1)

22-22: 업데이트 DTO에서만 isOnCampus가 비nullable(필수)인 점 재검토 제안

다른 필드들은 대부분 nullable인데 isOnCampus만 필수이면 부분 업데이트(패치) 철학과 어긋나고, 구(舊) 클라이언트가 값을 누락하면 400이 날 수 있습니다. 의도라면 OK, 아니라면 nullable로 전환을 권장합니다.

다음과 같이 변경을 고려해 주세요:

-    val isOnCampus: Boolean,
+    val isOnCampus: Boolean? = null,

다음 스크립트로 업데이트 엔드포인트 테스트/컨트롤러에서 새 필드가 누락 없이 전달되는지 확인해 주세요.

#!/bin/bash
rg -nC2 'UpdateExperimentPostRequest\('
rg -nC2 '\bisOnCampus\b' presentation | sed -n '1,200p'
application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (1)

36-36: Update.Input에서도 isOnCampus의 nullable 전환 고려

부분 업데이트 일관성을 위해 Boolean?로 두고 null이면 보존, 값이 있으면 변경하는 패턴을 권장합니다(요청 DTO 변경 시 함께 정합 필요).

-        val isOnCampus: Boolean,
+        val isOnCampus: Boolean?,
presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (1)

143-150: 업데이트 응답 매핑 OK + 가독성 순서 니트픽

네이밍 인자라 기능엔 문제 없으나, views 바로 다음에 isOnCampus를 배치하면 파일 전반의 필드 순서와 더 일관됩니다.

-            durationInfo = DurationInfo(
-                startDate = input.durationInfo?.startDate,
-                endDate = input.durationInfo?.endDate
-            ),
-            isOnCampus = input.isOnCampus,
+            isOnCampus = input.isOnCampus,
+            durationInfo = DurationInfo(
+                startDate = input.durationInfo?.startDate,
+                endDate = input.durationInfo?.endDate
+            ),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f52042 and 0e26473.

📒 Files selected for processing (5)
  • application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt (4 hunks)
  • application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (3 hunks)
  • presentation/src/main/kotlin/com/dobby/api/dto/request/experiment/UpdateExperimentPostRequest.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (1)

73-73: 응답 경로에 isOnCampus 노출 매핑 적절합니다

PostInfo.isOnCampus 추가 및 updatedPost.isOnCampus 매핑 모두 일관됩니다.

Also applies to: 127-127

presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1)

8-8: 응답 스키마에 isOnCampus 추가 OK

리스트/생성 응답에 필요한 필드로 보이며 매퍼들과 일관됩니다. 서버 관점 문제 없습니다.

presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (4)

56-57: 생성 입력으로 isOnCampus 전달 OK

Create 플로우 인입 매핑 정상입니다.


101-106: 생성 응답에 isOnCampus 매핑 OK

응답 DTO와 시그니처가 일치합니다.


153-175: 업데이트 입력으로 isOnCampus 전달 OK — 다만 UseCase에서 실제 반영 누락

Mapper는 값을 잘 넘기지만, UseCase의 existingPost.update(...) 호출에 전달이 빠져 있어 현재는 효과가 없습니다(동일 PR 내 다른 코멘트 참조).

UseCase 수정 후 여기서 전달되는 값이 실제 저장까지 이어지는지 통합 테스트로 확인 부탁드립니다.


399-405: 목록 응답에 isOnCampus 포함 OK

리스트 아이템 PostInfo에 반영되어 목표(PR 목적)와 부합합니다.

@chock-cho chock-cho merged commit 2448214 into dev Sep 7, 2025
4 checks passed
@chock-cho chock-cho deleted the feature/YS-505 branch September 7, 2025 09:32
chock-cho added a commit that referenced this pull request Oct 21, 2025
* feat: add isOnCampus field to create new experiment posts

* feat: add isOnCampus field in ExperimentPostEntity

* feat: add isOnCampus value on presentation layer

* fix: fix failed test cases

* feat: revise isOnCampus field nullable to non-nullable

* feature: add isOnCampus field in updateExperimentPost
chock-cho added a commit that referenced this pull request Oct 21, 2025
* feat: add isOnCampus field to create new experiment posts

* feat: add isOnCampus field in ExperimentPostEntity

* feat: add isOnCampus value on presentation layer

* fix: fix failed test cases

* feat: revise isOnCampus field nullable to non-nullable

* feature: add isOnCampus field in updateExperimentPost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ FEATURE 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants