src/Domain/Entity/TipoPreco.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Uid\Uuid;
  8. class TipoPreco
  9. {
  10.     private ?string $nombre null;
  11.     private ?\DateTimeInterface $createdAt null;
  12.     private ?\DateTimeInterface $updatedAt null;
  13.     private ?\DateTimeInterface $deletedAt null;
  14.     private ?Uuid $id null;
  15.     private Collection $sistemaRetribucions;
  16.     private Collection $precos;
  17.     public function __construct()
  18.     {
  19.         $this->sistemaRetribucions = new ArrayCollection();
  20.         $this->precos = new ArrayCollection();
  21.     }
  22.     public function getNombre(): ?string
  23.     {
  24.         return $this->nombre;
  25.     }
  26.     public function setNombre(?string $nombre): static
  27.     {
  28.         $this->nombre $nombre;
  29.         return $this;
  30.     }
  31.     public function getCreatedAt(): ?\DateTimeInterface
  32.     {
  33.         return $this->createdAt;
  34.     }
  35.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  36.     {
  37.         $this->createdAt $createdAt;
  38.         return $this;
  39.     }
  40.     public function getUpdatedAt(): ?\DateTimeInterface
  41.     {
  42.         return $this->updatedAt;
  43.     }
  44.     public function setUpdatedAt(\DateTimeInterface $updatedAt): static
  45.     {
  46.         $this->updatedAt $updatedAt;
  47.         return $this;
  48.     }
  49.     public function getDeletedAt(): ?\DateTimeInterface
  50.     {
  51.         return $this->deletedAt;
  52.     }
  53.     public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  54.     {
  55.         $this->deletedAt $deletedAt;
  56.         return $this;
  57.     }
  58.     public function getId(): ?Uuid
  59.     {
  60.         return $this->id;
  61.     }
  62.     /**
  63.      * @return Collection<int, SistemaRetribucion>
  64.      */
  65.     public function getSistemaRetribucions(): Collection
  66.     {
  67.         return $this->sistemaRetribucions;
  68.     }
  69.     public function addSistemaRetribucion(SistemaRetribucion $sistemaRetribucion): static
  70.     {
  71.         if (!$this->sistemaRetribucions->contains($sistemaRetribucion)) {
  72.             $this->sistemaRetribucions->add($sistemaRetribucion);
  73.             $sistemaRetribucion->setTipoPreco($this);
  74.         }
  75.         return $this;
  76.     }
  77.     public function removeSistemaRetribucion(SistemaRetribucion $sistemaRetribucion): static
  78.     {
  79.         if ($this->sistemaRetribucions->removeElement($sistemaRetribucion)) {
  80.             // set the owning side to null (unless already changed)
  81.             if ($sistemaRetribucion->getTipoPreco() === $this) {
  82.                 $sistemaRetribucion->setTipoPreco(null);
  83.             }
  84.         }
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return Collection<int, Preco>
  89.      */
  90.     public function getPrecos(): Collection
  91.     {
  92.         return $this->precos;
  93.     }
  94.     public function addPreco(Preco $preco): static
  95.     {
  96.         if (!$this->precos->contains($preco)) {
  97.             $this->precos->add($preco);
  98.             $preco->addTipoPreco($this);
  99.         }
  100.         return $this;
  101.     }
  102.     public function removePreco(Preco $preco): static
  103.     {
  104.         if ($this->precos->removeElement($preco)) {
  105.             $preco->removeTipoPreco($this);
  106.         }
  107.         return $this;
  108.     }
  109. }