Skip to content

refactor: 스탬프 마감일 필드 제거 및 리팩토링(#50)#51

Merged
hisonghy merged 1 commit intodevelopfrom
refactor/50
Aug 11, 2025
Merged

refactor: 스탬프 마감일 필드 제거 및 리팩토링(#50)#51
hisonghy merged 1 commit intodevelopfrom
refactor/50

Conversation

@hisonghy
Copy link
Contributor

📌 작업 내용 및 특이사항

✅ 스탬프 엔티티 마감일(deadline) 필드 제거

  • 요구사항에 따라 스탬프 엔티티의 마감일(deadline) 필드를 제거했습니다.

✅ 스탬프 마감일 관련 로직 리팩토링

  • StampFactory 클래스에서 스탬프를 생성하는 create() 메서드의 매개변수에서 deadline을 제거했습니다.
  • StampPolicy 클래스에서 스탬프의 마감일을 검증하는 validateStampDeadline() 메서드를 제거했습니다.
  • StampErrorCode 이넘 클래스에서 스탬프의 마감일의 과거 에러코드와 여행 마감일과 비교해 과거일 경우 에러코드를 제거했습니다.
  • StampService.updateStampNameAndDeadline() 메서드를 updateStampName()으로 변경하고, 로직을 리팩토링 했습니다.
  • StampService.createStamp(), StampService.createStamps() 메서드에서 스탬프 마감일을 검증하는 로직을 제거했습니다.
  • 특정 여행의 ID로 스탬프 목록을 조회하고 마감일(deadline) 필드로 오름차순 정렬하는 쿼리 메서드StampRepository.findAllByTripIdOrderByDeadlineAsc()findAllByTripIdOrderByCreatedAtAsc()로 변경해 생성일 필드를 기준으로 오름차순 정렬해 조회되도록 리팩토링했습니다.
  • 스탬프 생성 시 요청하는 CreateStampRequest 요청 DTO의 deadline 필드를 제거했습니다.
  • 스탬프 수정 시 요청하는 UpdateStampNameAndDeadlineRequest 요청 DTO의 이름을 UpdateStampRequest로 수정하고 deadline 필드를 제거했습니다.
  • LoadStampDetailResponse, LoadStampInfoResponse 응답 DTO의 deadline 필드를 제거했습니다.
  • application.dto StampInfo 클래스의 deadline 필드를 제거했습니다.

✅ 스탬프 마감일 관련 테스트 코드 수정

  • StampFixture 클래스의 마감일 관련 코드를 제거했습니다.
  • CreateStampRequestFixture, UpdateStampRequestFixture 클래스에서 deadline 필드를 제거했습니다.
  • StampServiceTest에서 스탬프 마감일 관련 검증 테스트 코드를 제거했습니다.
  • StampController, TripController 통합 테스트에서 스탬프 마감일 관련 예외 테스트 코드를 제거했습니다.

🌱 관련 이슈


🔍 참고사항(선택)


📚 기타(선택)

@hisonghy hisonghy self-assigned this Aug 11, 2025
@hisonghy hisonghy added the 🪄refactor 기능 개선 및 리팩토링 label Aug 11, 2025
* refactor: Stamp deadline 필드 제거
* refactor: StampService createStamp(), createStamps(), updateStampNameAndDeadline() 메서드 리팩토링
* refactor: StampRepository findAllByTripIdOrderByDeadlineAsc() 메서드 리팩토링
* refactor: StampFactory create() 메서드 리팩토링
* refactor: StampPolicy validateStampDeadline() 메서드 제거
* refactor: StampErrorCode deadline 관련 에러코드 제거
* refactor: CreateStampRequest, UpdateStampRequest 요청 DTO deadline 필드 제거
* refactor: LoadStampDetailResponse, LoadStampInfoResponse 응답 DTO deadline 필드 제거
* refactor: StampInfo deadline 필드 제거

* test: StampFixture 클래스 deadline 필드 제거
* test: CreateStampRequestFixture 클래스 deadline 필드 제거 및 리팩토링
* test: StampService 단위 테스트에서 스탬프 마감일 관련 테스트 제거
* test: TripController, StampController 통합 테스트에서 스탬프 마감일 관련 테스트 제거
Copy link
Contributor

@chaiminwoo0223 chaiminwoo0223 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다. 머지 부탁드립니다!

@hisonghy hisonghy merged commit ce4468c into develop Aug 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪄refactor 기능 개선 및 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🪄[REFACTOR]: 스탬프 엔티티 마감일 필드 제거

2 participants