src/Entity/ContactGroup.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\Entity\Contact;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\EntityRepo\ContactGroupRepo")
  10.  * @ORM\Table(name="contact_group")
  11.  */
  12. class ContactGroup
  13. {
  14.     /**
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */ 
  19.     private $contactGroupId=0;   
  20.     
  21.     /**
  22.      * @ORM\Column(type="string", length=100, nullable=true)
  23.      */
  24.     protected $contactGroupName='';
  25.     
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     protected $email;    
  30.     
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     protected $image1;
  35.     /**
  36.      * @ORM\Column(type="text", nullable=true)
  37.      */
  38.     protected $contactGroupBoard;
  39.     //#[ManyToMany(targetEntity: User::class, mappedBy: 'groups')]
  40.     /*
  41.      * @ORM\ManyToMany(targetEntity="Contact", mappedBy="contactGroups")
  42.      */
  43.     /*
  44.      * Many ContactGroups have one Contact. This is the owning side.
  45.      * @ORM\ManyToOne(targetEntity="App\Entity\Contact", inversedBy="contactGroups")
  46.      * @ORM\JoinColumn(name="contact_id", referencedColumnName="contact_id")
  47.      */
  48.     //private $contact;
  49.     public function __construct()
  50.     {
  51.         $this->contacts = new ArrayCollection();
  52.         $this->contact = new ArrayCollection();
  53.     }
  54.     
  55.     /**
  56.      * Get contactGroupId
  57.      *
  58.      * @return integer
  59.      */
  60.     public function getContactGroupId()
  61.     {
  62.         return $this->contactGroupId;
  63.     }
  64.     /**
  65.      * Set contactGroupName
  66.      *
  67.      * @param string $contactGroupName
  68.      *
  69.      * @return ContactGroup
  70.      */
  71.     public function setContactGroupName($contactGroupName)
  72.     {
  73.         $this->contactGroupName $contactGroupName;
  74.         return $this;
  75.     }
  76.     /**
  77.      * Get contactGroupName
  78.      *
  79.      * @return string
  80.      */
  81.     public function getContactGroupName()
  82.     {
  83.         return $this->contactGroupName;
  84.     }
  85.     /**
  86.      * Set email
  87.      *
  88.      * @param string $email
  89.      *
  90.      * @return ContactGroup
  91.      */
  92.     public function setEmail($email)
  93.     {
  94.         $this->email $email;
  95.         return $this;
  96.     }
  97.     /**
  98.      * Get email
  99.      *
  100.      * @return string
  101.      */
  102.     public function getEmail()
  103.     {
  104.         return $this->email;
  105.     }
  106.     /**
  107.      * Set image1
  108.      *
  109.      * @param string $image1
  110.      *
  111.      * @return ContactGroup
  112.      */
  113.     public function setImage1($image1)
  114.     {
  115.         $this->image1 $image1;
  116.         return $this;
  117.     }
  118.     /**
  119.      * Get image1
  120.      *
  121.      * @return string
  122.      */
  123.     public function getImage1()
  124.     {
  125.         return $this->image1;
  126.     }
  127.     /**
  128.      * Set contactGroupBoard
  129.      *
  130.      * @param string $contactGroupBoard
  131.      *
  132.      * @return ContactGroup
  133.      */
  134.     public function setContactGroupBoard($contactGroupBoard)
  135.     {
  136.         $this->contactGroupBoard $contactGroupBoard;
  137.         return $this;
  138.     }
  139.     /**
  140.      * Get contactGroupBoard
  141.      *
  142.      * @return string
  143.      */
  144.     public function getContactGroupBoard()
  145.     {
  146.         return $this->contactGroupBoard;
  147.     }
  148. }