|
|
|
@ -6,8 +6,6 @@ import ru.ulstu.activity.api.model.ActivityDto;
|
|
|
|
|
import ru.ulstu.activity.common.model.ScienceGroupMemberDto;
|
|
|
|
|
import ru.ulstu.activity.deadline.model.DeadlineDto;
|
|
|
|
|
import ru.ulstu.activity.file.model.FileDataDto;
|
|
|
|
|
import ru.ulstu.activity.paper.model.PaperDto;
|
|
|
|
|
import ru.ulstu.activity.project.model.ProjectDto;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -25,7 +23,6 @@ public class GrantDto extends ActivityDto {
|
|
|
|
|
private String comment;
|
|
|
|
|
private List<FileDataDto> files = new ArrayList<>();
|
|
|
|
|
private List<Integer> projectIds;
|
|
|
|
|
private Set<Integer> authorIds;
|
|
|
|
|
private Set<ScienceGroupMemberDto> members;
|
|
|
|
|
private Integer leaderId;
|
|
|
|
|
private List<Integer> paperIds = new ArrayList<>();
|
|
|
|
@ -37,22 +34,15 @@ public class GrantDto extends ActivityDto {
|
|
|
|
|
@JsonProperty("deadlines") List<DeadlineDto> deadlines,
|
|
|
|
|
@JsonProperty("comment") String comment,
|
|
|
|
|
@JsonProperty("files") List<FileDataDto> files,
|
|
|
|
|
@JsonProperty("project") ProjectDto project,
|
|
|
|
|
@JsonProperty("authorIds") Set<Integer> authorIds,
|
|
|
|
|
@JsonProperty("members") Set<ScienceGroupMemberDto> members,
|
|
|
|
|
@JsonProperty("leaderId") Integer leaderId,
|
|
|
|
|
@JsonProperty("wasLeader") boolean wasLeader,
|
|
|
|
|
@JsonProperty("hasAge") boolean hasAge,
|
|
|
|
|
@JsonProperty("hasDegree") boolean hasDegree,
|
|
|
|
|
@JsonProperty("paperIds") List<Integer> paperIds,
|
|
|
|
|
@JsonProperty("papers") List<PaperDto> papers) {
|
|
|
|
|
@JsonProperty("paperIds") List<Integer> paperIds) {
|
|
|
|
|
super(id);
|
|
|
|
|
this.title = title;
|
|
|
|
|
this.status = status;
|
|
|
|
|
this.deadlines = deadlines;
|
|
|
|
|
this.comment = comment;
|
|
|
|
|
this.files = files;
|
|
|
|
|
this.authorIds = authorIds;
|
|
|
|
|
this.members = members;
|
|
|
|
|
this.leaderId = leaderId;
|
|
|
|
|
this.paperIds = paperIds;
|
|
|
|
@ -69,7 +59,6 @@ public class GrantDto extends ActivityDto {
|
|
|
|
|
this.deadlines = convert(grant.getDeadlines(), DeadlineDto::new);
|
|
|
|
|
this.comment = grant.getComment();
|
|
|
|
|
this.files = convert(grant.getFiles(), FileDataDto::new);
|
|
|
|
|
this.authorIds = convert(grant.getAuthors(), user -> user.getId());
|
|
|
|
|
this.members = convert(grant.getAuthors(), ScienceGroupMemberDto::new);
|
|
|
|
|
this.leaderId = grant.getLeader().getId();
|
|
|
|
|
this.paperIds = convert(grant.getPapers(), paper -> paper.getId());
|
|
|
|
@ -126,14 +115,6 @@ public class GrantDto extends ActivityDto {
|
|
|
|
|
this.files = files;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Set<Integer> getAuthorIds() {
|
|
|
|
|
return authorIds;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAuthorIds(Set<Integer> authorIds) {
|
|
|
|
|
this.authorIds = authorIds;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Set<ScienceGroupMemberDto> getMembers() {
|
|
|
|
|
return members;
|
|
|
|
|
}
|
|
|
|
|