67 lines
1.4 KiB
Java
67 lines
1.4 KiB
Java
package pl.edu.amu.wmi.bookapi.models;
|
|
|
|
import org.springframework.data.annotation.Id;
|
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
|
|
import java.util.Date;
|
|
|
|
@Document
|
|
public class MessageDocument {
|
|
@Id
|
|
private String id;
|
|
|
|
private String author;
|
|
private String recipient;
|
|
private Date createdAt;
|
|
private String content;
|
|
private String threadId;
|
|
|
|
public MessageDocument(String author, String recipient, Date createdAt, String content, String threadId) {
|
|
this.author = author;
|
|
this.recipient = recipient;
|
|
this.createdAt = createdAt;
|
|
this.content = content;
|
|
this.threadId = threadId;
|
|
}
|
|
|
|
public String getAuthor() {
|
|
return author;
|
|
}
|
|
|
|
public void setAuthor(String author) {
|
|
this.author = author;
|
|
}
|
|
|
|
public String getRecipient() {
|
|
return recipient;
|
|
}
|
|
|
|
public void setRecipient(String recipient) {
|
|
this.recipient = recipient;
|
|
}
|
|
|
|
public Date getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(Date createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public String getContent() {
|
|
return content;
|
|
}
|
|
|
|
public void setContent(String content) {
|
|
this.content = content;
|
|
}
|
|
|
|
public String getThreadId() {
|
|
return threadId;
|
|
}
|
|
|
|
public void setThreadId(String threadId) {
|
|
this.threadId = threadId;
|
|
}
|
|
}
|