|
| 1 | +<?php |
| 2 | + |
| 3 | +/** |
| 4 | + * Copyright Talisman Innovations Ltd. (2016). All rights reserved |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | + * you may not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * @package qpush-bundle |
| 19 | + * @copyright Talisman Innovations Ltd. (2016) |
| 20 | + * @license Apache License, Version 2.0 |
| 21 | + */ |
| 22 | + |
| 23 | +namespace Uecode\Bundle\QPushBundle\Entity; |
| 24 | + |
| 25 | +use Doctrine\ORM\Mapping as ORM; |
| 26 | +use Doctrine\ORM\Mapping\Index as Index; |
| 27 | +use Gedmo\Mapping\Annotation as Gedmo; |
| 28 | + |
| 29 | +/** |
| 30 | + * @ORM\Entity |
| 31 | + * @ORM\Table(name="uecode_qpush_message", |
| 32 | + * indexes={@ORM\Index(name="uecode_qpush_queue_idx",columns={"queue"}), |
| 33 | + * @ORM\Index(name="uecode_qpush_delivered_idx",columns={"delivered"}), |
| 34 | + * @ORM\Index(name="uecode_qpush_created_idx",columns={"created"})}) |
| 35 | + */ |
| 36 | +class DoctrineMessage { |
| 37 | + /** |
| 38 | + * @ORM\Id |
| 39 | + * @ORM\GeneratedValue |
| 40 | + * @ORM\Column(type="integer") |
| 41 | + */ |
| 42 | + private $id; |
| 43 | + |
| 44 | + /** |
| 45 | + * @var \DateTime $created |
| 46 | + * |
| 47 | + * @Gedmo\Timestampable(on="create") |
| 48 | + * @ORM\Column(type="datetime") |
| 49 | + */ |
| 50 | + private $created; |
| 51 | + |
| 52 | + /** |
| 53 | + * @var \DateTime $updated |
| 54 | + * |
| 55 | + * @Gedmo\Timestampable(on="update") |
| 56 | + * @ORM\Column(type="datetime") |
| 57 | + */ |
| 58 | + private $updated; |
| 59 | + |
| 60 | + /** |
| 61 | + * |
| 62 | + * @ORM\Column(type="string") |
| 63 | + */ |
| 64 | + private $queue; |
| 65 | + |
| 66 | + /** |
| 67 | + * |
| 68 | + * @ORM\Column(type="boolean") |
| 69 | + */ |
| 70 | + private $delivered; |
| 71 | + |
| 72 | + /** |
| 73 | + * |
| 74 | + * @ORM\Column(type="array") |
| 75 | + */ |
| 76 | + private $message; |
| 77 | + |
| 78 | + /** |
| 79 | + * @ORM\Column(type="integer") |
| 80 | + */ |
| 81 | + private $length; |
| 82 | + |
| 83 | + /** |
| 84 | + * Get id |
| 85 | + * |
| 86 | + * @return integer |
| 87 | + */ |
| 88 | + public function getId() |
| 89 | + { |
| 90 | + return $this->id; |
| 91 | + } |
| 92 | + |
| 93 | + /** |
| 94 | + * Set message |
| 95 | + * |
| 96 | + * @param array $message |
| 97 | + * |
| 98 | + * @return DoctrineMessage |
| 99 | + */ |
| 100 | + public function setMessage($message) |
| 101 | + { |
| 102 | + $this->message = $message; |
| 103 | + |
| 104 | + return $this; |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Get message |
| 109 | + * |
| 110 | + * @return array |
| 111 | + */ |
| 112 | + public function getMessage() |
| 113 | + { |
| 114 | + return $this->message; |
| 115 | + } |
| 116 | + |
| 117 | + /** |
| 118 | + * Set queue |
| 119 | + * |
| 120 | + * @param string $queue |
| 121 | + * |
| 122 | + * @return DoctrineMessage |
| 123 | + */ |
| 124 | + public function setQueue($queue) |
| 125 | + { |
| 126 | + $this->queue = $queue; |
| 127 | + |
| 128 | + return $this; |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Get queue |
| 133 | + * |
| 134 | + * @return string |
| 135 | + */ |
| 136 | + public function getQueue() |
| 137 | + { |
| 138 | + return $this->queue; |
| 139 | + } |
| 140 | + |
| 141 | + /** |
| 142 | + * Set delivered |
| 143 | + * |
| 144 | + * @param boolean $delivered |
| 145 | + * |
| 146 | + * @return DoctrineMessage |
| 147 | + */ |
| 148 | + public function setDelivered($delivered) |
| 149 | + { |
| 150 | + $this->delivered = $delivered; |
| 151 | + |
| 152 | + return $this; |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * Get delivered |
| 157 | + * |
| 158 | + * @return boolean |
| 159 | + */ |
| 160 | + public function getDelivered() |
| 161 | + { |
| 162 | + return $this->delivered; |
| 163 | + } |
| 164 | + |
| 165 | + /** |
| 166 | + * Set created |
| 167 | + * |
| 168 | + * @param \DateTime $created |
| 169 | + * |
| 170 | + * @return DoctrineMessage |
| 171 | + */ |
| 172 | + public function setCreated($created) |
| 173 | + { |
| 174 | + $this->created = $created; |
| 175 | + |
| 176 | + return $this; |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * Get created |
| 181 | + * |
| 182 | + * @return \DateTime |
| 183 | + */ |
| 184 | + public function getCreated() |
| 185 | + { |
| 186 | + return $this->created; |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * Set updated |
| 191 | + * |
| 192 | + * @param \DateTime $updated |
| 193 | + * |
| 194 | + * @return DoctrineMessage |
| 195 | + */ |
| 196 | + public function setUpdated($updated) |
| 197 | + { |
| 198 | + $this->updated = $updated; |
| 199 | + |
| 200 | + return $this; |
| 201 | + } |
| 202 | + |
| 203 | + /** |
| 204 | + * Get updated |
| 205 | + * |
| 206 | + * @return \DateTime |
| 207 | + */ |
| 208 | + public function getUpdated() |
| 209 | + { |
| 210 | + return $this->updated; |
| 211 | + } |
| 212 | + |
| 213 | + /** |
| 214 | + * Set length |
| 215 | + * |
| 216 | + * @param integer $length |
| 217 | + * |
| 218 | + * @return DoctrineMessage |
| 219 | + */ |
| 220 | + public function setLength($length) |
| 221 | + { |
| 222 | + $this->length = $length; |
| 223 | + |
| 224 | + return $this; |
| 225 | + } |
| 226 | + |
| 227 | + /** |
| 228 | + * Get length |
| 229 | + * |
| 230 | + * @return integer |
| 231 | + */ |
| 232 | + public function getLength() |
| 233 | + { |
| 234 | + return $this->length; |
| 235 | + } |
| 236 | +} |
0 commit comments