#32 add variable "events"
This commit is contained in:
parent
68737b976f
commit
beb334f2fa
@ -9,6 +9,7 @@ import ru.ulstu.deadline.model.Deadline;
|
||||
import ru.ulstu.file.model.FileData;
|
||||
import ru.ulstu.paper.model.Paper;
|
||||
import ru.ulstu.project.model.Project;
|
||||
import ru.ulstu.timeline.model.Event;
|
||||
import ru.ulstu.user.model.User;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
@ -92,6 +93,10 @@ public class Grant extends BaseEntity implements UserContainer {
|
||||
inverseJoinColumns = {@JoinColumn(name = "paper_id")})
|
||||
private List<Paper> papers = new ArrayList<>();
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "grant_id")
|
||||
private List<Event> events = new ArrayList<>();
|
||||
|
||||
public GrantStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
@ -169,6 +174,14 @@ public class Grant extends BaseEntity implements UserContainer {
|
||||
this.papers = papers;
|
||||
}
|
||||
|
||||
public List<Event> getEvents() {
|
||||
return events;
|
||||
}
|
||||
|
||||
public void setEvents(List<Event> events) {
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
public Optional<Deadline> getNextDeadline() {
|
||||
return deadlines
|
||||
.stream()
|
||||
|
Loading…
Reference in New Issue
Block a user