<?php
namespace App\Entity;
use App\Repository\TipoTarifaSuministrosRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TipoTarifaSuministrosRepository::class)]
class TipoTarifaSuministros
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 60)]
private ?string $nombre = null;
#[ORM\Column(length: 3)]
private ?string $siglas = null;
#[ORM\OneToMany(mappedBy: 'tipoTarifaSuministro', targetEntity: PropertyList::class)]
private Collection $propertyLists;
public function __construct()
{
$this->propertyLists = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
public function getSiglas(): ?string
{
return $this->siglas;
}
public function setSiglas(string $siglas): static
{
$this->siglas = $siglas;
return $this;
}
/**
* @return Collection<int, PropertyList>
*/
public function getPropertyLists(): Collection
{
return $this->propertyLists;
}
public function addPropertyList(PropertyList $propertyList): static
{
if (!$this->propertyLists->contains($propertyList)) {
$this->propertyLists->add($propertyList);
$propertyList->setTipoTarifaSuministro($this);
}
return $this;
}
public function removePropertyList(PropertyList $propertyList): static
{
if ($this->propertyLists->removeElement($propertyList)) {
// set the owning side to null (unless already changed)
if ($propertyList->getTipoTarifaSuministro() === $this) {
$propertyList->setTipoTarifaSuministro(null);
}
}
return $this;
}
}