src/Entity/Conference.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\Repository\ConferenceRepository;
  8. /**
  9.  * Conference
  10.  *
  11.  * @ORM\Table(name="conference")
  12.  * @ORM\Entity(repositoryClass=ConferenceRepository::class)
  13.  */
  14. class Conference
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="smallint", nullable=false)
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="name", type="string", length=200, nullable=false)
  28.      */
  29.     private $name;
  30.     /**
  31.      * @var \DateTime|null
  32.      *
  33.      * @ORM\Column(name="start_date", type="date", nullable=true, options={"default"="NULL"})
  34.      */
  35.     private $startDate null;
  36.     /**
  37.      * @var \DateTime|null
  38.      *
  39.      * @ORM\Column(name="end_date", type="date", nullable=true, options={"default"="NULL"})
  40.      */
  41.     private $endDate null;
  42.     /**
  43.      * @var string|null
  44.      *
  45.      * @ORM\Column(name="location", type="string", length=40, nullable=true, options={"default"="NULL"})
  46.      */
  47.     private $location null;
  48.     /**
  49.      * @var string|null
  50.      *
  51.      * @ORM\Column(name="comments", type="text", length=65535, nullable=true, options={"default"="NULL"})
  52.      */
  53.     private $comments null;
  54.     /**
  55.      * @var bool
  56.      *
  57.      * @ORM\Column(name="last_import", type="boolean", nullable=false)
  58.      */
  59.     private $lastImport false;
  60.     /**
  61.      * @var Collection
  62.      *
  63.      * @ORM\ManyToMany(targetEntity="Campaign", mappedBy="conference")
  64.      */
  65.     private $campaign;
  66.     /**
  67.      * @var Collection
  68.      * 
  69.      * @ORM\OneToMany(targetEntity=ContactConference::class, mappedBy="conference")
  70.      */
  71.     private $contactConference;
  72.     /**
  73.      * Constructor
  74.      */
  75.     public function __construct()
  76.     {
  77.         $this->campaign = new ArrayCollection();
  78.         $this->contactConference = new ArrayCollection();
  79.     }
  80.     public function getId(): ?int
  81.     {
  82.         return $this->id;
  83.     }
  84.     public function getName(): ?string
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function setName(string $name): self
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     public function getStartDate(): ?\DateTimeInterface
  94.     {
  95.         return $this->startDate;
  96.     }
  97.     public function setStartDate(?\DateTimeInterface $startDate): self
  98.     {
  99.         $this->startDate $startDate;
  100.         return $this;
  101.     }
  102.     public function getEndDate(): ?\DateTimeInterface
  103.     {
  104.         return $this->endDate;
  105.     }
  106.     public function setEndDate(?\DateTimeInterface $endDate): self
  107.     {
  108.         $this->endDate $endDate;
  109.         return $this;
  110.     }
  111.     public function getLocation(): ?string
  112.     {
  113.         return $this->location;
  114.     }
  115.     public function setLocation(?string $location): self
  116.     {
  117.         $this->location $location;
  118.         return $this;
  119.     }
  120.     public function getComments(): ?string
  121.     {
  122.         return $this->comments;
  123.     }
  124.     public function setComments(?string $comments): self
  125.     {
  126.         $this->comments $comments;
  127.         return $this;
  128.     }
  129.     public function isLastImport(): ?bool
  130.     {
  131.         return $this->lastImport;
  132.     }
  133.     public function setLastImport(bool $lastImport): self
  134.     {
  135.         $this->lastImport $lastImport;
  136.         return $this;
  137.     }
  138.     /**
  139.      * @return Collection<int, Campaign>
  140.      */
  141.     public function getCampaign(): Collection
  142.     {
  143.         return $this->campaign;
  144.     }
  145.     public function addCampaign(Campaign $campaign): self
  146.     {
  147.         if (!$this->campaign->contains($campaign)) {
  148.             $this->campaign[] = $campaign;
  149.             $campaign->addConference($this);
  150.         }
  151.         return $this;
  152.     }
  153.     public function removeCampaign(Campaign $campaign): self
  154.     {
  155.         if ($this->campaign->removeElement($campaign)) {
  156.             $campaign->removeConference($this);
  157.         }
  158.         return $this;
  159.     }
  160.     /**
  161.      * @return Collection<int, contactConference>
  162.      */
  163.     public function getContactConference(): Collection
  164.     {
  165.         return $this->contactConference;
  166.     }
  167.     public function addContactConference(ContactConference $contactConference): self
  168.     {
  169.         if (!$this->contactConference->contains($contactConference)) {
  170.             $this->contactConference[] = $contactConference;
  171.         }
  172.         return $this;
  173.     }
  174.     public function removeContactConference(ContactConference $contactConference): self
  175.     {
  176.         $this->contactConference->removeElement($contactConference);
  177.         return $this;
  178.     }
  179. }