vendor/uvdesk/core-framework/Entity/SupportTeam.php line 14

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\CoreFrameworkBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * SupportTeam
  6.  * 
  7.  * @ORM\Entity(repositoryClass="Webkul\UVDesk\CoreFrameworkBundle\Repository\SupportTeamRepository")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  * @ORM\Table(name="uv_support_team")
  10.  */
  11. class SupportTeam
  12. {
  13.     /**
  14.      * @var integer
  15.      * @ORM\Id()
  16.      * @ORM\Column(type="integer")
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      * @ORM\Column(type="string", length=191)
  23.      * 
  24.      */
  25.     private $name;
  26.     /**
  27.      * @var string
  28.      * @ORM\Column(type="text")
  29.      */
  30.     private $description;
  31.     /**
  32.      * @var \DateTime
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $createdAt;
  36.     /**
  37.      * @var boolean
  38.      * @ORM\Column(type="boolean", options={"default": false})
  39.      */
  40.     private $isActive false;
  41.     /**
  42.      * @var \Doctrine\Common\Collections\Collection
  43.      * @ORM\ManyToMany(targetEntity="UserInstance", mappedBy="supportTeams")
  44.      */
  45.     private $users;
  46.     /**
  47.      * @var \Doctrine\Common\Collections\Collection
  48.      * @ORM\ManyToMany(targetEntity="UserInstance", mappedBy="leadSupportTeams")
  49.      * 
  50.      */
  51.     private $leads;
  52.     /**
  53.      * @var \Doctrine\Common\Collections\Collection
  54.      * @ORM\ManyToMany(targetEntity="SupportGroup", mappedBy="supportTeams")
  55.      */
  56.     private $supportGroups;
  57.     /**
  58.      * Constructor
  59.      */
  60.     public function __construct()
  61.     {
  62.         $this->users = new \Doctrine\Common\Collections\ArrayCollection();
  63.         $this->leads = new \Doctrine\Common\Collections\ArrayCollection();
  64.         $this->supportGroups = new \Doctrine\Common\Collections\ArrayCollection();
  65.     }
  66.     /**
  67.      * Get id
  68.      *
  69.      * @return integer
  70.      */
  71.     public function getId()
  72.     {
  73.         return $this->id;
  74.     }
  75.     /**
  76.      * Set name
  77.      *
  78.      * @param string $name
  79.      *
  80.      * @return SupportTeam
  81.      */
  82.     public function setName($name)
  83.     {
  84.         $this->name $name;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get name
  89.      *
  90.      * @return string
  91.      */
  92.     public function getName()
  93.     {
  94.         return $this->name;
  95.     }
  96.     /**
  97.      * Set description
  98.      *
  99.      * @param string $description
  100.      *
  101.      * @return SupportTeam
  102.      */
  103.     public function setDescription($description)
  104.     {
  105.         $this->description $description;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get description
  110.      *
  111.      * @return string
  112.      */
  113.     public function getDescription()
  114.     {
  115.         return $this->description;
  116.     }
  117.     /**
  118.      * Set createdAt
  119.      *
  120.      * @param \DateTime $createdAt
  121.      *
  122.      * @return SupportTeam
  123.      */
  124.     public function setCreatedAt($createdAt)
  125.     {
  126.         $this->createdAt $createdAt;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get createdAt
  131.      *
  132.      * @return \DateTime
  133.      */
  134.     public function getCreatedAt()
  135.     {
  136.         return $this->createdAt;
  137.     }
  138.     /**
  139.      * Set isActive
  140.      *
  141.      * @param boolean $isActive
  142.      *
  143.      * @return SupportTeam
  144.      */
  145.     public function setIsActive($isActive)
  146.     {
  147.         $this->isActive $isActive;
  148.         return $this;
  149.     }
  150.     /**
  151.      * Get isActive
  152.      *
  153.      * @return boolean
  154.      */
  155.     public function getIsActive()
  156.     {
  157.         return $this->isActive;
  158.     }
  159.     /**
  160.      * Add user
  161.      *
  162.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user
  163.      *
  164.      * @return SupportTeam
  165.      */
  166.     public function addUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user)
  167.     {
  168.         $this->users[] = $user;
  169.         return $this;
  170.     }
  171.     /**
  172.      * Remove user
  173.      *
  174.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user
  175.      */
  176.     public function removeUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user)
  177.     {
  178.         $this->users->removeElement($user);
  179.     }
  180.     /**
  181.      * Get users
  182.      *
  183.      * @return \Doctrine\Common\Collections\Collection
  184.      */
  185.     public function getUsers()
  186.     {
  187.         return $this->users;
  188.     }
  189.     /**
  190.      * Add lead
  191.      *
  192.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $lead
  193.      *
  194.      * @return SupportTeam
  195.      */
  196.     public function addLead(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $lead)
  197.     {
  198.         $this->leads[] = $lead;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Remove lead
  203.      *
  204.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $lead
  205.      */
  206.     public function removeLead(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $lead)
  207.     {
  208.         $this->leads->removeElement($lead);
  209.     }
  210.     /**
  211.      * Get leads
  212.      *
  213.      * @return \Doctrine\Common\Collections\Collection
  214.      */
  215.     public function getLeads()
  216.     {
  217.         return $this->leads;
  218.     }
  219.     /**
  220.      * Add supportGroup
  221.      *
  222.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $supportGroup
  223.      *
  224.      * @return SupportTeam
  225.      */
  226.     public function addSupportGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $supportGroup)
  227.     {
  228.         $this->supportGroups[] = $supportGroup;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Remove supportGroup
  233.      *
  234.      * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $supportGroup
  235.      */
  236.     public function removeSupportGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $supportGroup)
  237.     {
  238.         $this->supportGroups->removeElement($supportGroup);
  239.     }
  240.     /**
  241.      * Get supportGroups
  242.      *
  243.      * @return \Doctrine\Common\Collections\Collection
  244.      */
  245.     public function getSupportGroups()
  246.     {
  247.         return $this->supportGroups;
  248.     }
  249.     /**
  250.      * @ORM\PrePersist
  251.      */
  252.     public function initializeTimestamp()
  253.     {
  254.         $this->createdAt = new \DateTime('now');
  255.     }
  256. }