diff options
Diffstat (limited to 'src/main/java/com/blog/web/models/Article.java')
| -rw-r--r-- | src/main/java/com/blog/web/models/Article.java | 80 |
1 files changed, 76 insertions, 4 deletions
diff --git a/src/main/java/com/blog/web/models/Article.java b/src/main/java/com/blog/web/models/Article.java index 049b04c..02c8abf 100644 --- a/src/main/java/com/blog/web/models/Article.java +++ b/src/main/java/com/blog/web/models/Article.java @@ -11,10 +11,6 @@ import org.hibernate.annotations.UpdateTimestamp; import java.time.LocalDateTime; -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder @Entity public class Article { @Id @@ -30,4 +26,80 @@ public class Article { @ManyToOne @JoinColumn(name = "created_by", nullable = false) private UserEntity createdBy; + + public Article( + Long id, + String title, + String photoUrl, + String content, + UserEntity createdBy, + LocalDateTime createdOn, + LocalDateTime updatedOn + ) { + this.id = id; + this.title = title; + this.photoUrl = photoUrl; + this.content = content; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.updatedOn = updatedOn; + } + + public Article() {}; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getPhotoUrl() { + return photoUrl; + } + + public void setPhotoUrl(String photoUrl) { + this.photoUrl = photoUrl; + } + + public LocalDateTime getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(LocalDateTime createdOn) { + this.createdOn = createdOn; + } + + public LocalDateTime getUpdatedOn() { + return updatedOn; + } + + public void setUpdatedOn(LocalDateTime updatedOn) { + this.updatedOn = updatedOn; + } + + public UserEntity getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(UserEntity createdBy) { + this.createdBy = createdBy; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } } |
