diff --git a/src/main/java/com/example/blism/domain/Mailbox.java b/src/main/java/com/example/blism/domain/Mailbox.java index db290df..a8f1123 100644 --- a/src/main/java/com/example/blism/domain/Mailbox.java +++ b/src/main/java/com/example/blism/domain/Mailbox.java @@ -38,6 +38,7 @@ public class Mailbox extends BaseTimeEntity { @Builder private Mailbox(Member owner) { this.owner = owner; + this.visibility = 1; } public static Mailbox createMailbox(Member owner) { diff --git a/src/main/java/com/example/blism/service/MemberServiceImpl.java b/src/main/java/com/example/blism/service/MemberServiceImpl.java index 1197c8a..60f3377 100644 --- a/src/main/java/com/example/blism/service/MemberServiceImpl.java +++ b/src/main/java/com/example/blism/service/MemberServiceImpl.java @@ -31,9 +31,7 @@ public Long joinMember(MemberRequestDTO.signupDTO request) { .nickname(request.getNickname()) .build(); - Mailbox newMailbox = Mailbox.builder() - .owner(newMember) - .build(); + Mailbox newMailbox = Mailbox.createMailbox(newMember); memberRepository.save(newMember); mailboxRepository.save(newMailbox);