|
|
|
@ -29,7 +29,7 @@ public class GrantDto {
|
|
|
|
|
private Set<Integer> authorIds;
|
|
|
|
|
private Set<UserDto> authors;
|
|
|
|
|
private Integer leaderId;
|
|
|
|
|
private boolean leader;
|
|
|
|
|
private boolean wasLeader;
|
|
|
|
|
private boolean birthDate;
|
|
|
|
|
private boolean degree;
|
|
|
|
|
|
|
|
|
@ -47,7 +47,7 @@ public class GrantDto {
|
|
|
|
|
@JsonProperty("authorIds") Set<Integer> authorIds,
|
|
|
|
|
@JsonProperty("authors") Set<UserDto> authors,
|
|
|
|
|
@JsonProperty("leader") Integer leaderId,
|
|
|
|
|
@JsonProperty("leader") boolean leader,
|
|
|
|
|
@JsonProperty("wasLeader") boolean wasLeader,
|
|
|
|
|
@JsonProperty("birthDate") boolean birthDate,
|
|
|
|
|
@JsonProperty("degree") boolean degree) {
|
|
|
|
|
this.id = id;
|
|
|
|
@ -59,7 +59,7 @@ public class GrantDto {
|
|
|
|
|
this.project = project;
|
|
|
|
|
this.authors = authors;
|
|
|
|
|
this.leaderId = leaderId;
|
|
|
|
|
this.leader = leader;
|
|
|
|
|
this.wasLeader = wasLeader;
|
|
|
|
|
this.birthDate = birthDate;
|
|
|
|
|
this.degree = degree;
|
|
|
|
|
}
|
|
|
|
@ -75,7 +75,7 @@ public class GrantDto {
|
|
|
|
|
this.authorIds = convert(grant.getAuthors(), user -> user.getId());
|
|
|
|
|
this.authors = convert(grant.getAuthors(), UserDto::new);
|
|
|
|
|
this.leaderId = grant.getLeader().getId();
|
|
|
|
|
this.leader = false;
|
|
|
|
|
this.wasLeader = false;
|
|
|
|
|
this.birthDate = false;
|
|
|
|
|
this.degree = false;
|
|
|
|
|
}
|
|
|
|
@ -167,12 +167,12 @@ public class GrantDto {
|
|
|
|
|
this.leaderId = leaderId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isLeader() {
|
|
|
|
|
return leader;
|
|
|
|
|
public boolean isWasLeader() {
|
|
|
|
|
return wasLeader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setLeader(boolean leader) {
|
|
|
|
|
this.leader = leader;
|
|
|
|
|
public void setWasLeader(boolean wasLeader) {
|
|
|
|
|
this.wasLeader = wasLeader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isBirthDate() {
|
|
|
|
|