-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
1Week_Mission/mutbooks/src/main/java/com/example/mutbooks/app/post/entity/Post.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.mutbooks.app.post.entity; | ||
|
||
import com.example.mutbooks.app.base.entity.BaseEntity; | ||
import com.example.mutbooks.app.member.entity.Member; | ||
import lombok.*; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.ManyToOne; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@SuperBuilder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Post extends BaseEntity { | ||
private String subject; // 제목 | ||
private String content; // 내용(마크다운 원문) | ||
private String contentHtml; // HTML 내용(토스트에디터의 렌더링 결과) | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
private Member author; // 글쓴이 | ||
} |