src/Entity/ClienteEnvioBitcubo.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClienteEnvioBitcuboRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * ClienteEnvioBitcubo
  7.  *
  8.  * @ORM\Table(name="cliente_envio_bitcubo")
  9.  * @ORM\Entity(repositoryClass=ClienteEnvioBitcuboRepository::class)
  10.  */
  11. class ClienteEnvioBitcubo
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=ClienteBitcubo::class, inversedBy="direcciones")
  21.      */
  22.     private $cliente_bitcubo;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $direccion;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $complemento;
  31.     public function __toString(): string
  32.     {
  33.         $direccion $this->direccion ?? 'Sin dirección';
  34.         $complemento $this->complemento ' (' $this->complemento ')' '';
  35.         return $direccion $complemento;
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getDireccion(): ?string
  42.     {
  43.         return $this->direccion;
  44.     }
  45.     public function setDireccion(?string $direccion): static
  46.     {
  47.         $this->direccion $direccion;
  48.         return $this;
  49.     }
  50.     public function getComplemento(): ?string
  51.     {
  52.         return $this->complemento;
  53.     }
  54.     public function setComplemento(?string $complemento): static
  55.     {
  56.         $this->complemento $complemento;
  57.         return $this;
  58.     }
  59.     public function getClienteBitcubo(): ?ClienteBitcubo
  60.     {
  61.         return $this->cliente_bitcubo;
  62.     }
  63.     public function setClienteBitcubo(?ClienteBitcubo $cliente_bitcubo): static
  64.     {
  65.         $this->cliente_bitcubo $cliente_bitcubo;
  66.         return $this;
  67.     }
  68. }