<?php
namespace App\Entity;
use App\Repository\ProjetRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProjetRepository::class)
*/
class Projet
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $image;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Column(type="string", length=255)
*/
private $chef_de_projet;
/**
* @ORM\Column(type="text",nullable=true)
*/
private $description;
/**
* @ORM\Column(type="boolean")
*/
private $isDeleted=false;
/**
* @ORM\ManyToMany(targetEntity=Membre::class, mappedBy="projets", cascade={"persist"})
*/
private $membres;
/**
* @ORM\ManyToMany(targetEntity=Partner::class, inversedBy="projets")
*/
private $partenaires;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $budget;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $annee;
public function __construct()
{
$this->membres = new ArrayCollection();
$this->partenaires = new ArrayCollection();
$this->members = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(string $image): self
{
$this->image = $image;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getChefDeProjet(): ?string
{
return $this->chef_de_projet;
}
public function setChefDeProjet(string $chef_de_projet): self
{
$this->chef_de_projet = $chef_de_projet;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
/**
* @return Collection|Membre[]
*/
public function getMembres(): Collection
{
return $this->membres;
}
public function addMembre(Membre $membre): self
{
if (!$this->membres->contains($membre)) {
$this->membres[] = $membre;
$membre->addProjet($this);
}
return $this;
}
public function removeMembre(Membre $membre): self
{
if ($this->membres->removeElement($membre)) {
$membre->removeProjet($this);
}
return $this;
}
/**public function __toString(): string
{
return $this->titre ?: '';
}**/
/**
* @return Collection<int, partner>
*/
public function getPartenaires(): Collection
{
return $this->partenaires;
}
public function addPartenaire(partner $partenaire): self
{
if (!$this->partenaires->contains($partenaire)) {
$this->partenaires[] = $partenaire;
}
return $this;
}
public function removePartenaire(partner $partenaire): self
{
$this->partenaires->removeElement($partenaire);
return $this;
}
public function getIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function setIsDeleted(bool $isDeleted): self
{
$this->isDeleted = $isDeleted;
return $this;
}
public function isIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function getBudget(): ?string
{
return $this->budget;
}
public function setBudget(?string $budget): self
{
$this->budget = $budget;
return $this;
}
public function getAnnee(): ?string
{
return $this->annee;
}
public function setAnnee(?string $annee): self
{
$this->annee = $annee;
return $this;
}
}