|
|
@ -4,6 +4,7 @@ import org.hibernate.validator.constraints.NotBlank;
|
|
|
|
import ru.ulstu.core.model.BaseEntity;
|
|
|
|
import ru.ulstu.core.model.BaseEntity;
|
|
|
|
import ru.ulstu.user.model.User;
|
|
|
|
import ru.ulstu.user.model.User;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.persistence.CascadeType;
|
|
|
|
import javax.persistence.Column;
|
|
|
|
import javax.persistence.Column;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import javax.persistence.EnumType;
|
|
|
|
import javax.persistence.EnumType;
|
|
|
@ -66,6 +67,10 @@ public class Event extends BaseEntity {
|
|
|
|
@JoinColumn(name = "child_id")
|
|
|
|
@JoinColumn(name = "child_id")
|
|
|
|
private Event child;
|
|
|
|
private Event child;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@OneToMany(cascade = CascadeType.ALL)
|
|
|
|
|
|
|
|
@JoinColumn(name = "child_id")
|
|
|
|
|
|
|
|
private List<Event> parents;
|
|
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -137,4 +142,12 @@ public class Event extends BaseEntity {
|
|
|
|
public void setChild(Event child) {
|
|
|
|
public void setChild(Event child) {
|
|
|
|
this.child = child;
|
|
|
|
this.child = child;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Event> getParents() {
|
|
|
|
|
|
|
|
return parents;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setParents(List<Event> parents) {
|
|
|
|
|
|
|
|
this.parents = parents;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|