<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\ConferenceRepository;
/**
* Conference
*
* @ORM\Table(name="conference")
* @ORM\Entity(repositoryClass=ConferenceRepository::class)
*/
class Conference
{
/**
* @var int
*
* @ORM\Column(name="id", type="smallint", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=200, nullable=false)
*/
private $name;
/**
* @var \DateTime|null
*
* @ORM\Column(name="start_date", type="date", nullable=true, options={"default"="NULL"})
*/
private $startDate = null;
/**
* @var \DateTime|null
*
* @ORM\Column(name="end_date", type="date", nullable=true, options={"default"="NULL"})
*/
private $endDate = null;
/**
* @var string|null
*
* @ORM\Column(name="location", type="string", length=40, nullable=true, options={"default"="NULL"})
*/
private $location = null;
/**
* @var string|null
*
* @ORM\Column(name="comments", type="text", length=65535, nullable=true, options={"default"="NULL"})
*/
private $comments = null;
/**
* @var bool
*
* @ORM\Column(name="last_import", type="boolean", nullable=false)
*/
private $lastImport = false;
/**
* @var Collection
*
* @ORM\ManyToMany(targetEntity="Campaign", mappedBy="conference")
*/
private $campaign;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity=ContactConference::class, mappedBy="conference")
*/
private $contactConference;
/**
* Constructor
*/
public function __construct()
{
$this->campaign = new ArrayCollection();
$this->contactConference = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getLocation(): ?string
{
return $this->location;
}
public function setLocation(?string $location): self
{
$this->location = $location;
return $this;
}
public function getComments(): ?string
{
return $this->comments;
}
public function setComments(?string $comments): self
{
$this->comments = $comments;
return $this;
}
public function isLastImport(): ?bool
{
return $this->lastImport;
}
public function setLastImport(bool $lastImport): self
{
$this->lastImport = $lastImport;
return $this;
}
/**
* @return Collection<int, Campaign>
*/
public function getCampaign(): Collection
{
return $this->campaign;
}
public function addCampaign(Campaign $campaign): self
{
if (!$this->campaign->contains($campaign)) {
$this->campaign[] = $campaign;
$campaign->addConference($this);
}
return $this;
}
public function removeCampaign(Campaign $campaign): self
{
if ($this->campaign->removeElement($campaign)) {
$campaign->removeConference($this);
}
return $this;
}
/**
* @return Collection<int, contactConference>
*/
public function getContactConference(): Collection
{
return $this->contactConference;
}
public function addContactConference(ContactConference $contactConference): self
{
if (!$this->contactConference->contains($contactConference)) {
$this->contactConference[] = $contactConference;
}
return $this;
}
public function removeContactConference(ContactConference $contactConference): self
{
$this->contactConference->removeElement($contactConference);
return $this;
}
}