Skip to content

[4주차] 최유찬 /[feat] 추가 API 구현#159

Open
ruchan04 wants to merge 1 commit intoLeets-Official:최유찬/mainfrom
ruchan04:최유찬/4주차

Hidden character warning

The head ref may contain hidden characters: "\ucd5c\uc720\ucc2c/4\uc8fc\ucc28"
Open

[4주차] 최유찬 /[feat] 추가 API 구현#159
ruchan04 wants to merge 1 commit intoLeets-Official:최유찬/mainfrom
ruchan04:최유찬/4주차

Conversation

@ruchan04
Copy link
Copy Markdown

@ruchan04 ruchan04 commented Apr 28, 2026

1. 과제 요구사항 중 구현한 내용

  • 게시물 신고 시스템 구축
  • 게시물 중복 신고 방지
  • 게시물 상태 ACTIVE에서 HIDDEN으로 변경

2. 핵심 변경 사항

Report (신고 엔티티)
reporterId와 targetId를 필드로 가지며, 생성 시 기본 상태는 PENDING으로 설정됩니다.

Service: reportRepository를 호출하여 이미 존재하는 신고인 경우 예외를 발생시켜 데이터 중복을 차단합니다.

Post (게시글 엔티티 & 서비스)
status 필드를 통해 게시글의 현재 상태를 추적합니다.

Service: hidePost() 메서드를 통해 특정 게시글의 상태를 HIDDEN으로 안전하게 변경합니다

3. 실행 및 검증 결과

게시글 숨김
4주차 게시글숨김

게시글 신고
4주차 신고요청

게시글 중복신고
4주차 중복신고

4. 완료 사항

  1. 게시글 신고 기능 구현
  2. 유저를 통한 게시글 숨김 기능 구현
  3. 신고 처리 및 상태 변경

5. 추가 사항

제출 체크리스트

  • PR 제목이 규칙에 맞다
  • base가 {이름}/main 브랜치다
  • compare가 {이름}/{숫자}주차 브랜치다
  • 프로젝트가 정상 실행된다
  • 본인을 Assignee로 지정했다
  • 파트 담당 Reviewer를 지정했다
  • 리뷰 피드백을 반영한 뒤 머지/PR close를 진행한다

Reviewer 참고

@ruchan04 ruchan04 changed the title feat: 신고 시스템 및 게시글 숨김, 댓글 채택 기능 구현 [4주차] 최유찬 /[feat] 추가 API 구현 Apr 28, 2026
@ruchan04 ruchan04 self-assigned this Apr 28, 2026
@ruchan04 ruchan04 requested a review from a team April 28, 2026 14:07
Copy link
Copy Markdown

@yeonjuncho yeonjuncho left a comment

Choose a reason for hiding this comment

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

👍 고생하셨습니다!
user의 column에서 length를 전반적으로 사이즈를 줄이셨는데 이유가 무엇일까요?

private Long id;

private Long reporterId; // 신고자 ID
private Long targetId; // 게시물 또는 댓글 ID
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

나중에 게시글(targetId = 1)이나 댓글(targetId=1)로 신고가 들어왔을 경우에 중복되는 문제가 생길 수도 있을 것 같습니다..! 따로 targetType을 지정해서 Post에 대한 신고인지, Comment에 대한 신고인지 구분해 놓으면 위 문제를 방지할 수 있을 것 같습니다. 고생하셨습니다! 💊

Comment on lines +8 to +11
public enum PostStatus {
ACTIVE("활성화"),
HIDDEN("숨김");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

과제에서 요구한 내용 명확하게 잘 구현하신 것 같습니다. 고생 많으셨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants