<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\UserMetaRepository")
*/
class UserMeta
{
/**
* @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\User", inversedBy="usermeta")
* @ORM\JoinColumn(nullable=true)
*/
private $user;
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): self
{
if (is_null($metakey)) {
$metakey = "";
}
$this->metakey = $metakey;
return $this;
}
public function getMetavalue(): ?string
{
return $this->metavalue;
}
public function setMetavalue(?string $metavalue): self
{
if (is_null($metavalue)) {
$metavalue = "";
}
$this->metavalue = $metavalue;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function __toString ()
{
return implode(":", [
$this->id,
$this->metakey,
$this->metavalue,
]);
}
}