src/Entity/Etapa.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EtapaRepository;
  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. #[ORM\Entity(repositoryClassEtapaRepository::class)]
  9. class Etapa
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $nome null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  18.     private ?\DateTimeInterface $prazo null;
  19.     #[ORM\ManyToOne(inversedBy'etapas')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?User $user null;
  22.     #[ORM\ManyToOne(inversedBy'etapas')]
  23.     private ?Documento $documento null;
  24.     #[ORM\Column(nullabletrue)]
  25.     private ?\DateTimeImmutable $updatedAt null;
  26.     #[ORM\ManyToOne(inversedBy'etapas')]
  27.     #[ORM\JoinColumn(nullablefalse)]
  28.     private ?Fluxo $fluxo null;
  29.     #[ORM\Column]
  30.     private ?int $ordem null;
  31.     #[ORM\ManyToOne(inversedBy'etapas')]
  32.     private ?Registro $registro null;
  33.     #[ORM\OneToMany(mappedBy'etapa'targetEntityCx::class)]
  34.     private Collection $cx;
  35.     #[ORM\OneToMany(mappedBy'etapa'targetEntityCaixa::class)]
  36.     private Collection $caixa;
  37.     #[ORM\OneToMany(mappedBy'etapa'targetEntityDocumento::class)]
  38.     private Collection $documentos;
  39.     
  40.     #[ORM\Column(length255nullabletrue)]
  41.     private ?string $obs null;
  42.     public function __construct()
  43.     {
  44.         $this->cx = new ArrayCollection();
  45.         $this->caixa = new ArrayCollection();
  46.         $this->documentos = new ArrayCollection();
  47.     }
  48.     
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getNome(): ?string
  54.     {
  55.         return $this->nome;
  56.     }
  57.     public function setNome(string $nome): static
  58.     {
  59.         $this->nome $nome;
  60.         return $this;
  61.     }
  62.     public function getPrazo(): ?\DateTimeInterface
  63.     {
  64.         return $this->prazo;
  65.     }
  66.     public function setPrazo(\DateTimeInterface $prazo): static
  67.     {
  68.         $this->prazo $prazo;
  69.         return $this;
  70.     }
  71.     public function getUser(): ?User
  72.     {
  73.         return $this->user;
  74.     }
  75.     public function setUser(?User $user): static
  76.     {
  77.         $this->user $user;
  78.         return $this;
  79.     }
  80.     public function getDocumento(): ?Documento
  81.     {
  82.         return $this->documento;
  83.     }
  84.     public function setDocumento(?Documento $documento): static
  85.     {
  86.         $this->documento $documento;
  87.         return $this;
  88.     }
  89.     public function getUpdatedAt(): ?\DateTimeImmutable
  90.     {
  91.         return $this->updatedAt;
  92.     }
  93.     public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static
  94.     {
  95.         $this->updatedAt $updatedAt;
  96.         return $this;
  97.     }
  98.     public function getFluxo(): ?Fluxo
  99.     {
  100.         return $this->fluxo;
  101.     }
  102.     public function setFluxo(?Fluxo $fluxo): static
  103.     {
  104.         $this->fluxo $fluxo;
  105.         return $this;
  106.     }
  107.     public function getOrdem(): ?int
  108.     {
  109.         return $this->ordem;
  110.     }
  111.     public function setOrdem(int $ordem): static
  112.     {
  113.         $this->ordem $ordem;
  114.         return $this;
  115.     }
  116.     public function getRegistro(): ?Registro
  117.     {
  118.         return $this->registro;
  119.     }
  120.     public function setRegistro(?Registro $registro): static
  121.     {
  122.         $this->registro $registro;
  123.         return $this;
  124.     }
  125.     /**
  126.      * @return Collection<int, Cx>
  127.      */
  128.     public function getCx(): Collection
  129.     {
  130.         return $this->cx;
  131.     }
  132.     public function addCx(Cx $cx): static
  133.     {
  134.         if (!$this->cx->contains($cx)) {
  135.             $this->cx->add($cx);
  136.             $cx->setEtapa($this);
  137.         }
  138.         return $this;
  139.     }
  140.     public function removeCx(Cx $cx): static
  141.     {
  142.         if ($this->cx->removeElement($cx)) {
  143.             // set the owning side to null (unless already changed)
  144.             if ($cx->getEtapa() === $this) {
  145.                 $cx->setEtapa(null);
  146.             }
  147.         }
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return Collection<int, Caixa>
  152.      */
  153.     public function getCaixa(): Collection
  154.     {
  155.         return $this->caixa;
  156.     }
  157.     public function addCaixa(Caixa $caixa): static
  158.     {
  159.         if (!$this->caixa->contains($caixa)) {
  160.             $this->caixa->add($caixa);
  161.             $caixa->setEtapa($this);
  162.         }
  163.         return $this;
  164.     }
  165.     public function removeCaixa(Caixa $caixa): static
  166.     {
  167.         if ($this->caixa->removeElement($caixa)) {
  168.             // set the owning side to null (unless already changed)
  169.             if ($caixa->getEtapa() === $this) {
  170.                 $caixa->setEtapa(null);
  171.             }
  172.         }
  173.         return $this;
  174.     }
  175.     /**
  176.      * @return Collection<int, Documento>
  177.      */
  178.     public function getDocumentos(): Collection
  179.     {
  180.         return $this->documentos;
  181.     }
  182.     public function addDocumento(Documento $documento): static
  183.     {
  184.         if (!$this->documentos->contains($documento)) {
  185.             $this->documentos->add($documento);
  186.             $documento->setEtapa($this);
  187.         }
  188.         return $this;
  189.     }
  190.     public function removeDocumento(Documento $documento): static
  191.     {
  192.         if ($this->documentos->removeElement($documento)) {
  193.             // set the owning side to null (unless already changed)
  194.             if ($documento->getEtapa() === $this) {
  195.                 $documento->setEtapa(null);
  196.             }
  197.         }
  198.         return $this;
  199.     }
  200.     public function getObs(): ?string
  201.     {
  202.         return $this->obs;
  203.     }
  204.     public function setObs(?string $obs): static
  205.     {
  206.         $this->obs $obs;
  207.         return $this;
  208.     }
  209. }