-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocuments.java
53 lines (41 loc) · 1.12 KB
/
Documents.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
package org.example.entity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
@Document(collection = "documents")
public class Documents {
@Id
private String id;
private String title;
private String description;
@CreatedDate
private Date createdAt;
@LastModifiedDate
private Date lastUpdatedAt;
@Version
private Long version;
public Documents() {
}
public Documents(String title, String description) {
this.title = title;
this.description = description;
}
public String getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}