src/Entity/OffreEmploi.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OffreEmploiRepository;
  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(repositoryClassOffreEmploiRepository::class)]
  9. class OffreEmploi
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $titre null;
  17.     #[ORM\Column]
  18.     private ?int $visibility 1;
  19.     #[ORM\ManyToOne(inversedBy'offreEmploi')]
  20.     private ?StatutOE $statutOE null;
  21.     #[ORM\ManyToOne(inversedBy'offreEmploi')]
  22.     private ?Service $service null;
  23.     #[ORM\OneToMany(mappedBy'offreEmploi'targetEntityCandidature::class)]
  24.     private Collection $candidatures;
  25.     #[ORM\ManyToOne(inversedBy'offreEmplois')]
  26.     private ?User $user null;
  27.     #[ORM\Column(length255)]
  28.     private ?string $image null;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $contenu null;
  31.     public function __construct()
  32.     {
  33.         $this->candidatures = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getTitre(): ?string
  40.     {
  41.         return $this->titre;
  42.     }
  43.     public function setTitre(string $titre): self
  44.     {
  45.         $this->titre $titre;
  46.         return $this;
  47.     }
  48.     public function getVisibility(): ?int
  49.     {
  50.         return $this->visibility;
  51.     }
  52.     public function setVisibility(int $visibility): self
  53.     {
  54.         $this->visibility $visibility;
  55.         return $this;
  56.     }
  57.     public function getStatutOE(): ?StatutOE
  58.     {
  59.         return $this->statutOE;
  60.     }
  61.     public function setStatutOE(?StatutOE $statutOE): self
  62.     {
  63.         $this->statutOE $statutOE;
  64.         return $this;
  65.     }
  66.     public function getService(): ?Service
  67.     {
  68.         return $this->service;
  69.     }
  70.     public function setService(?Service $service): self
  71.     {
  72.         $this->service $service;
  73.         return $this;
  74.     }
  75.     /**
  76.      * @return Collection<int, Candidature>
  77.      */
  78.     public function getCandidatures(): Collection
  79.     {
  80.         return $this->candidatures;
  81.     }
  82.     public function addCandidature(Candidature $candidature): self
  83.     {
  84.         if (!$this->candidatures->contains($candidature)) {
  85.             $this->candidatures->add($candidature);
  86.             $candidature->setOffreEmploi($this);
  87.         }
  88.         return $this;
  89.     }
  90.     public function removeCandidature(Candidature $candidature): self
  91.     {
  92.         if ($this->candidatures->removeElement($candidature)) {
  93.             // set the owning side to null (unless already changed)
  94.             if ($candidature->getOffreEmploi() === $this) {
  95.                 $candidature->setOffreEmploi(null);
  96.             }
  97.         }
  98.         return $this;
  99.     }
  100.     public function getUser(): ?User
  101.     {
  102.         return $this->user;
  103.     }
  104.     public function setUser(?User $user): self
  105.     {
  106.         $this->user $user;
  107.         return $this;
  108.     }
  109.     public function getImage(): ?string
  110.     {
  111.         return $this->image;
  112.     }
  113.     public function setImage(string $image): self
  114.     {
  115.         $this->image $image;
  116.         return $this;
  117.     }
  118.     public function getContenu(): ?string
  119.     {
  120.         return $this->contenu;
  121.     }
  122.     public function setContenu(?string $contenu): self
  123.     {
  124.         $this->contenu $contenu;
  125.         return $this;
  126.     }
  127. }