mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Entites for AccomanyingPeriodWork, AccomanyingPeriodWorkGoal & Social/WorkEvaluation
This commit is contained in:
@@ -0,0 +1,309 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
|
||||
use App\Entity\Chill\PersonBundle\Entity\SocialWork\Result;
|
||||
use App\Entity\Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use App\Repository\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=AccompanyingPeriodWorkRepository::class)
|
||||
* @ORM\Table(name="chill_person_accompanying_period_work")
|
||||
*/
|
||||
class AccompanyingPeriodWork
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
private $note;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class)
|
||||
*/
|
||||
private $accompanyingPeriod;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=SocialAction::class)
|
||||
*/
|
||||
private $socialAction;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $createdAt;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private $createdBy;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $startDate;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $endDate;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=ThirdParty::class)
|
||||
*
|
||||
* In schema : traitant
|
||||
*/
|
||||
private $handlingThierParty;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $createdAutomatically;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
private $createdAutomaticallyReason;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="accompanyingPeriodWork")
|
||||
*/
|
||||
private $goals;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="accompanyingPeriodWorks")
|
||||
* @ORM\JoinTable(name="chill_person_accompanying_period_work_result")
|
||||
*/
|
||||
private $results;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=ThirdParty::class)
|
||||
* @ORM\JoinTable(name="chill_person_accompanying_period_work_third_party")
|
||||
*
|
||||
* In schema : intervenants
|
||||
*/
|
||||
private $thirdParties;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->goals = new ArrayCollection();
|
||||
$this->results = new ArrayCollection();
|
||||
$this->thirdParties = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getNote(): ?string
|
||||
{
|
||||
return $this->note;
|
||||
}
|
||||
|
||||
public function setNote(string $note): self
|
||||
{
|
||||
$this->note = $note;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAccompanyingPeriod(): ?AccompanyingPeriod
|
||||
{
|
||||
return $this->accompanyingPeriod;
|
||||
}
|
||||
|
||||
public function setAccompanyingPeriod(?AccompanyingPeriod $accompanyingPeriod): self
|
||||
{
|
||||
$this->accompanyingPeriod = $accompanyingPeriod;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSocialAction(): ?SocialAction
|
||||
{
|
||||
return $this->socialAction;
|
||||
}
|
||||
|
||||
public function setSocialAction(?SocialAction $socialAction): self
|
||||
{
|
||||
$this->socialAction = $socialAction;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function setCreatedAt(\DateTimeInterface $createdAt): self
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedBy(): ?User
|
||||
{
|
||||
return $this->createdBy;
|
||||
}
|
||||
|
||||
public function setCreatedBy(?User $createdBy): self
|
||||
{
|
||||
$this->createdBy = $createdBy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStartDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
public function setStartDate(\DateTimeInterface $startDate): self
|
||||
{
|
||||
$this->startDate = $startDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getEndDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->endDate;
|
||||
}
|
||||
|
||||
public function setEndDate(\DateTimeInterface $endDate): self
|
||||
{
|
||||
$this->endDate = $endDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHandlingThierParty(): ?ThirdParty
|
||||
{
|
||||
return $this->handlingThierParty;
|
||||
}
|
||||
|
||||
public function setHandlingThierParty(?ThirdParty $handlingThierParty): self
|
||||
{
|
||||
$this->handlingThierParty = $handlingThierParty;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAutomatically(): ?bool
|
||||
{
|
||||
return $this->createdAutomatically;
|
||||
}
|
||||
|
||||
public function setCreatedAutomatically(bool $createdAutomatically): self
|
||||
{
|
||||
$this->createdAutomatically = $createdAutomatically;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAutomaticallyReason(): ?string
|
||||
{
|
||||
return $this->createdAutomaticallyReason;
|
||||
}
|
||||
|
||||
public function setCreatedAutomaticallyReason(string $createdAutomaticallyReason): self
|
||||
{
|
||||
$this->createdAutomaticallyReason = $createdAutomaticallyReason;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|AccompanyingPeriodWorkGoal[]
|
||||
*/
|
||||
public function getGoals(): Collection
|
||||
{
|
||||
return $this->goals;
|
||||
}
|
||||
|
||||
public function addGoal(AccompanyingPeriodWorkGoal $goal): self
|
||||
{
|
||||
if (!$this->goals->contains($goal)) {
|
||||
$this->goals[] = $goal;
|
||||
$goal->setAccompanyingPeriodWork2($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeGoal(AccompanyingPeriodWorkGoal $goal): self
|
||||
{
|
||||
if ($this->goals->removeElement($goal)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($goal->getAccompanyingPeriodWork2() === $this) {
|
||||
$goal->setAccompanyingPeriodWork2(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Result[]
|
||||
*/
|
||||
public function getResults(): Collection
|
||||
{
|
||||
return $this->results;
|
||||
}
|
||||
|
||||
public function addResult(Result $result): self
|
||||
{
|
||||
if (!$this->results->contains($result)) {
|
||||
$this->results[] = $result;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeResult(Result $result): self
|
||||
{
|
||||
$this->results->removeElement($result);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|ThirdParty[]
|
||||
*/
|
||||
public function getThirdParties(): Collection
|
||||
{
|
||||
return $this->thirdParties;
|
||||
}
|
||||
|
||||
public function addThirdParty(ThirdParty $thirdParty): self
|
||||
{
|
||||
if (!$this->thirdParties->contains($thirdParty)) {
|
||||
$this->thirdParties[] = $thirdParty;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeThirdParty(ThirdParty $thirdParty): self
|
||||
{
|
||||
$this->thirdParties->removeElement($thirdParty);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user