|
|
@ -5,11 +5,13 @@ import ru.ulstu.core.model.BaseEntity;
|
|
|
|
import ru.ulstu.deadline.model.Deadline;
|
|
|
|
import ru.ulstu.deadline.model.Deadline;
|
|
|
|
import ru.ulstu.file.model.FileData;
|
|
|
|
import ru.ulstu.file.model.FileData;
|
|
|
|
import ru.ulstu.grant.model.Grant;
|
|
|
|
import ru.ulstu.grant.model.Grant;
|
|
|
|
|
|
|
|
import ru.ulstu.timeline.model.Event;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.persistence.CascadeType;
|
|
|
|
import javax.persistence.CascadeType;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import javax.persistence.EnumType;
|
|
|
|
import javax.persistence.EnumType;
|
|
|
|
import javax.persistence.Enumerated;
|
|
|
|
import javax.persistence.Enumerated;
|
|
|
|
|
|
|
|
import javax.persistence.FetchType;
|
|
|
|
import javax.persistence.JoinColumn;
|
|
|
|
import javax.persistence.JoinColumn;
|
|
|
|
import javax.persistence.ManyToOne;
|
|
|
|
import javax.persistence.ManyToOne;
|
|
|
|
import javax.persistence.OneToMany;
|
|
|
|
import javax.persistence.OneToMany;
|
|
|
@ -62,6 +64,10 @@ public class Project extends BaseEntity {
|
|
|
|
@JoinColumn(name = "file_id")
|
|
|
|
@JoinColumn(name = "file_id")
|
|
|
|
private FileData application;
|
|
|
|
private FileData application;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
|
|
|
|
|
|
|
@JoinColumn(name = "project_id")
|
|
|
|
|
|
|
|
private List<Event> events = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -117,4 +123,12 @@ public class Project extends BaseEntity {
|
|
|
|
public void setApplication(FileData application) {
|
|
|
|
public void setApplication(FileData application) {
|
|
|
|
this.application = application;
|
|
|
|
this.application = application;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Event> getEvents() {
|
|
|
|
|
|
|
|
return events;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setEvents(List<Event> events) {
|
|
|
|
|
|
|
|
this.events = events;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|