<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\TipoCargoServicioRepository")
* @ORM\Table(name="tipo_cargo_servicio", schema="perseo")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class TipoCargoServicio extends TipoCargoAbstract
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\AccionServicio", mappedBy="tipo")
*/
private $accionesServicio;
public function __construct()
{
parent::__construct();
$this->accionesServicio = new ArrayCollection();
}
/**
* @return Collection<int, AccionServicio>
*/
public function getAccionesServicio(): Collection
{
return $this->accionesServicio;
}
public function addAccionesServicio(AccionServicio $accionesServicio): self
{
if (!$this->accionesServicio->contains($accionesServicio)) {
$this->accionesServicio->add($accionesServicio);
$accionesServicio->setTipo($this);
}
return $this;
}
public function removeAccionesServicio(AccionServicio $accionesServicio): self
{
if ($this->accionesServicio->removeElement($accionesServicio)) {
// set the owning side to null (unless already changed)
if ($accionesServicio->getTipo() === $this) {
$accionesServicio->setTipo(null);
}
}
return $this;
}
}