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

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.     /**
  152.      * Set messageId
  153.      *
  154.      * @param string $messageId
  155.      *
  156.      * @return Thread
  157.      */
  158.     public function setMessageId($messageId)
  159.     {
  160.         $this->messageId $messageId;
  161.         return $this;
  162.     }
  163.     /**
  164.      * Get messageId
  165.      *
  166.      * @return string
  167.      */
  168.     public function getMessageId()
  169.     {
  170.         return $this->messageId;
  171.     }
  172.     /**
  173.      * Set threadType
  174.      *
  175.      * @param string $threadType
  176.      *
  177.      * @return Thread
  178.      */
  179.     public function setThreadType($threadType)
  180.     {
  181.         $this->threadType $threadType;
  182.         return $this;
  183.     }
  184.     /**
  185.      * Get threadType
  186.      *
  187.      * @return string
  188.      */
  189.     public function getThreadType()
  190.     {
  191.         return $this->threadType;
  192.     }
  193.     /**
  194.      * Set createdBy
  195.      *
  196.      * @param string $createdBy
  197.      *
  198.      * @return Thread
  199.      */
  200.     public function setCreatedBy($createdBy)
  201.     {
  202.         $this->createdBy $createdBy;
  203.         return $this;
  204.     }
  205.     /**
  206.      * Get createdBy
  207.      *
  208.      * @return string
  209.      */
  210.     public function getCreatedBy()
  211.     {
  212.         return $this->createdBy;
  213.     }
  214.     /**
  215.      * Set cc
  216.      *
  217.      * @param array $cc
  218.      *
  219.      * @return Thread
  220.      */
  221.     public function setCc($cc)
  222.     {
  223.         $this->cc $cc;
  224.         return $this;
  225.     }
  226.     /**
  227.      * Get cc
  228.      *
  229.      * @return array
  230.      */
  231.     public function getCc()
  232.     {
  233.         return $this->cc;
  234.     }
  235.     /**
  236.      * Set bcc
  237.      *
  238.      * @param array $bcc
  239.      *
  240.      * @return Thread
  241.      */
  242.     public function setBcc($bcc)
  243.     {
  244.         $this->bcc $bcc;
  245.         return $this;
  246.     }
  247.     /**
  248.      * Get bcc
  249.      *
  250.      * @return array
  251.      */
  252.     public function getBcc()
  253.     {
  254.         return $this->bcc;
  255.     }
  256.     /**
  257.      * Set replyTo
  258.      *
  259.      * @param array $replyTo
  260.      *
  261.      * @return Thread
  262.      */
  263.     public function setReplyTo($replyTo)
  264.     {
  265.         $this->replyTo $replyTo;
  266.         return $this;
  267.     }
  268.     /**
  269.      * Get replyTo
  270.      *
  271.      * @return array
  272.      */
  273.     public function getReplyTo()
  274.     {
  275.         return $this->replyTo;
  276.     }
  277.     /**
  278.      * Set deliveryStatus
  279.      *
  280.      * @param string $deliveryStatus
  281.      *
  282.      * @return Thread
  283.      */
  284.     public function setDeliveryStatus($deliveryStatus)
  285.     {
  286.         $this->deliveryStatus $deliveryStatus;
  287.         return $this;
  288.     }
  289.     /**
  290.      * Get deliveryStatus
  291.      *
  292.      * @return string
  293.      */
  294.     public function getDeliveryStatus()
  295.     {
  296.         return $this->deliveryStatus;
  297.     }
  298.     /**
  299.      * Set isLocked
  300.      *
  301.      * @param boolean $isLocked
  302.      *
  303.      * @return Thread
  304.      */
  305.     public function setIsLocked($isLocked)
  306.     {
  307.         $this->isLocked $isLocked;
  308.         return $this;
  309.     }
  310.     /**
  311.      * Get isLocked
  312.      *
  313.      * @return boolean
  314.      */
  315.     public function getIsLocked()
  316.     {
  317.         return $this->isLocked;
  318.     }
  319.     /**
  320.      * Set isBookmarked
  321.      *
  322.      * @param boolean $isBookmarked
  323.      *
  324.      * @return Thread
  325.      */
  326.     public function setIsBookmarked($isBookmarked)
  327.     {
  328.         $this->isBookmarked $isBookmarked;
  329.         return $this;
  330.     }
  331.     /**
  332.      * Get isBookmarked
  333.      *
  334.      * @return boolean
  335.      */
  336.     public function getIsBookmarked()
  337.     {
  338.         return $this->isBookmarked;
  339.     }
  340.     /**
  341.      * Set message
  342.      *
  343.      * @param string $message
  344.      *
  345.      * @return Thread
  346.      */
  347.     public function setMessage($message)
  348.     {
  349.         $this->message $message;
  350.         return $this;
  351.     }
  352.     /**
  353.      * Get message
  354.      *
  355.      * @return string
  356.      */
  357.     public function getMessage()
  358.     {
  359.         return $this->message;
  360.     }
  361.     /**
  362.      * Set createdAt
  363.      *
  364.      * @param \DateTime $createdAt
  365.      *
  366.      * @return Thread
  367.      */
  368.     public function setCreatedAt($createdAt)
  369.     {
  370.         $this->createdAt $createdAt;
  371.         return $this;
  372.     }
  373.     /**
  374.      * Get createdAt
  375.      *
  376.      * @return \DateTime
  377.      */
  378.     public function getCreatedAt()
  379.     {
  380.         return $this->createdAt;
  381.     }
  382.     /**
  383.      * Set updatedAt
  384.      *
  385.      * @param \DateTime $updatedAt
  386.      *
  387.      * @return Thread
  388.      */
  389.     public function setUpdatedAt($updatedAt)
  390.     {
  391.         $this->updatedAt $updatedAt;
  392.         return $this;
  393.     }
  394.     /**
  395.      * Get updatedAt
  396.      *
  397.      * @return \DateTime
  398.      */
  399.     public function getUpdatedAt()
  400.     {
  401.         return $this->updatedAt;
  402.     }
  403.     /**
  404.      * Set agentViewedAt
  405.      *
  406.      * @param \DateTime $agentViewedAt
  407.      *
  408.      * @return Thread
  409.      */
  410.     public function setAgentViewedAt($agentViewedAt)
  411.     {
  412.         $this->agentViewedAt $agentViewedAt;
  413.         return $this;
  414.     }
  415.     /**
  416.      * Get agentViewedAt
  417.      *
  418.      * @return \DateTime
  419.      */
  420.     public function getAgentViewedAt()
  421.     {
  422.         return $this->agentViewedAt;
  423.     }
  424.     /**
  425.      * Set customerViewedAt
  426.      *
  427.      * @param \DateTime $customerViewedAt
  428.      *
  429.      * @return Thread
  430.      */
  431.     public function setCustomerViewedAt($customerViewedAt)
  432.     {
  433.         $this->customerViewedAt $customerViewedAt;
  434.         return $this;
  435.     }
  436.     /**
  437.      * Get customerViewedAt
  438.      *
  439.      * @return \DateTime
  440.      */
  441.     public function getCustomerViewedAt()
  442.     {
  443.         return $this->customerViewedAt;
  444.     }
  445.     /**
  446.      * Set ticket
  447.      *
  448.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket $ticket
  449.      *
  450.      * @return Thread
  451.      */
  452.     public function setTicket(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket $ticket null)
  453.     {
  454.         $this->ticket $ticket;
  455.         return $this;
  456.     }
  457.     /**
  458.      * Get ticket
  459.      *
  460.      * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\Ticket
  461.      */
  462.     public function getTicket()
  463.     {
  464.         return $this->ticket;
  465.     }
  466.     /**
  467.      * Set user
  468.      *
  469.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\User $user
  470.      *
  471.      * @return Thread
  472.      */
  473.     public function setUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\User $user null)
  474.     {
  475.         $this->user $user;
  476.         return $this;
  477.     }
  478.     /**
  479.      * Get user
  480.      *
  481.      * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\User
  482.      */
  483.     public function getUser()
  484.     {
  485.         return $this->user;
  486.     }
  487.     /**
  488.      * Add attachments
  489.      *
  490.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments
  491.      * @return Thread
  492.      */
  493.     public function addAttachment(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments)
  494.     {
  495.         $this->attachments[] = $attachments;
  496.         return $this;
  497.     }
  498.     /**
  499.      * Remove attachments
  500.      *
  501.      * @param \Webkul\TicketBundle\Entity\Attachment $attachments
  502.      */
  503.     public function removeAttachment(\Webkul\UVDesk\CoreFrameworkBundle\Entity\Attachment $attachments)
  504.     {
  505.         $this->attachments->removeElement($attachments);
  506.     }
  507.     /**
  508.      * Get attachments
  509.      *
  510.      * @return \Doctrine\Common\Collections\Collection 
  511.      */
  512.     public function getAttachments()
  513.     {
  514.         return $this->attachments;
  515.     }
  516. }