<?php
namespace App\Entity;
use App\Repository\PartnerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PartnerRepository::class)
*/
class Partner
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $logo;
/**
* @ORM\Column(type="string", length=255)
*/
private $link;
/**
* @ORM\Column(type="string", length=255)
*/
private $type;
/**
* @ORM\Column(type="boolean")
*/
private $isDeleted=false;
/**
* @ORM\Column(type="integer")
*/
private $priority;
/**
* @ORM\ManyToMany(targetEntity=Projet::class, mappedBy="partenaires")
*/
private $projets;
/**
* @ORM\ManyToMany(targetEntity=Event::class, mappedBy="partenaires")
*/
private $events;
public function __construct()
{
$this->projets = new ArrayCollection();
$this->events = 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 getLogo(): ?string
{
return $this->logo;
}
public function setLogo(string $logo): self
{
$this->logo = $logo;
return $this;
}
public function getLink(): ?string
{
return $this->link;
}
public function setLink(string $link): self
{
$this->link = $link;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function setIsDeleted(bool $isDeleted): self
{
$this->isDeleted = $isDeleted;
return $this;
}
public function getPriority(): ?int
{
return $this->priority;
}
public function setPriority(int $priority): self
{
$this->priority = $priority;
return $this;
}
/**
* @return Collection<int, Projet>
*/
public function getProjets(): Collection
{
return $this->projets;
}
public function addProjet(Projet $projet): self
{
if (!$this->projets->contains($projet)) {
$this->projets[] = $projet;
$projet->addPartenaire($this);
}
return $this;
}
public function removeProjet(Projet $projet): self
{
if ($this->projets->removeElement($projet)) {
$projet->removePartenaire($this);
}
return $this;
}
public function isIsDeleted(): ?bool
{
return $this->isDeleted;
}
/**
* @return Collection<int, Event>
*/
public function getEvents(): Collection
{
return $this->events;
}
public function addEvent(Event $event): self
{
if (!$this->events->contains($event)) {
$this->events[] = $event;
$event->addPartenaire($this);
}
return $this;
}
public function removeEvent(Event $event): self
{
if ($this->events->removeElement($event)) {
$event->removePartenaire($this);
}
return $this;
}
}