<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EstadoCheckRepository")
* @ORM\Table(name="estado_check", schema="perseo")
*/
class EstadoCheck extends EstadoAbstract
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\AccionCheck", mappedBy="estado")
*/
private $accionesCheck;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Reloj", mappedBy="check")
*/
private $relojes;
public function __construct()
{
$this->accionesCheck = new ArrayCollection();
$this->relojes = new ArrayCollection();
}
/**
* @return Collection<int, AccionCheck>
*/
public function getAccionesCheck(): Collection
{
return $this->accionesCheck;
}
public function addAccionesCheck(AccionCheck $accionesCheck): self
{
if (!$this->accionesCheck->contains($accionesCheck)) {
$this->accionesCheck->add($accionesCheck);
$accionesCheck->setEstado($this);
}
return $this;
}
public function removeAccionesCheck(AccionCheck $accionesCheck): self
{
if ($this->accionesCheck->removeElement($accionesCheck)) {
// set the owning side to null (unless already changed)
if ($accionesCheck->getEstado() === $this) {
$accionesCheck->setEstado(null);
}
}
return $this;
}
/**
* @return Collection<int, Reloj>
*/
public function getRelojes(): Collection
{
return $this->relojes;
}
public function addReloje(Reloj $reloje): self
{
if (!$this->relojes->contains($reloje)) {
$this->relojes->add($reloje);
$reloje->setCheck($this);
}
return $this;
}
public function removeReloje(Reloj $reloje): self
{
if ($this->relojes->removeElement($reloje)) {
// set the owning side to null (unless already changed)
if ($reloje->getCheck() === $this) {
$reloje->setCheck(null);
}
}
return $this;
}
}