Skip to content

Feature/ #42 리뷰 생성, 삭제#71

Merged
heeejinin merged 4 commits intodevfrom
feature/review_customer
Jun 3, 2025
Merged

Feature/ #42 리뷰 생성, 삭제#71
heeejinin merged 4 commits intodevfrom
feature/review_customer

Conversation

@jhroom
Copy link
Copy Markdown
Collaborator

@jhroom jhroom commented Jun 2, 2025

📌 PR 목적 및 내용

  • 예약이 완료 상태인 예약건에 대해서 해당 예약의 고객과 매니저가 서로에게 리뷰를 남기고 삭제 할 수 있는 기능

✏️ 변경 사항

  • 리뷰 중복 요청 방지를 예약id, 작성자id로 구성하였고 db제약에 따른 globalException으로 처리하는 방식으로 했습니다

📸 스크린샷 (선택사항)

  • UI 변경이나 기능 추가 시 스크린샷을 첨부해주세요.

✅ 체크리스트

  • 코드가 정상적으로 동작하나요?
  • 기존 코드와 충돌이 없나요?
  • 테스트를 통과했나요?
  • 문서 업데이트가 필요한가요?

🔗 관련 이슈 (선택사항)

@jhroom jhroom requested a review from SangWJDev June 2, 2025 08:38
@jhroom jhroom added the feature 기능 개발 label Jun 2, 2025
Copy link
Copy Markdown
Collaborator

@SangWJDev SangWJDev left a comment

Choose a reason for hiding this comment

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

수고하셨습니다! 확인 후 수정 부탁드릴게요

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

조회 기능이 빠졌습니다!


@RequiredArgsConstructor
@RestController
@RequestMapping("/api/v1/review")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

URI 코드컨벤션 기준으로 네이밍 부탁드립니다! 복수형 ~

Copy link
Copy Markdown
Collaborator

@heeejinin heeejinin left a comment

Choose a reason for hiding this comment

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

삭제 시, ReviewRepository로 변경이 필요해 보입니다.

입력값 검증을 위한 @Valid 어노테이션 추가와 DTO에 검증 로직 추가 (평점 범위, 필수값 체크 등..)이 있으면 좋을 것 같습니다!

throw new CustomException(ReviewErrorCode.UNAUTHORIZED_REVIEW_ACCESS);
}

reservationRepository.deleteById(reviewId);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

예약 Repository에서 deleteById 메서드를 사용하고 있습니다.
리뷰 Repository로 수정이 필요해 보입니다!


private Long targetId;

private Integer rating;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

기업 답변에서 리뷰는 1~5점으로 점수를 매길 수 있다고 봤었는데 min,max 조건 있어야 할 것 같습니다. 그 외에도 코멘트는 최소 10이상 작성해야한다는 등.. valid 조건 있으면 좋을 것 같습니다!

@heeejinin heeejinin merged commit 0ece121 into dev Jun 3, 2025
2 checks passed
@jhroom jhroom deleted the feature/review_customer branch June 29, 2025 14:12
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.

3 participants