src/Entity/MessengerMessages.php line 67

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use JsonSerializable;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * Class MessengerMessages
  9. * @package App\Entity
  10. *
  11. * @ORM\Entity
  12. * @ORM\Table(name="messenger_messages")
  13. */
  14. class MessengerMessages implements JsonSerializable
  15. {
  16.     /**
  17.      * @ORM\Id()
  18.      * @ORM\GeneratedValue()
  19.      * @ORM\Column(type="bigint")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\Column(type="text")
  24.      */
  25.     private $body;
  26.     /**
  27.      * @ORM\Column(type="text")
  28.      */
  29.     private $headers;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $queueName;
  34.     /**
  35.      * @ORM\Column(type="datetime")
  36.      */
  37.     private $createdAt;
  38.     /**
  39.      * @ORM\Column(type="datetime")
  40.      */
  41.     private $availableAt;
  42.     /**
  43.      * @ORM\Column(type="datetime", nullable=true)
  44.      */
  45.     private $deliveredAt;
  46.     public function __construct()
  47.     {
  48.     }
  49.     public function __toString(){
  50.         return (string) $this->id;
  51.     }
  52.     public function jsonSerialize()
  53.     {
  54.         return array(
  55.             'id'=> $this->id,
  56.             'body' => $this->body,
  57.             'headers' => $this->headers,
  58.             'queueName' => $this->queueName,
  59.             'createdAt' => $this->createdAt,
  60.             'availableAt' => $this->availableAt,
  61.             'deliveredAt' => $this->deliveredAt,
  62.         );
  63.     }
  64.     /**
  65.      * get id
  66.      *
  67.      * @return integer
  68.      */
  69.     public function getId()
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function setId($id)
  74.     {
  75.         $this->id $id;
  76.         return $this;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getBody()
  82.     {
  83.         return $this->body;
  84.     }
  85.     /**
  86.      * @param mixed $body
  87.      */
  88.     public function setBody($body): MessengerMessages
  89.     {
  90.         $this->body $body;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return mixed
  95.      */
  96.     public function getHeaders()
  97.     {
  98.         return $this->headers;
  99.     }
  100.     /**
  101.      * @param mixed $headers
  102.      */
  103.     public function setHeaders($headers): MessengerMessages
  104.     {
  105.         $this->headers $headers;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return mixed
  110.      */
  111.     public function getQueueName()
  112.     {
  113.         return $this->queueName;
  114.     }
  115.     /**
  116.      * @param mixed $queueName
  117.      */
  118.     public function setQueueName($queueName): MessengerMessages
  119.     {
  120.         $this->queueName $queueName;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return mixed
  125.      */
  126.     public function getCreatedAt()
  127.     {
  128.         return $this->createdAt;
  129.     }
  130.     /**
  131.      * @param mixed $createdAt
  132.      */
  133.     public function setCreatedAt($createdAt): MessengerMessages
  134.     {
  135.         $this->createdAt $createdAt;
  136.         return $this;
  137.     }
  138.     /**
  139.      * @return mixed
  140.      */
  141.     public function getAvailableAt()
  142.     {
  143.         return $this->availableAt;
  144.     }
  145.     /**
  146.      * @param mixed $availableAt
  147.      */
  148.     public function setAvailableAt($availableAt): MessengerMessages
  149.     {
  150.         $this->availableAt $availableAt;
  151.         return $this;
  152.     }
  153.     /**
  154.      * @return mixed
  155.      */
  156.     public function getDeliveredAt()
  157.     {
  158.         return $this->deliveredAt;
  159.     }
  160.     /**
  161.      * @param mixed $deliveredAt
  162.      */
  163.     public function setDeliveredAt($deliveredAt): MessengerMessages
  164.     {
  165.         $this->deliveredAt $deliveredAt;
  166.         return $this;
  167.     }
  168. }