src/Entity/Partner.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PartnerRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PartnerRepository::class)
  9.  */
  10. class Partner
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $logo;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $link;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $type;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private $isDeleted=false;
  38.     /**
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     private $priority;
  42.     /**
  43.      * @ORM\ManyToMany(targetEntity=Projet::class, mappedBy="partenaires")
  44.      */
  45.     private $projets;
  46.     /**
  47.      * @ORM\ManyToMany(targetEntity=Event::class, mappedBy="partenaires")
  48.      */
  49.     private $events;
  50.     public function __construct()
  51.     {
  52.         $this->projets = new ArrayCollection();
  53.         $this->events = new ArrayCollection();
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getName(): ?string
  60.     {
  61.         return $this->name;
  62.     }
  63.     public function setName(string $name): self
  64.     {
  65.         $this->name $name;
  66.         return $this;
  67.     }
  68.     public function getLogo(): ?string
  69.     {
  70.         return $this->logo;
  71.     }
  72.     public function setLogo(string $logo): self
  73.     {
  74.         $this->logo $logo;
  75.         return $this;
  76.     }
  77.     public function getLink(): ?string
  78.     {
  79.         return $this->link;
  80.     }
  81.     public function setLink(string $link): self
  82.     {
  83.         $this->link $link;
  84.         return $this;
  85.     }
  86.     public function getType(): ?string
  87.     {
  88.         return $this->type;
  89.     }
  90.     public function setType(string $type): self
  91.     {
  92.         $this->type $type;
  93.         return $this;
  94.     }
  95.     public function getIsDeleted(): ?bool
  96.     {
  97.         return $this->isDeleted;
  98.     }
  99.     public function setIsDeleted(bool $isDeleted): self
  100.     {
  101.         $this->isDeleted $isDeleted;
  102.         return $this;
  103.     }
  104.     public function getPriority(): ?int
  105.     {
  106.         return $this->priority;
  107.     }
  108.     public function setPriority(int $priority): self
  109.     {
  110.         $this->priority $priority;
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection<int, Projet>
  115.      */
  116.     public function getProjets(): Collection
  117.     {
  118.         return $this->projets;
  119.     }
  120.     public function addProjet(Projet $projet): self
  121.     {
  122.         if (!$this->projets->contains($projet)) {
  123.             $this->projets[] = $projet;
  124.             $projet->addPartenaire($this);
  125.         }
  126.         return $this;
  127.     }
  128.     public function removeProjet(Projet $projet): self
  129.     {
  130.         if ($this->projets->removeElement($projet)) {
  131.             $projet->removePartenaire($this);
  132.         }
  133.         return $this;
  134.     }
  135.     public function isIsDeleted(): ?bool
  136.     {
  137.         return $this->isDeleted;
  138.     }
  139.     /**
  140.      * @return Collection<int, Event>
  141.      */
  142.     public function getEvents(): Collection
  143.     {
  144.         return $this->events;
  145.     }
  146.     public function addEvent(Event $event): self
  147.     {
  148.         if (!$this->events->contains($event)) {
  149.             $this->events[] = $event;
  150.             $event->addPartenaire($this);
  151.         }
  152.         return $this;
  153.     }
  154.     public function removeEvent(Event $event): self
  155.     {
  156.         if ($this->events->removeElement($event)) {
  157.             $event->removePartenaire($this);
  158.         }
  159.         return $this;
  160.     }
  161.     
  162. }