src/Entity/Projet.php line 12

  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. #[ORM\Entity(repositoryClassProjetRepository::class)]
  9. class Projet
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $nom null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $objectif null;
  19.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $dateDebut null;
  21.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $dateFin null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $description null;
  25.     #[ORM\Column(nullabletrue)]
  26.     private ?int $etat 0;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?int $statut null;
  29.     #[ORM\ManyToOne(inversedBy'projets')]
  30.     private ?User $user null;
  31.     #[ORM\ManyToOne(inversedBy'projets')]
  32.     private ?Chercheur $directeur null;
  33.     
  34.     #[ORM\ManyToOne]
  35.     private ?Theme $theme null;
  36.     #[ORM\OneToMany(mappedBy'projet'targetEntityMembre::class)]
  37.     private Collection $membress;
  38.     #[ORM\ManyToOne(inversedBy'projets')]
  39.     private ?StructureRecherche $structure null;
  40.     #[ORM\OneToMany(mappedBy'projet'targetEntityPublication::class)]
  41.     private Collection $publications;
  42.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  43.     private ?string $domaineRecherche null;
  44.     #[ORM\Column(length255nullabletrue)]
  45.     private ?string $image null;
  46.     public function __construct()
  47.     {
  48.         $this->membress = new ArrayCollection();
  49.         $this->publications = new ArrayCollection();
  50.     }
  51.     
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getNom(): ?string
  57.     {
  58.         return $this->nom;
  59.     }
  60.     public function setNom(?string $nom): self
  61.     {
  62.         $this->nom $nom;
  63.         return $this;
  64.     }
  65.     public function getObjectif(): ?string
  66.     {
  67.         return $this->objectif;
  68.     }
  69.     public function setObjectif(?string $objectif): self
  70.     {
  71.         $this->objectif $objectif;
  72.         return $this;
  73.     }
  74.     public function getDateDebut(): ?\DateTimeInterface
  75.     {
  76.         return $this->dateDebut;
  77.     }
  78.     public function setDateDebut(?\DateTimeInterface $dateDebut): self
  79.     {
  80.         $this->dateDebut $dateDebut;
  81.         return $this;
  82.     }
  83.     public function getDateFin(): ?\DateTimeInterface
  84.     {
  85.         return $this->dateFin;
  86.     }
  87.     public function setDateFin(?\DateTimeInterface $dateFin): self
  88.     {
  89.         $this->dateFin $dateFin;
  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.     public function getEtat(): ?int
  102.     {
  103.         return $this->etat;
  104.     }
  105.     public function setEtat(?int $etat): self
  106.     {
  107.         $this->etat $etat;
  108.         return $this;
  109.     }
  110.     public function getStatut(): ?int
  111.     {
  112.         return $this->statut;
  113.     }
  114.     public function setStatut(?int $statut): self
  115.     {
  116.         $this->statut $statut;
  117.         return $this;
  118.     }
  119.     public function getUser(): ?User
  120.     {
  121.         return $this->user;
  122.     }
  123.     public function setUser(?User $user): self
  124.     {
  125.         $this->user $user;
  126.         return $this;
  127.     }
  128.     public function getDirecteur(): ?Chercheur
  129.     {
  130.         return $this->directeur;
  131.     }
  132.     public function setDirecteur(?Chercheur $directeur): self
  133.     {
  134.         $this->directeur $directeur;
  135.         return $this;
  136.     }
  137.    
  138.    
  139.    
  140.     public function getTheme(): ?Theme
  141.     {
  142.         return $this->theme;
  143.     }
  144.     public function setTheme(?Theme $theme): self
  145.     {
  146.         $this->theme $theme;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return Collection<int, Membre>
  151.      */
  152.     public function getMembress(): Collection
  153.     {
  154.         return $this->membress;
  155.     }
  156.     public function addMembress(Membre $membress): self
  157.     {
  158.         if (!$this->membress->contains($membress)) {
  159.             $this->membress->add($membress);
  160.             $membress->setProjet($this);
  161.         }
  162.         return $this;
  163.     }
  164.     public function removeMembress(Membre $membress): self
  165.     {
  166.         if ($this->membress->removeElement($membress)) {
  167.             // set the owning side to null (unless already changed)
  168.             if ($membress->getProjet() === $this) {
  169.                 $membress->setProjet(null);
  170.             }
  171.         }
  172.         return $this;
  173.     }
  174.     public function getStructure(): ?StructureRecherche
  175.     {
  176.         return $this->structure;
  177.     }
  178.     public function setStructure(?StructureRecherche $structure): self
  179.     {
  180.         $this->structure $structure;
  181.         return $this;
  182.     }
  183.     public function __toString(): string
  184.     {
  185.         return $this->nom;
  186.     }
  187.     /**
  188.      * @return Collection<int, Publication>
  189.      */
  190.     public function getPublications(): Collection
  191.     {
  192.         return $this->publications;
  193.     }
  194.     public function addPublication(Publication $publication): self
  195.     {
  196.         if (!$this->publications->contains($publication)) {
  197.             $this->publications->add($publication);
  198.             $publication->setProjet($this);
  199.         }
  200.         return $this;
  201.     }
  202.     public function removePublication(Publication $publication): self
  203.     {
  204.         if ($this->publications->removeElement($publication)) {
  205.             // set the owning side to null (unless already changed)
  206.             if ($publication->getProjet() === $this) {
  207.                 $publication->setProjet(null);
  208.             }
  209.         }
  210.         return $this;
  211.     }
  212.     public function getDomaineRecherche(): ?string
  213.     {
  214.         return $this->domaineRecherche;
  215.     }
  216.     public function setDomaineRecherche(?string $domaineRecherche): self
  217.     {
  218.         $this->domaineRecherche $domaineRecherche;
  219.         return $this;
  220.     }
  221.     public function getImage(): ?string
  222.     {
  223.         return $this->image;
  224.     }
  225.     public function setImage(?string $image): self
  226.     {
  227.         $this->image $image;
  228.         return $this;
  229.     }
  230. }