src/Entity/Projet.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjetRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=ProjetRepository::class)
  10.  */
  11. class Projet
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $image;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $titre;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $chef_de_projet;
  31.     /**
  32.      * @ORM\Column(type="text",nullable=true)
  33.      */
  34.     private $description;
  35.     /**
  36.      * @ORM\Column(type="boolean")
  37.      */
  38.     private $isDeleted=false;
  39.      /**
  40.      * @ORM\ManyToMany(targetEntity=Membre::class, mappedBy="projets", cascade={"persist"})
  41.      */
  42.     private $membres;
  43.     /**
  44.      * @ORM\ManyToMany(targetEntity=Partner::class, inversedBy="projets")
  45.      */
  46.     private $partenaires;
  47.     /**
  48.      * @ORM\Column(type="string", length=255, nullable=true)
  49.      */
  50.     private $budget;
  51.     /**
  52.      * @ORM\Column(type="string", length=255, nullable=true)
  53.      */
  54.     private $annee;
  55.     public function __construct()
  56.     {
  57.         $this->membres = new ArrayCollection();
  58.         $this->partenaires = new ArrayCollection();
  59.         $this->members = new ArrayCollection();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getImage(): ?string
  66.     {
  67.         return $this->image;
  68.     }
  69.     public function setImage(string $image): self
  70.     {
  71.         $this->image $image;
  72.         return $this;
  73.     }
  74.     public function getTitre(): ?string
  75.     {
  76.         return $this->titre;
  77.     }
  78.     public function setTitre(string $titre): self
  79.     {
  80.         $this->titre $titre;
  81.         return $this;
  82.     }
  83.     public function getChefDeProjet(): ?string
  84.     {
  85.         return $this->chef_de_projet;
  86.     }
  87.     public function setChefDeProjet(string $chef_de_projet): self
  88.     {
  89.         $this->chef_de_projet $chef_de_projet;
  90.         return $this;
  91.     }
  92.     public function getDescription(): ?string
  93.     {
  94.         return $this->description;
  95.     }
  96.     public function setDescription(string $description): self
  97.     {
  98.         $this->description $description;
  99.         return $this;
  100.     }
  101.     /**
  102.      * @return Collection|Membre[]
  103.      */
  104.     public function getMembres(): Collection
  105.     {
  106.         return $this->membres;
  107.     }
  108.     public function addMembre(Membre $membre): self
  109.     {
  110.         if (!$this->membres->contains($membre)) {
  111.             $this->membres[] = $membre;
  112.             $membre->addProjet($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeMembre(Membre $membre): self
  117.     {
  118.         if ($this->membres->removeElement($membre)) {
  119.             $membre->removeProjet($this);
  120.         }
  121.         return $this;
  122.     }
  123.     /**public function __toString(): string
  124.     {
  125.         return $this->titre ?: '';
  126.     }**/
  127.     /**
  128.      * @return Collection<int, partner>
  129.      */
  130.     public function getPartenaires(): Collection
  131.     {
  132.         return $this->partenaires;
  133.     }
  134.     public function addPartenaire(partner $partenaire): self
  135.     {
  136.         if (!$this->partenaires->contains($partenaire)) {
  137.             $this->partenaires[] = $partenaire;
  138.         }
  139.         return $this;
  140.     }
  141.     public function removePartenaire(partner $partenaire): self
  142.     {
  143.         $this->partenaires->removeElement($partenaire);
  144.         return $this;
  145.     }
  146.     public function getIsDeleted(): ?bool
  147.     {
  148.         return $this->isDeleted;
  149.     }
  150.     public function setIsDeleted(bool $isDeleted): self
  151.     {
  152.         $this->isDeleted $isDeleted;
  153.         return $this;
  154.     }
  155.     public function isIsDeleted(): ?bool
  156.     {
  157.         return $this->isDeleted;
  158.     }
  159.     public function getBudget(): ?string
  160.     {
  161.         return $this->budget;
  162.     }
  163.     public function setBudget(?string $budget): self
  164.     {
  165.         $this->budget $budget;
  166.         return $this;
  167.     }
  168.     public function getAnnee(): ?string
  169.     {
  170.         return $this->annee;
  171.     }
  172.     public function setAnnee(?string $annee): self
  173.     {
  174.         $this->annee $annee;
  175.         return $this;
  176.     }
  177. }