forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPost.java
58 lines (47 loc) · 1.35 KB
/
Post.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package socialnetworkingservice;
import java.sql.Timestamp;
import java.util.List;
public class Post {
private final String id;
private final String userId;
private final String content;
private final List<String> imageUrls;
private final List<String> videoUrls;
private final Timestamp timestamp;
private final List<String> likes;
private final List<Comment> comments;
public Post(String id, String userId, String content, List<String> imageUrls, List<String> videoUrls, Timestamp timestamp, List<String> likes, List<Comment> comments) {
this.id = id;
this.userId = userId;
this.content = content;
this.imageUrls = imageUrls;
this.videoUrls = videoUrls;
this.timestamp = timestamp;
this.likes = likes;
this.comments = comments;
}
public String getId() {
return id;
}
public String getUserId() {
return userId;
}
public String getContent() {
return content;
}
public List<String> getImageUrls() {
return imageUrls;
}
public List<String> getVideoUrls() {
return videoUrls;
}
public Timestamp getTimestamp() {
return timestamp;
}
public List<String> getLikes() {
return likes;
}
public List<Comment> getComments() {
return comments;
}
}