<?phpnamespace App\Entity;use App\Repository\EquipeRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;#[ORM\Entity(repositoryClass: EquipeRepository::class)]#[Vich\Uploadable]class Equipe{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nom = null; #[ORM\Column(length: 255)] private ?string $diplome = null; #[ORM\Column(length: 255)] private ?string $poste = null; #[ORM\Column(type:'integer', length:11)] private ?int $experience = null; #[ORM\Column(length: 255)] private ?string $regional = null; #[ORM\Column(length: 255)] private ?string $unite = null; #[ORM\OneToMany(mappedBy: 'equipe', targetEntity: DomainEquipe::class, cascade: ['persist', 'remove'])] private $domains; #[ORM\Column(type:'string', length:255)] private $image; #[Vich\UploadableField(mapping:'post_thumbnails', fileNameProperty:'image')] private $imageFile; public function __construct() { $this->domains = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } public function getDiplome(): ?string { return $this->diplome; } public function setDiplome(string $diplome): self { $this->diplome = $diplome; return $this; } public function getPoste(): ?string { return $this->poste; } public function setPoste(string $poste): self { $this->poste = $poste; return $this; } public function getExperience(): ?int { return $this->experience; } public function setExperience(int $experience): self { $this->experience = $experience; return $this; } public function getRegional(): ?string { return $this->regional; } public function setRegional(string $regional): self { $this->regional = $regional; return $this; } public function getUnite(): ?string { return $this->unite; } public function setUnite(string $unite): self { $this->unite = $unite; return $this; } public function setImageFile(File $image = null) { $this->imageFile = $image; // VERY IMPORTANT: // It is required that at least one field changes if you are using Doctrine, // otherwise the event listeners won't be called and the file is lost // if ($image) { // if 'updatedAt' is not defined in your entity, use another property // $this->updatedAt = new \DateTime('now'); // } } public function getImageFile() { return $this->imageFile; } public function setImage($image) { $this->image = $image; } public function getImage() { return $this->image; } /** * @return Collection<int, DomainEquipe> */ public function getDomains(): Collection { return $this->domains; } public function addDomain(DomainEquipe $domain): self { if (!$this->taches->contains($domain)) { $this->taches->add($domain); $domain->setEquipe($this); } return $this; } public function removeDomain(DomainEquipe $domain): self { if ($this->domains->removeElement($domain)) { // set the owning side to null (unless already changed) if ($domain->getEquipe() === $this) { $domain->setEquipe(null); } } return $this; } public function __toString() { return (string) $this->id; }}