<?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\TipoCargoVentaRepository")
* @ORM\Table(name="tipo_cargo_venta")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class TipoCargoVenta extends TipoCargoAbstract
{
/**
* @ORM\OneToMany(targetEntity=\App\Entity\AccionVenta::class, mappedBy="tipo")
*/
private $accionesVenta;
public function __construct()
{
parent::__construct();
$this->accionesVenta = new ArrayCollection();
}
/**
* @return Collection<int, AccionVenta>
*/
public function getAccionesVenta(): Collection
{
return $this->accionesVenta;
}
public function addAccionesVentum(AccionVenta $accionesVentum): static
{
if (!$this->accionesVenta->contains($accionesVentum)) {
$this->accionesVenta->add($accionesVentum);
$accionesVentum->setTipo($this);
}
return $this;
}
public function removeAccionesVentum(AccionVenta $accionesVentum): static
{
if ($this->accionesVenta->removeElement($accionesVentum)) {
// set the owning side to null (unless already changed)
if ($accionesVentum->getTipo() === $this) {
$accionesVentum->setTipo(null);
}
}
return $this;
}
}