src/Entity/ClienteAll.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClienteAllRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassClienteAllRepository::class)]
  8. class ClienteAll
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nome null;
  16.     #[ORM\Column]
  17.     private ?\DateTimeImmutable $createdAt null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $end null;
  20.     #[ORM\OneToMany(mappedBy'cliente'targetEntityCx::class)]
  21.     private Collection $cxes;
  22.     #[ORM\OneToMany(mappedBy'clienteAll'targetEntityCliente::class)]
  23.     private Collection $clientes;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $logo null;
  26.     public function __construct()
  27.     {
  28.         $this->cxes = new ArrayCollection();
  29.         $this->createdAt = new \DateTimeImmutable('America/Sao_Paulo');
  30.         $this->clientes = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getNome(): ?string
  37.     {
  38.         return $this->nome;
  39.     }
  40.     public function setNome(string $nome): static
  41.     {
  42.         $this->nome $nome;
  43.         return $this;
  44.     }
  45.     public function getCreatedAt(): ?\DateTimeImmutable
  46.     {
  47.         return $this->createdAt;
  48.     }
  49.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  50.     {
  51.         $this->createdAt $createdAt;
  52.         return $this;
  53.     }
  54.     public function getEnd(): ?string
  55.     {
  56.         return $this->end;
  57.     }
  58.     public function setEnd(?string $end): static
  59.     {
  60.         $this->end $end;
  61.         return $this;
  62.     }
  63.     /**
  64.      * @return Collection<int, Cx>
  65.      */
  66.     public function getCxes(): Collection
  67.     {
  68.         return $this->cxes;
  69.     }
  70.     public function addCx(Cx $cx): static
  71.     {
  72.         if (!$this->cxes->contains($cx)) {
  73.             $this->cxes->add($cx);
  74.             $cx->setCliente($this);
  75.         }
  76.         return $this;
  77.     }
  78.     public function removeCx(Cx $cx): static
  79.     {
  80.         if ($this->cxes->removeElement($cx)) {
  81.             // set the owning side to null (unless already changed)
  82.             if ($cx->getCliente() === $this) {
  83.                 $cx->setCliente(null);
  84.             }
  85.         }
  86.         return $this;
  87.     }
  88.      /**
  89.      * @return Collection<int, Cliente>
  90.      */
  91.     public function getClientes(): Collection
  92.     {
  93.         return $this->clientes;
  94.     }
  95.     public function addCliente(Cliente $cliente): static
  96.     {
  97.         if (!$this->clientes->contains($cliente)) {
  98.             $this->clientes->add($cliente);
  99.             $cliente->setClienteAll($this);
  100.         }
  101.         return $this;
  102.     }
  103.     public function removeCliente(Cliente $cliente): static
  104.     {
  105.         if ($this->clientes->removeElement($cliente)) {
  106.             // set the owning side to null (unless already changed)
  107.             if ($cliente->getClienteAll() === $this) {
  108.                 $cliente->setClienteAll(null);
  109.             }
  110.         }
  111.         return $this;
  112.     }
  113.     public function getLogo(): ?string
  114.     {
  115.         return $this->logo;
  116.     }
  117.     public function setLogo(?string $logo): static
  118.     {
  119.         $this->logo $logo;
  120.         return $this;
  121.     }
  122. }