Created
April 27, 2021 13:25
-
-
Save erop/0ba9fddf1416a944cc7c6b431a9d4132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\ORM\Mapping\Entity; | |
/** | |
* @Entity | |
*/ | |
final class Document | |
{ | |
/** | |
* @ORM\Id() | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @ORM\Column(type="integer") | |
*/ | |
private int $id; | |
/** | |
* @ORM\Column(type="json_document", options={"jsonb": true}) | |
*/ | |
private object $payload; | |
public function __construct(object $payload) | |
{ | |
$this->payload = $payload; | |
} | |
public function getId(): int | |
{ | |
return $this->id; | |
} | |
public function getPayload(): object | |
{ | |
return $this->payload; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment