src/Entity/SupportTicketResponseEntity.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\SupportTicketResponseRepository")
  9.  * @ORM\Table(name="support_ticket_response")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class SupportTicketResponseEntity
  13. {
  14.     /**
  15.      * @ORM\Column(type="bigint")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     protected $id;
  20.     /**
  21.      * @ORM\Column(type="text")
  22.      */
  23.     protected $message;
  24.      /**
  25.      * @ORM\Column(name="status", type="string")
  26.      */
  27.     protected $status;
  28.     /**
  29.      * @ORM\Column(name="created_by", type="string", length=50)
  30.      */
  31.     protected $createdBy;
  32.     /**
  33.      * @ORM\Column(name="created_at", type="datetime")
  34.      */
  35.     protected $createdAt;
  36.     /**
  37.      * @ORM\Column(name="updated_by", type="string", length=50)
  38.      */
  39.     protected $updatedBy;
  40.     /**
  41.      * @ORM\Column(name="updated_at", type="datetime")
  42.      */
  43.     protected $updatedAt;
  44.      /**
  45.      * @ORM\ManyToOne(targetEntity="SupportTicketEntity", inversedBy="supportTicketResponses")
  46.      * @ORM\JoinColumn(name="support_ticket_id", referencedColumnName="id")
  47.      */
  48.     protected $supportTicket;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="UserEntity", inversedBy="supportTicketResponses")
  51.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  52.      */
  53.     protected $user;
  54.     /**
  55.      * Set createdAt
  56.      *
  57.      * @ORM\PrePersist
  58.      */
  59.     public function setCreatedAtValue()
  60.     {
  61.         $this->createdBy = isset($_COOKIE['username']) ? $_COOKIE['username'] : 'System';
  62.         $this->createdAt = new \DateTime();
  63.         $this->updatedBy = isset($_COOKIE['username']) ? $_COOKIE['username'] : 'System';
  64.         $this->updatedAt = new \DateTime();
  65.         $this->status "Unread";
  66.     }
  67.     /**
  68.      * Set updatedAt
  69.      *
  70.      * @ORM\PreUpdate
  71.      */
  72.     public function setUpdatedAtValue()
  73.     {
  74.         $this->updatedBy = isset($_COOKIE['username']) ? $_COOKIE['username'] : 'System';
  75.         $this->updatedAt = new \DateTime();
  76.     }
  77.     public function __construct($data null)
  78.     {
  79.         if (!is_null($data)) {
  80.         }
  81.      
  82.     }
  83.     /*--------------------------------------------------------------------------------------------------------*/
  84.     /*                        Defined Setters and Getters                                                          */
  85.     /*--------------------------------------------------------------------------------------------------------*/
  86.     /**
  87.      * Get id.
  88.      *
  89.      * @return int
  90.      */
  91.     public function getId()
  92.     {
  93.         return $this->id;
  94.     }
  95.     /**
  96.      * Set message.
  97.      *
  98.      * @param string $message
  99.      *
  100.      * @return SupportTicketResponseEntity
  101.      */
  102.     public function setMessage($message)
  103.     {
  104.         $this->message $message;
  105.         return $this;
  106.     }
  107.     /**
  108.      * Get message.
  109.      *
  110.      * @return string
  111.      */
  112.     public function getMessage()
  113.     {
  114.         return $this->message;
  115.     }
  116.     /**
  117.      * Set status.
  118.      *
  119.      * @param string $status
  120.      *
  121.      * @return SupportTicketResponseEntity
  122.      */
  123.     public function setStatus($status)
  124.     {
  125.         $this->status $status;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Get status.
  130.      *
  131.      * @return string
  132.      */
  133.     public function getStatus()
  134.     {
  135.         return $this->status;
  136.     }
  137.     /**
  138.      * Set createdBy.
  139.      *
  140.      * @param string $createdBy
  141.      *
  142.      * @return SupportTicketResponseEntity
  143.      */
  144.     public function setCreatedBy($createdBy)
  145.     {
  146.         $this->createdBy $createdBy;
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get createdBy.
  151.      *
  152.      * @return string
  153.      */
  154.     public function getCreatedBy()
  155.     {
  156.         return $this->createdBy;
  157.     }
  158.     /**
  159.      * Set createdAt.
  160.      *
  161.      * @param \DateTime $createdAt
  162.      *
  163.      * @return SupportTicketResponseEntity
  164.      */
  165.     public function setCreatedAt($createdAt)
  166.     {
  167.         $this->createdAt $createdAt;
  168.         return $this;
  169.     }
  170.     /**
  171.      * Get createdAt.
  172.      *
  173.      * @return \DateTime
  174.      */
  175.     public function getCreatedAt()
  176.     {
  177.         return $this->createdAt;
  178.     }
  179.     /**
  180.      * Set updatedBy.
  181.      *
  182.      * @param string $updatedBy
  183.      *
  184.      * @return SupportTicketResponseEntity
  185.      */
  186.     public function setUpdatedBy($updatedBy)
  187.     {
  188.         $this->updatedBy $updatedBy;
  189.         return $this;
  190.     }
  191.     /**
  192.      * Get updatedBy.
  193.      *
  194.      * @return string
  195.      */
  196.     public function getUpdatedBy()
  197.     {
  198.         return $this->updatedBy;
  199.     }
  200.     /**
  201.      * Set updatedAt.
  202.      *
  203.      * @param \DateTime $updatedAt
  204.      *
  205.      * @return SupportTicketResponseEntity
  206.      */
  207.     public function setUpdatedAt($updatedAt)
  208.     {
  209.         $this->updatedAt $updatedAt;
  210.         return $this;
  211.     }
  212.     /**
  213.      * Get updatedAt.
  214.      *
  215.      * @return \DateTime
  216.      */
  217.     public function getUpdatedAt()
  218.     {
  219.         return $this->updatedAt;
  220.     }
  221.     /**
  222.      * Set supportTicket.
  223.      *
  224.      * @param \App\Entity\SupportTicketEntity|null $supportTicket
  225.      *
  226.      * @return SupportTicketResponseEntity
  227.      */
  228.     public function setSupportTicket(\App\Entity\SupportTicketEntity $supportTicket null)
  229.     {
  230.         $this->supportTicket $supportTicket;
  231.         return $this;
  232.     }
  233.     /**
  234.      * Get supportTicket.
  235.      *
  236.      * @return \App\Entity\SupportTicketEntity|null
  237.      */
  238.     public function getSupportTicket()
  239.     {
  240.         return $this->supportTicket;
  241.     }
  242.     /**
  243.      * Set user.
  244.      *
  245.      * @param \App\Entity\UserEntity|null $user
  246.      *
  247.      * @return SupportTicketResponseEntity
  248.      */
  249.     public function setUser(\App\Entity\UserEntity $user null)
  250.     {
  251.         $this->user $user;
  252.         return $this;
  253.     }
  254.     /**
  255.      * Get user.
  256.      *
  257.      * @return \App\Entity\UserEntity|null
  258.      */
  259.     public function getUser()
  260.     {
  261.         return $this->user;
  262.     }
  263. }