Skip to content

Commit

Permalink
feat: Bookmark Builder 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Apr 20, 2024
1 parent 562a2df commit a18ca80
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}

0 comments on commit a18ca80

Please sign in to comment.