mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Entites for AccomanyingPeriodWork, AccomanyingPeriodWorkGoal & Social/WorkEvaluation
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Entity\Chill\PersonBundle\Entity\SocialWork;
|
||||
|
||||
use App\Entity\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
use App\Entity\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal;
|
||||
use App\Repository\Chill\PersonBundle\Entity\SocialWork\ResultRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
@@ -40,10 +42,22 @@ class Result
|
||||
*/
|
||||
private $goals;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWork::class, mappedBy="results")
|
||||
*/
|
||||
private $accompanyingPeriodWorks;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="results")
|
||||
*/
|
||||
private $accompanyingPeriodWorkGoals;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->socialActions = new ArrayCollection();
|
||||
$this->goals = new ArrayCollection();
|
||||
$this->accompanyingPeriodWorks = new ArrayCollection();
|
||||
$this->accompanyingPeriodWorkGoals = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
@@ -122,4 +136,52 @@ class Result
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|AccompanyingPeriodWork[]
|
||||
*/
|
||||
public function getAccompanyingPeriodWorks(): Collection
|
||||
{
|
||||
return $this->accompanyingPeriodWorks;
|
||||
}
|
||||
|
||||
public function addAccompanyingPeriodWork(AccompanyingPeriodWork $accompanyingPeriod): self
|
||||
{
|
||||
if (!$this->accompanyingPeriodWorks->contains($accompanyingPeriod)) {
|
||||
$this->accompanyingPeriodWorks[] = $accompanyingPeriod;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAccompanyingPeriodWork(AccompanyingPeriodWork $accompanyingPeriod): self
|
||||
{
|
||||
$this->accompanyingPeriodWorks->removeElement($accompanyingPeriod);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|AccompanyingPeriodWorkGoal[]
|
||||
*/
|
||||
public function getAccompanyingPeriodWorkGoals(): Collection
|
||||
{
|
||||
return $this->accompanyingPeriodWorkGoals;
|
||||
}
|
||||
|
||||
public function addAccompanyingPeriodWorkGoal(AccompanyingPeriodWorkGoal $accompanyingPeriodWorkGoal): self
|
||||
{
|
||||
if (!$this->accompanyingPeriodWorkGoals->contains($accompanyingPeriodWorkGoal)) {
|
||||
$this->accompanyingPeriodWorkGoals[] = $accompanyingPeriodWorkGoal;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAccompanyingPeriodWorkGoal(AccompanyingPeriodWorkGoal $accompanyingPeriodWorkGoal): self
|
||||
{
|
||||
$this->accompanyingPeriodWorkGoals->removeElement($accompanyingPeriodWorkGoal);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user