vendor/uvdesk/core-framework/Entity/Thread.php line 544

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\CoreFrameworkBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Thread
  6. *
  7. * @ORM\Entity(repositoryClass="Webkul\UVDesk\CoreFrameworkBundle\Repository\ThreadRepository")
  8. * @ORM\HasLifecycleCallbacks()
  9. * @ORM\Table(name="uv_thread")
  10. *
  11. */
  12. class Thread
  13. {
  14. /**
  15. * @var integer
  16. * @ORM\Id()
  17. * @ORM\Column(type="integer")
  18. * @ORM\GeneratedValue(strategy="AUTO")
  19. */
  20. private $id;
  21. /**
  22. * @var string
  23. * @ORM\Column(type="string", length=191)
  24. */
  25. private $source;
  26. /**
  27. * @var string
  28. * @ORM\Column(type="text", nullable=true)
  29. */
  30. private $messageId;
  31. /**
  32. * @var string
  33. * @ORM\Column(type="string", length=191)
  34. */
  35. private $threadType;
  36. /**
  37. * @var string
  38. * @ORM\Column(type="string", length=191)
  39. */
  40. private $createdBy;
  41. /**
  42. * @var array
  43. * @ORM\Column(type="array", nullable=true)
  44. */
  45. private $cc;
  46. /**
  47. * @var array
  48. * @ORM\Column(type="array", nullable=true)
  49. */
  50. private $bcc;
  51. /**
  52. * @var array
  53. * @ORM\Column(type="array", nullable=true)
  54. */
  55. private $replyTo;
  56. /**
  57. * @var string
  58. * @ORM\Column(type="string", length=255, nullable=true)
  59. */
  60. private $deliveryStatus;
  61. /**
  62. * @var boolean
  63. * @ORM\Column(type="boolean", options={"default": false})
  64. */
  65. private $isLocked = false;
  66. /**
  67. * @var boolean
  68. * @ORM\Column(type="boolean", options={"default": false})
  69. */
  70. private $isBookmarked = false;
  71. /**
  72. * @var string
  73. * @ORM\Column(type="text", nullable=true)
  74. */
  75. private $message;
  76. /**
  77. * @var \DateTime
  78. * @ORM\Column(type="datetime")
  79. */
  80. private $createdAt;
  81. /**
  82. * @var \DateTime
  83. * @ORM\Column(type="datetime")
  84. */
  85. private $updatedAt;
  86. /**
  87. * @var \DateTime
  88. * @ORM\Column(type="datetime", nullable=true)
  89. */
  90. private $agentViewedAt;
  91. /**
  92. * @var \DateTime
  93. * @ORM\Column(type="datetime", nullable=true)
  94. */
  95. private $customerViewedAt;
  96. /**
  97. * @var \Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket
  98. * @ORM\ManyToOne(targetEntity="Ticket", inversedBy="threads")
  99. * @ORM\JoinColumn(name="ticket_id", referencedColumnName="id", onDelete="CASCADE")
  100. */
  101. private $ticket;
  102. /**
  103. * @var \Webkul\UVDesk\CoreFrameworkBundle\Entity\User
  104. * @ORM\ManyToOne(targetEntity="User")
  105. * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  106. */
  107. private $user;
  108. /**
  109. * @var \Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment
  110. * @ORM\OneToMany(targetEntity="Attachment", mappedBy="thread", cascade={"remove"}, orphanRemoval=true)
  111. */
  112. private $attachments;
  113. /**
  114. * Constructor
  115. */
  116. public function __construct()
  117. {
  118. $this->attachments = new \Doctrine\Common\Collections\ArrayCollection();
  119. }
  120. /**
  121. * Get id
  122. *
  123. * @return integer
  124. */
  125. public function getId()
  126. {
  127. return $this->id;
  128. }
  129. /**
  130. * Set source
  131. *
  132. * @param string $source
  133. *
  134. * @return Thread
  135. */
  136. public function setSource($source)
  137. {
  138. $this->source = $source;
  139. return $this;
  140. }
  141. /**
  142. * Get source
  143. *
  144. * @return string
  145. */
  146. public function getSource()
  147. {
  148. return $this->source;
  149. }
  150. /**
  151. * Set messageId
  152. *
  153. * @param string $messageId
  154. *
  155. * @return Thread
  156. */
  157. public function setMessageId($messageId)
  158. {
  159. $this->messageId = $messageId;
  160. return $this;
  161. }
  162. /**
  163. * Get messageId
  164. *
  165. * @return string
  166. */
  167. public function getMessageId()
  168. {
  169. return $this->messageId;
  170. }
  171. /**
  172. * Set threadType
  173. *
  174. * @param string $threadType
  175. *
  176. * @return Thread
  177. */
  178. public function setThreadType($threadType)
  179. {
  180. $this->threadType = $threadType;
  181. return $this;
  182. }
  183. /**
  184. * Get threadType
  185. *
  186. * @return string
  187. */
  188. public function getThreadType()
  189. {
  190. return $this->threadType;
  191. }
  192. /**
  193. * Set createdBy
  194. *
  195. * @param string $createdBy
  196. *
  197. * @return Thread
  198. */
  199. public function setCreatedBy($createdBy)
  200. {
  201. $this->createdBy = $createdBy;
  202. return $this;
  203. }
  204. /**
  205. * Get createdBy
  206. *
  207. * @return string
  208. */
  209. public function getCreatedBy()
  210. {
  211. return $this->createdBy;
  212. }
  213. /**
  214. * Set cc
  215. *
  216. * @param array $cc
  217. *
  218. * @return Thread
  219. */
  220. public function setCc($cc)
  221. {
  222. $this->cc = $cc;
  223. return $this;
  224. }
  225. /**
  226. * Get cc
  227. *
  228. * @return array
  229. */
  230. public function getCc()
  231. {
  232. return $this->cc;
  233. }
  234. /**
  235. * Set bcc
  236. *
  237. * @param array $bcc
  238. *
  239. * @return Thread
  240. */
  241. public function setBcc($bcc)
  242. {
  243. $this->bcc = $bcc;
  244. return $this;
  245. }
  246. /**
  247. * Get bcc
  248. *
  249. * @return array
  250. */
  251. public function getBcc()
  252. {
  253. return $this->bcc;
  254. }
  255. /**
  256. * Set replyTo
  257. *
  258. * @param array $replyTo
  259. *
  260. * @return Thread
  261. */
  262. public function setReplyTo($replyTo)
  263. {
  264. $this->replyTo = $replyTo;
  265. return $this;
  266. }
  267. /**
  268. * Get replyTo
  269. *
  270. * @return array
  271. */
  272. public function getReplyTo()
  273. {
  274. return $this->replyTo;
  275. }
  276. /**
  277. * Set deliveryStatus
  278. *
  279. * @param string $deliveryStatus
  280. *
  281. * @return Thread
  282. */
  283. public function setDeliveryStatus($deliveryStatus)
  284. {
  285. $this->deliveryStatus = $deliveryStatus;
  286. return $this;
  287. }
  288. /**
  289. * Get deliveryStatus
  290. *
  291. * @return string
  292. */
  293. public function getDeliveryStatus()
  294. {
  295. return $this->deliveryStatus;
  296. }
  297. /**
  298. * Set isLocked
  299. *
  300. * @param boolean $isLocked
  301. *
  302. * @return Thread
  303. */
  304. public function setIsLocked($isLocked)
  305. {
  306. $this->isLocked = $isLocked;
  307. return $this;
  308. }
  309. /**
  310. * Get isLocked
  311. *
  312. * @return boolean
  313. */
  314. public function getIsLocked()
  315. {
  316. return $this->isLocked;
  317. }
  318. /**
  319. * Set isBookmarked
  320. *
  321. * @param boolean $isBookmarked
  322. *
  323. * @return Thread
  324. */
  325. public function setIsBookmarked($isBookmarked)
  326. {
  327. $this->isBookmarked = $isBookmarked;
  328. return $this;
  329. }
  330. /**
  331. * Get isBookmarked
  332. *
  333. * @return boolean
  334. */
  335. public function getIsBookmarked()
  336. {
  337. return $this->isBookmarked;
  338. }
  339. /**
  340. * Set message
  341. *
  342. * @param string $message
  343. *
  344. * @return Thread
  345. */
  346. public function setMessage($message)
  347. {
  348. $this->message = $message;
  349. return $this;
  350. }
  351. /**
  352. * Get message
  353. *
  354. * @return string
  355. */
  356. public function getMessage()
  357. {
  358. return $this->message;
  359. }
  360. /**
  361. * Set createdAt
  362. *
  363. * @param \DateTime $createdAt
  364. *
  365. * @return Thread
  366. */
  367. public function setCreatedAt($createdAt)
  368. {
  369. $this->createdAt = $createdAt;
  370. return $this;
  371. }
  372. /**
  373. * Get createdAt
  374. *
  375. * @return \DateTime
  376. */
  377. public function getCreatedAt()
  378. {
  379. return $this->createdAt;
  380. }
  381. /**
  382. * Set updatedAt
  383. *
  384. * @param \DateTime $updatedAt
  385. *
  386. * @return Thread
  387. */
  388. public function setUpdatedAt($updatedAt)
  389. {
  390. $this->updatedAt = $updatedAt;
  391. return $this;
  392. }
  393. /**
  394. * Get updatedAt
  395. *
  396. * @return \DateTime
  397. */
  398. public function getUpdatedAt()
  399. {
  400. return $this->updatedAt;
  401. }
  402. /**
  403. * Set agentViewedAt
  404. *
  405. * @param \DateTime $agentViewedAt
  406. *
  407. * @return Thread
  408. */
  409. public function setAgentViewedAt($agentViewedAt)
  410. {
  411. $this->agentViewedAt = $agentViewedAt;
  412. return $this;
  413. }
  414. /**
  415. * Get agentViewedAt
  416. *
  417. * @return \DateTime
  418. */
  419. public function getAgentViewedAt()
  420. {
  421. return $this->agentViewedAt;
  422. }
  423. /**
  424. * Set customerViewedAt
  425. *
  426. * @param \DateTime $customerViewedAt
  427. *
  428. * @return Thread
  429. */
  430. public function setCustomerViewedAt($customerViewedAt)
  431. {
  432. $this->customerViewedAt = $customerViewedAt;
  433. return $this;
  434. }
  435. /**
  436. * Get customerViewedAt
  437. *
  438. * @return \DateTime
  439. */
  440. public function getCustomerViewedAt()
  441. {
  442. return $this->customerViewedAt;
  443. }
  444. /**
  445. * Set ticket
  446. *
  447. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket $ticket
  448. *
  449. * @return Thread
  450. */
  451. public function setTicket(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket $ticket = null)
  452. {
  453. $this->ticket = $ticket;
  454. return $this;
  455. }
  456. /**
  457. * Get ticket
  458. *
  459. * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket
  460. */
  461. public function getTicket()
  462. {
  463. return $this->ticket;
  464. }
  465. /**
  466. * Set user
  467. *
  468. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\User $user
  469. *
  470. * @return Thread
  471. */
  472. public function setUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\User $user = null)
  473. {
  474. $this->user = $user;
  475. return $this;
  476. }
  477. /**
  478. * Get user
  479. *
  480. * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\User
  481. */
  482. public function getUser()
  483. {
  484. return $this->user;
  485. }
  486. /**
  487. * Add attachments
  488. *
  489. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments
  490. * @return Thread
  491. */
  492. public function addAttachment(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments)
  493. {
  494. $this->attachments[] = $attachments;
  495. return $this;
  496. }
  497. /**
  498. * Remove attachments
  499. *
  500. * @param \Webkul\TicketBundle\Entity\Attachment $attachments
  501. */
  502. public function removeAttachment(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments)
  503. {
  504. $this->attachments->removeElement($attachments);
  505. }
  506. /**
  507. * Get attachments
  508. *
  509. * @return \Doctrine\Common\Collections\Collection
  510. */
  511. public function getAttachments()
  512. {
  513. return $this->attachments;
  514. }
  515. }