suivi/src/Entity/Intervention.php
2022-03-06 21:55:48 +01:00

263 lines
5 KiB
PHP

<?php
namespace App\Entity;
use App\Core\Entity\EntityInterface;
use App\Repository\InterventionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=InterventionRepository::class)
*/
class Intervention implements EntityInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToMany(targetEntity=Speaker::class, inversedBy="interventions")
*/
private $speakers;
/**
* @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="interventions")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $establishment;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $activityReference;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $date;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $groups;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $levels;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $themes;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $content;
/**
* @ORM\ManyToMany(targetEntity=Tool::class, inversedBy="interventions")
*/
private $tools;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $toolsDetails;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $feedback;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $vigilantPoints;
public function __construct()
{
$this->speakers = new ArrayCollection();
$this->tools = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection<int, Speaker>
*/
public function getSpeakers(): Collection
{
return $this->speakers;
}
public function addSpeaker(Speaker $speaker): self
{
if (!$this->speakers->contains($speaker)) {
$this->speakers[] = $speaker;
}
return $this;
}
public function removeSpeaker(Speaker $speaker): self
{
$this->speaker->removeElement($speaker);
return $this;
}
public function getEstablishment(): ?Establishment
{
return $this->establishment;
}
public function setEstablishment(?Establishment $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function getActivityReference(): ?string
{
return $this->activityReference;
}
public function setActivityReference(?string $activityReference): self
{
$this->activityReference = $activityReference;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getGroups(): ?int
{
return $this->groups;
}
public function setGroups(?int $groups): self
{
$this->groups = $groups;
return $this;
}
public function getLevels(): ?string
{
return $this->levels;
}
public function setLevels(?string $levels): self
{
$this->levels = $levels;
return $this;
}
public function getThemes(): ?string
{
return $this->themes;
}
public function setThemes(?string $themes): self
{
$this->themes = $themes;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
/**
* @return Collection<int, Tool>
*/
public function getTools(): Collection
{
return $this->tools;
}
public function addTool(Tool $tool): self
{
if (!$this->tools->contains($tool)) {
$this->tools[] = $tool;
}
return $this;
}
public function removeTool(Tool $tool): self
{
$this->tools->removeElement($tool);
return $this;
}
public function getToolsDetails(): ?string
{
return $this->toolsDetails;
}
public function setToolsDetails(?string $toolsDetails): self
{
$this->toolsDetails = $toolsDetails;
return $this;
}
public function getFeedback(): ?string
{
return $this->feedback;
}
public function setFeedback(?string $feedback): self
{
$this->feedback = $feedback;
return $this;
}
public function getVigilantPoints(): ?string
{
return $this->vigilantPoints;
}
public function setVigilantPoints(?string $vigilantPoints): self
{
$this->vigilantPoints = $vigilantPoints;
return $this;
}
}