Skip to content

Instantly share code, notes, and snippets.

@erop
Created April 27, 2021 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erop/0ba9fddf1416a944cc7c6b431a9d4132 to your computer and use it in GitHub Desktop.
Save erop/0ba9fddf1416a944cc7c6b431a9d4132 to your computer and use it in GitHub Desktop.
<?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