src/Platform/QueueBundle/Entity/AsyncLog.php line 21

Open in your IDE?
  1. <?php
  2. namespace Platform\QueueBundle\Entity;
  3. use Cms\CoreBundle\Model\Interfaces\Timestampable\TimestampableInterface;
  4. use Cms\CoreBundle\Model\Interfaces\Timestampable\TimestampableTrait;
  5. use Cms\TenantBundle\Entity\Tenant;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * Class AsyncLog
  9.  * @package Platform\QueueBundle\Entity
  10.  *
  11.  * @ORM\Entity(
  12.  *     repositoryClass = "Platform\QueueBundle\Doctrine\Repository\AsyncLogRepository"
  13.  * )
  14.  * @ORM\Table(
  15.  *      name = "sys__queue__async_log",
  16.  * )
  17.  */
  18. class AsyncLog implements TimestampableInterface
  19. {
  20.     use TimestampableTrait;
  21.     /**
  22.      * @var int|null
  23.      *
  24.      * @ORM\Column(
  25.      *     type = "integer",
  26.      *     options = {
  27.      *         "unsigned" = true,
  28.      *     },
  29.      * )
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(
  32.      *     strategy = "AUTO",
  33.      * )
  34.      */
  35.     protected ?int $id null;
  36.     /**
  37.      * @var Tenant|null
  38.      *
  39.      * @ORM\ManyToOne(
  40.      *     targetEntity = "Cms\TenantBundle\Entity\Tenant",
  41.      * )
  42.      * @ORM\JoinColumn(
  43.      *     name = "tenant",
  44.      *     referencedColumnName = "id",
  45.      *     onDelete = "CASCADE",
  46.      *     nullable = true,
  47.      * )
  48.      */
  49.     protected ?Tenant $tenant null;
  50.     /**
  51.      * @var string|null
  52.      *
  53.      * @ORM\Column(
  54.      *     type = "string",
  55.      *     nullable = false,
  56.      * )
  57.      */
  58.     protected ?string $queueId null;
  59.     /**
  60.      * @var array
  61.      *
  62.      * @ORM\Column(
  63.      *     type = "json",
  64.      *     nullable = true,
  65.      * )
  66.      */
  67.     protected array $queueHeaders = [];
  68.     /**
  69.      * @var array
  70.      *
  71.      * @ORM\Column(
  72.      *     type = "json",
  73.      *     nullable = true,
  74.      * )
  75.      */
  76.     protected array $queueBody = [];
  77.     /**
  78.      * @var string|null
  79.      *
  80.      * @ORM\Column(
  81.      *     type = "text",
  82.      *     nullable = true,
  83.      * )
  84.      */
  85.     protected ?string $message null;
  86.     /**
  87.      * @var array
  88.      *
  89.      * @ORM\Column(
  90.      *     type = "json",
  91.      *     nullable = true,
  92.      * )
  93.      */
  94.     protected array $error = [];
  95.     /**
  96.      * @return int|null
  97.      */
  98.     public function getId(): ?int
  99.     {
  100.         return $this->id;
  101.     }
  102.     /**
  103.      * @param int|null $id
  104.      * @return $this
  105.      */
  106.     public function setId(?int $id): self
  107.     {
  108.         $this->id $id;
  109.         return $this;
  110.     }
  111.     /**
  112.      * @return Tenant|null
  113.      */
  114.     public function getTenant(): ?Tenant
  115.     {
  116.         return $this->tenant;
  117.     }
  118.     /**
  119.      * @param Tenant|null $tenant
  120.      * @return $this
  121.      */
  122.     public function setTenant(?Tenant $tenant): self
  123.     {
  124.         $this->tenant $tenant;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return string|null
  129.      */
  130.     public function getQueueId(): ?string
  131.     {
  132.         return $this->queueId;
  133.     }
  134.     /**
  135.      * @param string|null $queueId
  136.      * @return $this
  137.      */
  138.     public function setQueueId(?string $queueId): self
  139.     {
  140.         $this->queueId $queueId;
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return array
  145.      */
  146.     public function getQueueHeaders(): array
  147.     {
  148.         return $this->queueHeaders;
  149.     }
  150.     /**
  151.      * @param array $queueHeaders
  152.      * @return $this
  153.      */
  154.     public function setQueueHeaders(array $queueHeaders): self
  155.     {
  156.         $this->queueHeaders $queueHeaders;
  157.         return $this;
  158.     }
  159.     /**
  160.      * @return array
  161.      */
  162.     public function getQueueBody(): array
  163.     {
  164.         return $this->queueBody;
  165.     }
  166.     /**
  167.      * @param array $queueBody
  168.      * @return $this
  169.      */
  170.     public function setQueueBody(array $queueBody): self
  171.     {
  172.         $this->queueBody $queueBody;
  173.         return $this;
  174.     }
  175.     /**
  176.      * @return string|null
  177.      */
  178.     public function getMessage(): ?string
  179.     {
  180.         return $this->message;
  181.     }
  182.     /**
  183.      * @param string|null $message
  184.      * @return $this
  185.      */
  186.     public function setMessage(?string $message): self
  187.     {
  188.         $this->message $message;
  189.         return $this;
  190.     }
  191.     /**
  192.      * @return array
  193.      */
  194.     public function getError(): array
  195.     {
  196.         return $this->error;
  197.     }
  198.     /**
  199.      * @param array $error
  200.      * @return $this
  201.      */
  202.     public function setError(array $error): self
  203.     {
  204.         $this->error $error;
  205.         return $this;
  206.     }
  207. }