<?phpnamespace App\Entity\User;use App\Entity\Boutique\Cours\Cours;use App\Entity\Media\Media;use App\Entity\PostType\PostType;use App\Entity\User;use App\Repository\User\CoachRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CoachRepository::class)]class Coach extends PostType{ #[ORM\Column(length: 255)] private ?string $prenom = null; #[ORM\Column(length: 255, nullable: true)] private ?string $pseudo = null; #[ORM\ManyToOne()] private ?Media $imgProfil = null; #[ORM\ManyToOne()] private ?Media $imgBanniere = null; #[ORM\Column(type: Types::TEXT)] private ?string $description = null; #[ORM\ManyToOne(inversedBy: 'coachs')] #[ORM\JoinColumn(nullable: false)] private ?User $user = null; #[ORM\ManyToMany(targetEntity: Cours::class, inversedBy: 'coaches')] private Collection $cours; #[ORM\ManyToMany(targetEntity: Skills::class, inversedBy: 'coaches')] private Collection $skills; #[ORM\Column] private ?\DateTimeImmutable $anciennetee = null; #[ORM\Column(length: 255)] private ?string $accroche = null; public function __construct() { parent::__construct(); $this->cours = new ArrayCollection(); $this->skills = new ArrayCollection(); } public function getPrenom(): ?string { return $this->prenom; } public function setPrenom(string $prenom): self { $this->prenom = $prenom; return $this; } public function getPseudo(): ?string { return $this->pseudo; } public function setPseudo(?string $pseudo): self { $this->pseudo = $pseudo; return $this; } public function getImgProfil(): ?Media { return $this->imgProfil; } public function setImgProfil(?Media $imgProfil): self { $this->imgProfil = $imgProfil; return $this; } public function getImgBanniere(): ?Media { return $this->imgBanniere; } public function setImgBanniere(?Media $imgBanniere): self { $this->imgBanniere = $imgBanniere; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } /** * @return Collection<int, Cours> */ public function getCours(): Collection { return $this->cours; } public function addCour(Cours $cour): self { if (!$this->cours->contains($cour)) { $this->cours->add($cour); } return $this; } public function removeCour(Cours $cour): self { $this->cours->removeElement($cour); return $this; } /** * @return Collection<int, Skills> */ public function getSkills(): Collection { return $this->skills; } public function addSkill(Skills $skill): self { if (!$this->skills->contains($skill)) { $this->skills->add($skill); } return $this; } public function removeSkill(Skills $skill): self { $this->skills->removeElement($skill); return $this; } public function getAnciennetee(): ?\DateTimeImmutable { return $this->anciennetee; } public function setAnciennetee(\DateTimeImmutable $anciennetee): self { $this->anciennetee = $anciennetee; return $this; } public function getAccroche(): ?string { return $this->accroche; } public function setAccroche(string $accroche): self { $this->accroche = $accroche; return $this; }}