<?phpnamespace App\Entity\System;use Doctrine\Common\Collections\ArrayCollection;use Symfony\Component\Validator\Constraints AS Assert;use Doctrine\ORM\Mapping AS ORM;use Ramsey\Uuid\Uuid;use Ramsey\Uuid\Lazy\LazyUuidFromString;use App\Entity\BaseEntity;/** * @ORM\Entity(repositoryClass="App\Repository\System\ConfigRepository") * @ORM\Table(name="system_config") */class Config extends BaseEntity{ /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="uuid") * @Assert\Uuid */ protected $uuid; /** * @var \DateTime * * @ORM\Column(type="datetime", nullable=false) * @Assert\Type("datetime") */ private $created; /** * @ORM\Column(name="`key`", type="string", length=60, unique=true, nullable=false) * @Assert\NotBlank() */ private $key; /** * @ORM\Column(type="text", nullable=true) */ private $value; public function __construct(array $defaults = array()) { // Defaults $this->setUuid(Uuid::uuid4()); $this->setCreated(new \DateTime()); parent::__construct($defaults); } public function getId(): ?int { return $this->id; } public function getUuid(): LazyUuidFromString { return $this->uuid; } public function setUuid(LazyUuidFromString $uuid): void { $this->uuid = $uuid; } public function setCreated(\DateTime $created): void { $this->created = $created; } public function getCreated(): \DateTime { return $this->created; } public function getKey(): string { return $this->key; } public function setKey(string $key): void { $this->key = $key; } public function getValue() { return $this->value; } public function setValue(string $value): void { $this->value = $value; }}