|
|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
|
|
public class PaperDto {
|
|
|
|
public class PaperDto {
|
|
|
|
|
|
|
|
private final Integer id;
|
|
|
|
private final String title;
|
|
|
|
private final String title;
|
|
|
|
private final Paper.PaperStatus status;
|
|
|
|
private final Paper.PaperStatus status;
|
|
|
|
private final Date createDate;
|
|
|
|
private final Date createDate;
|
|
|
@ -18,13 +19,15 @@ public class PaperDto {
|
|
|
|
private final Date fileCreateDate;
|
|
|
|
private final Date fileCreateDate;
|
|
|
|
|
|
|
|
|
|
|
|
@JsonCreator
|
|
|
|
@JsonCreator
|
|
|
|
public PaperDto(@JsonProperty("title") String title,
|
|
|
|
public PaperDto(@JsonProperty("id") Integer id,
|
|
|
|
|
|
|
|
@JsonProperty("title") String title,
|
|
|
|
@JsonProperty("status") Paper.PaperStatus status,
|
|
|
|
@JsonProperty("status") Paper.PaperStatus status,
|
|
|
|
@JsonProperty("createDate") Date createDate,
|
|
|
|
@JsonProperty("createDate") Date createDate,
|
|
|
|
@JsonProperty("updateDate") Date updateDate,
|
|
|
|
@JsonProperty("updateDate") Date updateDate,
|
|
|
|
@JsonProperty("comment") String comment,
|
|
|
|
@JsonProperty("comment") String comment,
|
|
|
|
@JsonProperty("locked") Boolean locked,
|
|
|
|
@JsonProperty("locked") Boolean locked,
|
|
|
|
@JsonProperty("tmpFileName") String tmpFileName) {
|
|
|
|
@JsonProperty("tmpFileName") String tmpFileName) {
|
|
|
|
|
|
|
|
this.id = id;
|
|
|
|
this.title = title;
|
|
|
|
this.title = title;
|
|
|
|
this.status = status;
|
|
|
|
this.status = status;
|
|
|
|
this.createDate = createDate;
|
|
|
|
this.createDate = createDate;
|
|
|
@ -38,6 +41,7 @@ public class PaperDto {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PaperDto(Paper paper) {
|
|
|
|
public PaperDto(Paper paper) {
|
|
|
|
|
|
|
|
this.id = paper.getId();
|
|
|
|
this.title = paper.getTitle();
|
|
|
|
this.title = paper.getTitle();
|
|
|
|
this.status = paper.getStatus();
|
|
|
|
this.status = paper.getStatus();
|
|
|
|
this.createDate = paper.getCreateDate();
|
|
|
|
this.createDate = paper.getCreateDate();
|
|
|
@ -45,9 +49,13 @@ public class PaperDto {
|
|
|
|
this.comment = paper.getComment();
|
|
|
|
this.comment = paper.getComment();
|
|
|
|
this.locked = paper.getLocked();
|
|
|
|
this.locked = paper.getLocked();
|
|
|
|
this.tmpFileName = null;
|
|
|
|
this.tmpFileName = null;
|
|
|
|
this.fileId = paper.getFile() == null ? null : paper.getFile().getId();
|
|
|
|
this.fileId = paper.getFileData() == null ? null : paper.getFileData().getId();
|
|
|
|
this.fileName = paper.getFile() == null ? null : paper.getFile().getName();
|
|
|
|
this.fileName = paper.getFileData() == null ? null : paper.getFileData().getName();
|
|
|
|
this.fileCreateDate = paper.getFile() == null ? null : paper.getFile().getCreateDate();
|
|
|
|
this.fileCreateDate = paper.getFileData() == null ? null : paper.getFileData().getCreateDate();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Integer getId() {
|
|
|
|
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
public String getTitle() {
|
|
|
|