|
|
@ -30,6 +30,7 @@ public class PaperDto {
|
|
|
|
@NotEmpty
|
|
|
|
@NotEmpty
|
|
|
|
private List<Deadline> deadlines = new ArrayList<>();
|
|
|
|
private List<Deadline> deadlines = new ArrayList<>();
|
|
|
|
private String comment;
|
|
|
|
private String comment;
|
|
|
|
|
|
|
|
private String url;
|
|
|
|
private Boolean locked;
|
|
|
|
private Boolean locked;
|
|
|
|
private List<FileDataDto> files = new ArrayList<>();
|
|
|
|
private List<FileDataDto> files = new ArrayList<>();
|
|
|
|
private Set<Integer> authorIds;
|
|
|
|
private Set<Integer> authorIds;
|
|
|
@ -48,6 +49,7 @@ public class PaperDto {
|
|
|
|
@JsonProperty("updateDate") Date updateDate,
|
|
|
|
@JsonProperty("updateDate") Date updateDate,
|
|
|
|
@JsonProperty("deadlines") List<Deadline> deadlines,
|
|
|
|
@JsonProperty("deadlines") List<Deadline> deadlines,
|
|
|
|
@JsonProperty("comment") String comment,
|
|
|
|
@JsonProperty("comment") String comment,
|
|
|
|
|
|
|
|
@JsonProperty("url") String url,
|
|
|
|
@JsonProperty("locked") Boolean locked,
|
|
|
|
@JsonProperty("locked") Boolean locked,
|
|
|
|
@JsonProperty("files") List<FileDataDto> files,
|
|
|
|
@JsonProperty("files") List<FileDataDto> files,
|
|
|
|
@JsonProperty("authorIds") Set<Integer> authorIds,
|
|
|
|
@JsonProperty("authorIds") Set<Integer> authorIds,
|
|
|
@ -59,6 +61,7 @@ public class PaperDto {
|
|
|
|
this.updateDate = updateDate;
|
|
|
|
this.updateDate = updateDate;
|
|
|
|
this.deadlines = deadlines;
|
|
|
|
this.deadlines = deadlines;
|
|
|
|
this.comment = comment;
|
|
|
|
this.comment = comment;
|
|
|
|
|
|
|
|
this.url = url;
|
|
|
|
this.locked = locked;
|
|
|
|
this.locked = locked;
|
|
|
|
this.files = files;
|
|
|
|
this.files = files;
|
|
|
|
this.authors = authors;
|
|
|
|
this.authors = authors;
|
|
|
@ -72,6 +75,7 @@ public class PaperDto {
|
|
|
|
this.updateDate = paper.getUpdateDate();
|
|
|
|
this.updateDate = paper.getUpdateDate();
|
|
|
|
this.deadlines = paper.getDeadlines();
|
|
|
|
this.deadlines = paper.getDeadlines();
|
|
|
|
this.comment = paper.getComment();
|
|
|
|
this.comment = paper.getComment();
|
|
|
|
|
|
|
|
this.url = paper.getUrl();
|
|
|
|
this.locked = paper.getLocked();
|
|
|
|
this.locked = paper.getLocked();
|
|
|
|
this.files = convert(paper.getFiles(), FileDataDto::new);
|
|
|
|
this.files = convert(paper.getFiles(), FileDataDto::new);
|
|
|
|
this.authorIds = convert(paper.getAuthors(), user -> user.getId());
|
|
|
|
this.authorIds = convert(paper.getAuthors(), user -> user.getId());
|
|
|
@ -166,6 +170,14 @@ public class PaperDto {
|
|
|
|
this.authorIds = authorIds;
|
|
|
|
this.authorIds = authorIds;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
|
|
|
|
return url;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setUrl(String url) {
|
|
|
|
|
|
|
|
this.url = url;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getAuthorsString() {
|
|
|
|
public String getAuthorsString() {
|
|
|
|
return StringUtils.abbreviate(authors
|
|
|
|
return StringUtils.abbreviate(authors
|
|
|
|
.stream()
|
|
|
|
.stream()
|
|
|
|