mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 13:33:48 +00:00
record single task states transition and add them in timeline
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Chill\TaskBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
/**
|
||||
* SingleTask
|
||||
@@ -58,8 +59,25 @@ class SingleTask extends AbstractTask
|
||||
* )
|
||||
*/
|
||||
private $recurringTask;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="\Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent",
|
||||
* mappedBy="task"
|
||||
* )
|
||||
*/
|
||||
private $taskPlaceEvents;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->taskPlaceEvents = $events = new \Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -174,6 +192,16 @@ class SingleTask extends AbstractTask
|
||||
$this->recurringTask = $recurringTask;
|
||||
}
|
||||
|
||||
public function getTaskPlaceEvents(): Collection
|
||||
{
|
||||
return $this->taskPlaceEvents;
|
||||
}
|
||||
|
||||
public function setTaskPlaceEvents(Collection $taskPlaceEvents)
|
||||
{
|
||||
$this->taskPlaceEvents = $taskPlaceEvents;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user