[BE] feat: Festival 엔티티 startDate, endDate 필드 FestivalDuration 값 타입 변경 및 thumbnail 필드명 변경 (#880) #881
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 관련 이슈
✨ PR 세부 내용
Festival
엔티티의startDate
,endDate
필드를 더 명확한 의미를 가지는festivalDuration
필드로 변경했습니다.그에따라 축제의 기간을 검증하는 메서드도
festivalDuration
으로 옮겨졌고, Festival 엔티티는 해당 로직을festivalDuration
필드에 위임하여 실행합니다.isBeforeStartDate()
메서드 명을isStartDateBeforeTo()
변경했는데, 테스트 코드를 작성하니 해당 메서드 명이 인자로 넘어오는 LocalDate가 startDate 이전인지 확인하는 메서드 같더군요. 😂따라서 헷갈리지 않고, 명확한 의미를 가지도록
isStartDateBeforeTo()
로 이름을 변경했습니다.검증 로직을
FestivalDuration
클래스로 위임하니,Festival
엔티티는 크게 하는 일이 없네요.또한 기존에 사용되던
thubnail
필드를posterImageUrl
으로 변경했습니다.필드명이 바뀜에 따라 사용중이던
QueryRepository
에도 영향이 많이 가네요. 😂언젠가 해야했던 일인지라.. 빨리 변경하는게 좋을 것 같습니다.