Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat#195 글/댓글 신고 추가 #202

Merged
merged 6 commits into from
Jul 14, 2024
Merged

Feat#195 글/댓글 신고 추가 #202

merged 6 commits into from
Jul 14, 2024

Conversation

MinYeongPark
Copy link
Member

@MinYeongPark MinYeongPark commented Jun 2, 2024

  • 글 신고
  • 댓글 신고

추가했습니다!

+) 이 과정에서 신고 카테고리를 담는 report_category 테이블이 DB에 추가로 생성되었습니다!

(근데 가끔씩 신고 api 실행할 때마다 report 테이블에 content랑 category 컬럼이 자동으로 생성되는데
(현재는 필요 없는데 예전에 존재했었던 컬럼)
이 부분은 나중에 자세히 해결해보겠습니다..!!)

@MinYeongPark MinYeongPark requested review from jjjuhoon and ls-rain June 2, 2024 10:52
@MinYeongPark MinYeongPark self-assigned this Jun 2, 2024
@MinYeongPark MinYeongPark requested a review from pswoo0323 June 3, 2024 14:23
Copy link
Collaborator

@ls-rain ls-rain left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@Builder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public class ReportCategory {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Enum을 사용하지 않고 클래스로 사용한 이유가 궁금합니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

실은 큰 차이는 없지만..

이전에 글(post) 관련해서도 category 엔티티를 사용해서 DB에 미리 항목을 저장해두고 관리했었는데,
신고 카테고리도 DB에서 직접 항목을 관리하는 식으로 통일하는 게 좋을 것 같아 엔티티로 만들었습니다!

카테고리 이름이나 종류에 변화가 필요할 때
enum으로 관리하면 코드를 수정한 후에 빌드를 다시 해야 하는데,
DB에다가 관리하면 테이블 내용만 수정해주면 바로 반영되어서 더 유동적인 느낌인 것 같다고 생각했습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

유지보수에 용이하다는 뜻이군요! 감사합니다 ㅎㅎ!

@MinYeongPark
Copy link
Member Author

Elastic Beanstalk 동작 확인 용으로 이 PR 닫겠습니다!

@MinYeongPark MinYeongPark merged commit 601337b into develop Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants