Skip to content

기능 변경으로 인한 엔티티 수정#17

Merged
sgn07124 merged 2 commits intomainfrom
fix/entity
Aug 2, 2025
Merged

기능 변경으로 인한 엔티티 수정#17
sgn07124 merged 2 commits intomainfrom
fix/entity

Conversation

@sgn07124
Copy link
Owner

@sgn07124 sgn07124 commented Aug 2, 2025

User description

관련 이슈 (Related Issues)


PR Type

Enhancement


Description

  • Comment 엔티티 추가

  • SharedPost 엔티티 및 PostStatus enum 추가

  • ReviewBookmark 엔티티 삭제


Diagram Walkthrough

flowchart LR
  CMT["Comment 엔티티"]
  SP["SharedPost 엔티티"]
  PS["PostStatus enum"]
  ANS["Answer 엔티티"]
  MEM["Member 엔티티"]

  CMT -- "member 연결" --> MEM
  CMT -- "sharedPost 연결" --> SP
  SP -- "answer 연결" --> ANS
  SP -- "member 연결" --> MEM
  SP -- "status 연결" --> PS
Loading

File Walkthrough

Relevant files
Enhancement
Comment.java
댓글 엔티티 추가                                                                                               

src/main/java/com/project/InsightPrep/domain/post/entity/Comment.java

  • 댓글 엔티티 클래스 추가
  • content, member, sharedPost 필드 정의
  • BaseTimeEntity 상속 및 JPA 매핑 설정
+45/-0   
PostStatus.java
PostStatus enum 추가                                                                             

src/main/java/com/project/InsightPrep/domain/post/entity/PostStatus.java

  • 게시글 상태 enum OPEN, RESOLVED 추가
+5/-0     
SharedPost.java
SharedPost 엔티티 추가                                                                               

src/main/java/com/project/InsightPrep/domain/post/entity/SharedPost.java

  • 공유 게시글 엔티티 클래스 추가
  • title, content, answer, member, status 필드 정의
  • BaseTimeEntity 상속 및 JPA 매핑 설정
+56/-0   
Miscellaneous
ReviewBookmark.java
ReviewBookmark 엔티티 삭제                                                                       

src/main/java/com/project/InsightPrep/domain/question/entity/ReviewBookmark.java

  • ReviewBookmark 엔티티 파일 삭제
+0/-28   

@sgn07124 sgn07124 self-assigned this Aug 2, 2025
@sgn07124 sgn07124 added the ✨ Feature 새로운 기능 추가 label Aug 2, 2025
@sgn07124 sgn07124 linked an issue Aug 2, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

github-actions bot commented Aug 2, 2025

PR Reviewer Guide 🔍

(Review updated until commit 1fe3180)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Reserved Table Name

Table 이름 comment은 일부 DBMS에서 예약어로 사용되므로, SQL 문법 오류를 피하기 위해 테이블명을 변경하거나 이스케이프 처리를 고려해주세요.

@Table(name = "comment")
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Default Status Value

status = PostStatus.OPEN 기본값은 Lombok Builder나 JPA 엔티티 생성 시 반영되지 않을 수 있습니다. 빌더 로직에 초기값 설정을 추가하거나 DB 기본값(@ColumnDefault 등)을 지정하는 방안을 검토해주세요.

@Enumerated(EnumType.STRING)
@Column(nullable = false)
private PostStatus status = PostStatus.OPEN;
Input Validation

content 필드에 빈 문자열이 저장되는 것을 방지하기 위해 Bean Validation 어노테이션(@NotBlank)을 추가해보시는 걸 추천드립니다.

@Column(columnDefinition = "TEXT", nullable = false)
private String content;

@github-actions
Copy link

github-actions bot commented Aug 2, 2025

Persistent review updated to latest commit 1fe3180

@sgn07124 sgn07124 merged commit b80e542 into main Aug 2, 2025
3 checks passed
@sgn07124 sgn07124 deleted the fix/entity branch August 17, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review effort 3/5 ✨ Feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

기능 변경으로 인한 엔티티 수정

1 participant