Skip to content

Commit

Permalink
refactor: Boolean 객체 사용 & nullable 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
youngeun-dev committed Sep 10, 2024
1 parent cc5cd97 commit 09b5f15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ public class BoardComment extends BaseEntity {
@Column(nullable = false)
private String content;

@Column(nullable = false)
private Boolean isReport;

public void update(String content) {
this.content = content;
}

public void submitReport() { this.isReport = true; }
public void submitReport() { this.isReport = Boolean.TRUE; }

public void cancelReport() { this.isReport = false; }
public void cancelReport() { this.isReport = Boolean.FALSE; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public BoardComment toBoardCommentEntity(Member member, Board board, String comm
.member(member)
.board(board)
.content(comment)
.isReport(false)
.isReport(Boolean.FALSE)
.build();
}

Expand Down

0 comments on commit 09b5f15

Please sign in to comment.