From a18ca80ab8994f5f3ed967f86168cf9b2f8a066c Mon Sep 17 00:00:00 2001 From: yeonjy Date: Sun, 21 Apr 2024 03:11:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Bookmark=20Builder=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/bookmark/entity/Bookmark.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/entity/Bookmark.java b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/entity/Bookmark.java index d0314627..6af1d02f 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/entity/Bookmark.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/entity/Bookmark.java @@ -5,9 +5,11 @@ import com.rollthedice.backend.global.config.BaseTimeEntity; import jakarta.persistence.*; import lombok.AccessLevel; +import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; + @Getter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) @@ -23,4 +25,10 @@ public class Bookmark extends BaseTimeEntity { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "news_id") private News news; + + @Builder + public Bookmark(Member member, News news) { + this.member = member; + this.news = news; + } }