relation between task and accompanyingcourse created

This commit is contained in:
2021-09-09 17:43:35 +02:00
parent 9851efa804
commit 8318458805
2 changed files with 58 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\HasCenterInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
/**
* AbstractTask
@@ -67,9 +68,16 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
* @Assert\NotNull()
*/
private $person;
/**
* @var AccompanyingPeriod
* @ORM\ManyToOne(targetEntity="\Chill\PersonBundle\Entity\AccompanyingPeriod")
*/
private $course;
/**
*
@@ -202,6 +210,11 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
return $this->person;
}
public function getCourse(): ?AccompanyingPeriod
{
return $this->course;
}
public function getCircle(): ?Scope
{
return $this->circle;
@@ -219,6 +232,12 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
return $this;
}
public function setCourse(AccompanyingPeriod $course)
{
$this->course = $course;
return $this;
}
public function setCircle(Scope $circle)
{
$this->circle = $circle;