vendor/uvdesk/automation-bundle/Entity/PreparedResponses.php line 267

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\AutomationBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * PreparedResponses
  6.  * @ORM\HasLifecycleCallbacks()
  7.  * @ORM\Entity(repositoryClass="Webkul\UVDesk\AutomationBundle\Repository\PreparedResponsesRepository")
  8.  * @ORM\Table(name="uv_prepared_responses")
  9.  */
  10. class PreparedResponses
  11. {
  12.     /**
  13.      * @var integer
  14.      * @ORM\Id()
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\GeneratedValue
  17.      */
  18.     private $id;
  19.     /**
  20.      * @var string
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $name;
  24.     /**
  25.      * @var string
  26.      * @ORM\Column(type="text", nullable=true)
  27.      */
  28.     private $description;
  29.     /**
  30.      * @var string
  31.      * @ORM\Column(type="string", length=255, nullable=true, options={"default": "public"})
  32.      */
  33.     private $type;
  34.     /**
  35.      * @var array
  36.      * @ORM\Column(type="array")
  37.      */
  38.     private $actions;
  39.     /**
  40.      * @var boolean
  41.      * @ORM\Column(type="boolean", nullable=true, options={"default": true})
  42.      */
  43.     private $status;
  44.     /**
  45.      * @var \DateTime
  46.      * @ORM\Column(type="datetime")
  47.      */
  48.     private $dateAdded;
  49.     /**
  50.      * @var \DateTime
  51.      * @ORM\Column(type="datetime")
  52.      */
  53.     private $dateUpdated;
  54.     /**
  55.      * Get id
  56.      *
  57.      * @return integer 
  58.      */
  59.     public function getId()
  60.     {
  61.         return $this->id;
  62.     }
  63.     /**
  64.      * Set name
  65.      *
  66.      * @param string $name
  67.      * @return PreparedResponses
  68.      */
  69.     public function setName($name)
  70.     {
  71.         $this->name $name;
  72.         return $this;
  73.     }
  74.     /**
  75.      * Get name
  76.      *
  77.      * @return string 
  78.      */
  79.     public function getName()
  80.     {
  81.         return $this->name;
  82.     }
  83.     /**
  84.      * Set description
  85.      *
  86.      * @param string $description
  87.      * @return PreparedResponses
  88.      */
  89.     public function setDescription($description)
  90.     {
  91.         $this->description $description;
  92.         return $this;
  93.     }
  94.     /**
  95.      * Get description
  96.      *
  97.      * @return string 
  98.      */
  99.     public function getDescription()
  100.     {
  101.         return $this->description;
  102.     }
  103.     /**
  104.      * Set type
  105.      *
  106.      * @param string $type
  107.      * @return PreparedResponses
  108.      */
  109.     public function setType($type)
  110.     {
  111.         $this->type $type;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get type
  116.      *
  117.      * @return string 
  118.      */
  119.     public function getType()
  120.     {
  121.         return $this->type;
  122.     }
  123.     /**
  124.      * Set actions
  125.      *
  126.      * @param array $actions
  127.      * @return PreparedResponses
  128.      */
  129.     public function setActions($actions)
  130.     {
  131.         $this->actions $actions;
  132.         return $this;
  133.     }
  134.     /**
  135.      * Get actions
  136.      *
  137.      * @return array 
  138.      */
  139.     public function getActions()
  140.     {
  141.         return $this->actions;
  142.     }
  143.     /**
  144.      * Set status
  145.      *
  146.      * @param boolean $status
  147.      * @return PreparedResponses
  148.      */
  149.     public function setStatus($status)
  150.     {
  151.         $this->status $status;
  152.         return $this;
  153.     }
  154.     /**
  155.      * Get status
  156.      *
  157.      * @return boolean 
  158.      */
  159.     public function getStatus()
  160.     {
  161.         return $this->status;
  162.     }
  163.     /**
  164.      * Set dateAdded
  165.      *
  166.      * @param \DateTime $dateAdded
  167.      * @return PreparedResponses
  168.      */
  169.     public function setDateAdded($dateAdded)
  170.     {
  171.         $this->dateAdded $dateAdded;
  172.         return $this;
  173.     }
  174.     /**
  175.      * Get dateAdded
  176.      *
  177.      * @return \DateTime 
  178.      */
  179.     public function getDateAdded()
  180.     {
  181.         return $this->dateAdded;
  182.     }
  183.     /**
  184.      * Set dateUpdated
  185.      *
  186.      * @param \DateTime $dateUpdated
  187.      * @return PreparedResponses
  188.      */
  189.     public function setDateUpdated($dateUpdated)
  190.     {
  191.         $this->dateUpdated $dateUpdated;
  192.         return $this;
  193.     }
  194.     /**
  195.      * Get dateUpdated
  196.      *
  197.      * @return \DateTime 
  198.      */
  199.     public function getDateUpdated()
  200.     {
  201.         return $this->dateUpdated;
  202.     }
  203.     /**
  204.      * @ORM\PrePersist
  205.      */
  206.     public function setCreatedAtValue()
  207.     {
  208.         $this->dateAdded = new \DateTime();
  209.         $this->dateUpdated = new \DateTime();
  210.     }
  211.     /**
  212.      * @ORM\PreUpdate
  213.      */
  214.     public function setUpdatedAtValue()
  215.     {
  216.         $this->dateUpdated = new \DateTime();
  217.     }
  218.     /**
  219.      * @var \Webkul\UserBundle\Entity\UserData
  220.      * @ORM\ManyToOne(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance")
  221.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  222.      */
  223.     private $user;
  224.     /**
  225.      * Set user
  226.      *
  227.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user
  228.      * @return PreparedResponses
  229.      */
  230.     public function setUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user null)
  231.     {
  232.         $this->user $user;
  233.         return $this;
  234.     }
  235.     /**
  236.      * Get user
  237.      *
  238.      * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance 
  239.      */
  240.     public function getUser()
  241.     {
  242.         return $this->user;
  243.     }
  244.     /**
  245.      * @var \Doctrine\Common\Collections\Collection
  246.      */
  247.     /**
  248.      * @var \Doctrine\Common\Collections\Collection
  249.      * @ORM\ManyToMany(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup")
  250.      * @ORM\JoinTable(name="uv_prepared_response_support_groups",
  251.      *      joinColumns={@ORM\JoinColumn(name="savedReply_id", referencedColumnName="id", onDelete="CASCADE")},
  252.      *      inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id", onDelete="CASCADE")}
  253.      *  )
  254.      */
  255.     private $groups;
  256.     /**
  257.      * @var \Doctrine\Common\Collections\Collection
  258.      * @ORM\ManyToMany(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam")
  259.      * @ORM\JoinTable(name="uv_prepared_response_support_teams",
  260.      *      joinColumns={@ORM\JoinColumn(name="savedReply_id", referencedColumnName="id", onDelete="CASCADE")},
  261.      *      inverseJoinColumns={@ORM\JoinColumn(name="subgroup_id", referencedColumnName="id", onDelete="CASCADE")}
  262.      *  )
  263.      */
  264.     private $teams;
  265.     /**
  266.      * Constructor
  267.      */
  268.     public function __construct()
  269.     {
  270.         $this->groups = new \Doctrine\Common\Collections\ArrayCollection();
  271.         $this->teams = new \Doctrine\Common\Collections\ArrayCollection();
  272.     }
  273.     /**
  274.      * Add groups
  275.      *
  276.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups
  277.      * @return PreparedResponses
  278.      */
  279.     public function addGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups)
  280.     {
  281.         $this->groups[] = $groups;
  282.         return $this;
  283.     }
  284.     /**
  285.      * Remove groups
  286.      *
  287.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups
  288.      */
  289.     public function removeGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups)
  290.     {
  291.         $this->groups->removeElement($groups);
  292.     }
  293.     /**
  294.      * Get groups
  295.      *
  296.      * @return \Doctrine\Common\Collections\Collection 
  297.      */
  298.     public function getGroups()
  299.     {
  300.         return $this->groups;
  301.     }
  302.     /**
  303.      * Add teams
  304.      *
  305.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams
  306.      * @return PreparedResponses
  307.      */
  308.     public function addTeam(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams)
  309.     {
  310.         $this->teams[] = $teams;
  311.         return $this;
  312.     }
  313.     /**
  314.      * Remove teams
  315.      *
  316.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams
  317.      */
  318.     public function removeTeam(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams)
  319.     {
  320.         $this->teams->removeElement($teams);
  321.     }
  322.     /**
  323.      * Get teams
  324.      *
  325.      * @return \Doctrine\Common\Collections\Collection 
  326.      */
  327.     public function getTeams()
  328.     {
  329.         return $this->teams;
  330.     }
  331. }