<?php
namespace App\Entity;
use JsonSerializable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* Class MessengerMessages
* @package App\Entity
*
* @ORM\Entity
* @ORM\Table(name="messenger_messages")
*/
class MessengerMessages implements JsonSerializable
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="bigint")
*/
private $id;
/**
* @ORM\Column(type="text")
*/
private $body;
/**
* @ORM\Column(type="text")
*/
private $headers;
/**
* @ORM\Column(type="string", length=255)
*/
private $queueName;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime")
*/
private $availableAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deliveredAt;
public function __construct()
{
}
public function __toString(){
return (string) $this->id;
}
public function jsonSerialize()
{
return array(
'id'=> $this->id,
'body' => $this->body,
'headers' => $this->headers,
'queueName' => $this->queueName,
'createdAt' => $this->createdAt,
'availableAt' => $this->availableAt,
'deliveredAt' => $this->deliveredAt,
);
}
/**
* get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return mixed
*/
public function getBody()
{
return $this->body;
}
/**
* @param mixed $body
*/
public function setBody($body): MessengerMessages
{
$this->body = $body;
return $this;
}
/**
* @return mixed
*/
public function getHeaders()
{
return $this->headers;
}
/**
* @param mixed $headers
*/
public function setHeaders($headers): MessengerMessages
{
$this->headers = $headers;
return $this;
}
/**
* @return mixed
*/
public function getQueueName()
{
return $this->queueName;
}
/**
* @param mixed $queueName
*/
public function setQueueName($queueName): MessengerMessages
{
$this->queueName = $queueName;
return $this;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
*/
public function setCreatedAt($createdAt): MessengerMessages
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return mixed
*/
public function getAvailableAt()
{
return $this->availableAt;
}
/**
* @param mixed $availableAt
*/
public function setAvailableAt($availableAt): MessengerMessages
{
$this->availableAt = $availableAt;
return $this;
}
/**
* @return mixed
*/
public function getDeliveredAt()
{
return $this->deliveredAt;
}
/**
* @param mixed $deliveredAt
*/
public function setDeliveredAt($deliveredAt): MessengerMessages
{
$this->deliveredAt = $deliveredAt;
return $this;
}
}