src/Domain/Entity/SistemaRetribucion.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use DateTimeInterface;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Uid\Uuid;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. class SistemaRetribucion
  11. {
  12.     private ?Uuid $id null;
  13.     /**
  14.      * @var string|null
  15.      * @Assert\NotBlank(message="not_blank")
  16.      */
  17.     private ?string $concepto;
  18.     /**
  19.      * @var float|null
  20.      * @Assert\NotBlank(message="not_blank")
  21.      */
  22.     private ?float $precio;
  23.     /**
  24.      * @var DateTimeInterface|null
  25.      * @Assert\NotBlank(message="not_blank")
  26.      */
  27.     private ?DateTimeInterface $fechaVigenciaInicio;
  28.     /**
  29.      * @var DateTimeInterface|null
  30.      * @Assert\NotBlank(message="not_blank")
  31.      */
  32.     private ?DateTimeInterface $fechaVigenciaFin;
  33.     private ?bool $active;
  34.     private ?DateTimeInterface $createdAt null;
  35.     private ?DateTimeInterface $updatedAt null;
  36.     private ?DateTimeInterface $deletedAt null;
  37.     private Collection $detalleMinutas;
  38.     public function __construct()
  39.     {
  40.         $this->concepto null;
  41.         $this->precio null;
  42.         $this->fechaVigenciaInicio null;
  43.         $this->fechaVigenciaFin null;
  44.         $this->detalleMinutas = new ArrayCollection();
  45.     }
  46.     public function __toString(): string
  47.     {
  48.         return $this->getConcepto()??'---';
  49.     }
  50.     public function getConcepto(): ?string
  51.     {
  52.         return $this->concepto;
  53.     }
  54.     public function setConcepto(?string $concepto): static
  55.     {
  56.         $this->concepto $concepto;
  57.         return $this;
  58.     }
  59.     public function getPrecio(): ?float
  60.     {
  61.         return $this->precio;
  62.     }
  63.     public function setPrecio(?float $precio): static
  64.     {
  65.         $this->precio $precio;
  66.         return $this;
  67.     }
  68.     public function getFechaVigenciaInicio(): ?DateTimeInterface
  69.     {
  70.         return $this->fechaVigenciaInicio;
  71.     }
  72.     public function setFechaVigenciaInicio(?DateTimeInterface $fechaVigenciaInicio): static
  73.     {
  74.         $this->fechaVigenciaInicio $fechaVigenciaInicio;
  75.         return $this;
  76.     }
  77.     public function getFechaVigenciaFin(): ?DateTimeInterface
  78.     {
  79.         return $this->fechaVigenciaFin;
  80.     }
  81.     public function setFechaVigenciaFin(?DateTimeInterface $fechaVigenciaFin): static
  82.     {
  83.         $this->fechaVigenciaFin $fechaVigenciaFin;
  84.         return $this;
  85.     }
  86.     public function isActive(): ?bool
  87.     {
  88.         return $this->active;
  89.     }
  90.     public function setActive(?bool $active): static
  91.     {
  92.         $this->active $active;
  93.         return $this;
  94.     }
  95.     public function getCreatedAt(): ?DateTimeInterface
  96.     {
  97.         return $this->createdAt;
  98.     }
  99.     public function setCreatedAt(DateTimeInterface $createdAt): static
  100.     {
  101.         $this->createdAt $createdAt;
  102.         return $this;
  103.     }
  104.     public function getUpdatedAt(): ?DateTimeInterface
  105.     {
  106.         return $this->updatedAt;
  107.     }
  108.     public function setUpdatedAt(DateTimeInterface $updatedAt): static
  109.     {
  110.         $this->updatedAt $updatedAt;
  111.         return $this;
  112.     }
  113.     public function getDeletedAt(): ?DateTimeInterface
  114.     {
  115.         return $this->deletedAt;
  116.     }
  117.     public function setDeletedAt(?DateTimeInterface $deletedAt): static
  118.     {
  119.         $this->deletedAt $deletedAt;
  120.         return $this;
  121.     }
  122.     public function getId(): ?Uuid
  123.     {
  124.         return $this->id;
  125.     }
  126.     /**
  127.      * @return Collection<int, DetalleMinutaSistemaRetribucion>
  128.      */
  129.     public function getDetalleMinutas(): Collection
  130.     {
  131.         return $this->detalleMinutas;
  132.     }
  133.     public function addDetalleMinuta(DetalleMinutaSistemaRetribucion $detalleMinuta): static
  134.     {
  135.         if (!$this->detalleMinutas->contains($detalleMinuta)) {
  136.             $this->detalleMinutas->add($detalleMinuta);
  137.             $detalleMinuta->setSistemaRetribucion($this);
  138.         }
  139.         return $this;
  140.     }
  141.     public function removeDetalleMinuta(DetalleMinutaSistemaRetribucion $detalleMinuta): static
  142.     {
  143.         if ($this->detalleMinutas->removeElement($detalleMinuta)) {
  144.             // set the owning side to null (unless already changed)
  145.             if ($detalleMinuta->getSistemaRetribucion() === $this) {
  146.                 $detalleMinuta->setSistemaRetribucion(null);
  147.             }
  148.         }
  149.         return $this;
  150.     }
  151. }