<?phpnamespace App\Entity;use App\Repository\OffreEmploiRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: OffreEmploiRepository::class)]class OffreEmploi{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $titre = null; #[ORM\Column] private ?int $visibility = 1; #[ORM\ManyToOne(inversedBy: 'offreEmploi')] private ?StatutOE $statutOE = null; #[ORM\ManyToOne(inversedBy: 'offreEmploi')] private ?Service $service = null; #[ORM\OneToMany(mappedBy: 'offreEmploi', targetEntity: Candidature::class)] private Collection $candidatures; #[ORM\ManyToOne(inversedBy: 'offreEmplois')] private ?User $user = null; #[ORM\Column(length: 255)] private ?string $image = null; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $contenu = null; public function __construct() { $this->candidatures = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(string $titre): self { $this->titre = $titre; return $this; } public function getVisibility(): ?int { return $this->visibility; } public function setVisibility(int $visibility): self { $this->visibility = $visibility; return $this; } public function getStatutOE(): ?StatutOE { return $this->statutOE; } public function setStatutOE(?StatutOE $statutOE): self { $this->statutOE = $statutOE; return $this; } public function getService(): ?Service { return $this->service; } public function setService(?Service $service): self { $this->service = $service; return $this; } /** * @return Collection<int, Candidature> */ public function getCandidatures(): Collection { return $this->candidatures; } public function addCandidature(Candidature $candidature): self { if (!$this->candidatures->contains($candidature)) { $this->candidatures->add($candidature); $candidature->setOffreEmploi($this); } return $this; } public function removeCandidature(Candidature $candidature): self { if ($this->candidatures->removeElement($candidature)) { // set the owning side to null (unless already changed) if ($candidature->getOffreEmploi() === $this) { $candidature->setOffreEmploi(null); } } return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getImage(): ?string { return $this->image; } public function setImage(string $image): self { $this->image = $image; return $this; } public function getContenu(): ?string { return $this->contenu; } public function setContenu(?string $contenu): self { $this->contenu = $contenu; return $this; }}