src/Entity/Cx.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CxRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. #[ORM\Entity(repositoryClassCxRepository::class)]
  8. class Cx
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length2000nullabletrue)]
  15.     private ?string $texto null;
  16.     #[ORM\Column(nullabletrue)]
  17.     private ?int $nome null;
  18.     #[ORM\ManyToOne(targetEntity'App\Entity\ClienteAll'inversedBy'cxes')]
  19.     #[ORM\JoinColumn(name'cliente_id'referencedColumnName'id')]
  20.     private ?ClienteAll $cliente null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $caminho null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $image null;
  25.     #[ORM\Column]
  26.     private ?\DateTimeImmutable $createdAt null;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?int $status null;
  29.     #[ORM\OneToMany(mappedBy'cx'targetEntityCaixa::class)]
  30.     private Collection $caixas;
  31.     #[ORM\ManyToOne(inversedBy'cx')]
  32.     private ?Etapa $etapa null;
  33.     public function __construct()
  34.     {
  35.         $this->createdAt = new \DateTimeImmutable('America/Sao_Paulo');
  36.         $this->caixas = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getTexto(): ?string
  43.     {
  44.         return $this->texto;
  45.     }
  46.     public function setTexto(?string $texto): static
  47.     {
  48.         $this->texto $texto;
  49.         return $this;
  50.     }
  51.     public function getNome(): ?int
  52.     {
  53.         return $this->nome;
  54.     }
  55.     public function setNome(?int $nome): static
  56.     {
  57.         $this->nome $nome;
  58.         return $this;
  59.     }
  60.     public function getCliente(): ?ClienteAll
  61.     {
  62.         return $this->cliente;
  63.     }
  64.     public function setCliente(?ClienteAll $cliente): static
  65.     {
  66.         $this->cliente $cliente;
  67.         return $this;
  68.     }
  69.     public function getCaminho(): ?string
  70.     {
  71.         return $this->caminho;
  72.     }
  73.     public function setCaminho(?string $caminho): static
  74.     {
  75.         $this->caminho $caminho;
  76.         return $this;
  77.     }
  78.     public function getImage(): ?string
  79.     {
  80.         return $this->image;
  81.     }
  82.     public function setImage(?string $image): static
  83.     {
  84.         $this->image $image;
  85.         return $this;
  86.     }
  87.     public function getCreatedAt(): ?\DateTimeImmutable
  88.     {
  89.         return $this->createdAt;
  90.     }
  91.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  92.     {
  93.         $this->createdAt $createdAt;
  94.         return $this;
  95.     }
  96.     public function getStatus(): ?int
  97.     {
  98.         return $this->status;
  99.     }
  100.     public function setStatus(?int $status): static
  101.     {
  102.         $this->status $status;
  103.         return $this;
  104.     }
  105.     /**
  106.      * @return Collection<int, Caixa>
  107.      */
  108.     public function getCaixas(): Collection
  109.     {
  110.         return $this->caixas;
  111.     }
  112.     public function addCaixa(Caixa $caixa): static
  113.     {
  114.         if (!$this->caixas->contains($caixa)) {
  115.             $this->caixas->add($caixa);
  116.             $caixa->setCx($this);
  117.         }
  118.         return $this;
  119.     }
  120.     public function removeCaixa(Caixa $caixa): static
  121.     {
  122.         if ($this->caixas->removeElement($caixa)) {
  123.             // set the owning side to null (unless already changed)
  124.             if ($caixa->getCx() === $this) {
  125.                 $caixa->setCx(null);
  126.             }
  127.         }
  128.         return $this;
  129.     }
  130.   
  131.     public function getEtapa(): ?Etapa
  132.     {
  133.         return $this->etapa;
  134.     }
  135.     public function setEtapa(?Etapa $etapa): static
  136.     {
  137.         $this->etapa $etapa;
  138.         return $this;
  139.     }
  140. }