-
Notifications
You must be signed in to change notification settings - Fork 65
/
BlogPost.java
44 lines (36 loc) · 1019 Bytes
/
BlogPost.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.shardis.api.domain.blog;
import com.shardis.api.domain.base.AuditedEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* Created by Tomasz Kucharzyk
*/
@Entity
@Table(name = "BLOG_POST")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class BlogPost extends AuditedEntity {
private String title;
private String content;
public BlogPost(String title, String content) {
this.title = title;
this.content = content;
}
@Override
public String toString() {
return "BlogPost{" +
"id=" + id +
", createdDate=" + createdDate +
", createdBy=" + createdBy +
", updatedDate=" + updatedDate +
", updatedBy=" + updatedBy +
", version=" + version +
", title='" + title + '\'' +
", content='" + content + '\'' +
'}';
}
}