<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CustomerMetaRepository")
*/
class CustomerMeta
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="bigint")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $metakey;
/**
* @ORM\Column(type="text")
*/
private $metavalue;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="customermeta", cascade={"persist"})
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $customer;
public function __construct ()
{
$this->metakey = "";
$this->metavalue = "";
}
public function getId()
{
return $this->id;
}
public function getMetakey(): ?string
{
return $this->metakey;
}
public function setMetakey(string $metakey = null): self
{
if (is_null($metakey)) {
$metakey = "";
}
$this->metakey = $metakey;
return $this;
}
public function getMetavalue(): ?string
{
return $this->metavalue;
}
public function setMetavalue(string $metavalue = null): self
{
if (is_null($metavalue)) {
$metavalue = "";
}
$this->metavalue = $metavalue;
return $this;
}
public function get4(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function __toString ()
{
return implode(":", [
$this->id,
$this->metakey,
$this->metavalue
]);
}
}