src/Entity/CustomerMeta.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\CustomerMetaRepository")
  6.  */
  7. class CustomerMeta
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="bigint")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $metakey;
  19.     /**
  20.      * @ORM\Column(type="text")
  21.      */
  22.     private $metavalue;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="customermeta", cascade={"persist"})
  25.      * @ORM\JoinColumn(name="customer_id", referencedColumnName="id", onDelete="CASCADE")
  26.      */
  27.     private $customer;
  28.     
  29.     public function __construct ()
  30.     {
  31.         $this->metakey "";
  32.         $this->metavalue "";
  33.     }
  34.     public function getId()
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getMetakey(): ?string
  39.     {
  40.         return $this->metakey;
  41.     }
  42.     public function setMetakey(string $metakey null): self
  43.     {
  44.         if (is_null($metakey)) {
  45.             $metakey "";
  46.         }
  47.         
  48.         $this->metakey $metakey;
  49.         
  50.         return $this;
  51.     }
  52.     public function getMetavalue(): ?string
  53.     {
  54.         return $this->metavalue;
  55.     }
  56.     public function setMetavalue(string $metavalue null): self
  57.     {
  58.         if (is_null($metavalue)) {
  59.             $metavalue "";
  60.         }
  61.         
  62.         $this->metavalue $metavalue;
  63.         
  64.         return $this;
  65.     }
  66.     public function get4(): ?Customer
  67.     {
  68.         return $this->customer;
  69.     }
  70.     public function setCustomer(?Customer $customer): self
  71.     {
  72.         $this->customer $customer;
  73.         
  74.         return $this;
  75.     }
  76.     
  77.     public function __toString ()
  78.     {
  79.         return implode(":", [
  80.             $this->id,
  81.             $this->metakey,
  82.             $this->metavalue
  83.         ]);
  84.     }
  85.     
  86. }