src/Entity/User/Coach.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\User;
  3. use App\Entity\Boutique\Cours\Cours;
  4. use App\Entity\Media\Media;
  5. use App\Entity\PostType\PostType;
  6. use App\Entity\User;
  7. use App\Repository\User\CoachRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\DBAL\Types\Types;
  11. use Doctrine\ORM\Mapping as ORM;
  12. #[ORM\Entity(repositoryClassCoachRepository::class)]
  13. class Coach extends PostType
  14. {
  15.     #[ORM\Column(length255)]
  16.     private ?string $prenom null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $pseudo null;
  19.     #[ORM\ManyToOne()]
  20.     private ?Media $imgProfil null;
  21.     #[ORM\ManyToOne()]
  22.     private ?Media $imgBanniere null;
  23.     #[ORM\Column(typeTypes::TEXT)]
  24.     private ?string $description null;
  25.     #[ORM\ManyToOne(inversedBy'coachs')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?User $user null;
  28.     #[ORM\ManyToMany(targetEntityCours::class, inversedBy'coaches')]
  29.     private Collection $cours;
  30.     #[ORM\ManyToMany(targetEntitySkills::class, inversedBy'coaches')]
  31.     private Collection $skills;
  32.     #[ORM\Column]
  33.     private ?\DateTimeImmutable $anciennetee null;
  34.     #[ORM\Column(length255)]
  35.     private ?string $accroche null;
  36.     public function __construct()
  37.     {
  38.         parent::__construct();
  39.         $this->cours = new ArrayCollection();
  40.         $this->skills = new ArrayCollection();
  41.     }
  42.     public function getPrenom(): ?string
  43.     {
  44.         return $this->prenom;
  45.     }
  46.     public function setPrenom(string $prenom): self
  47.     {
  48.         $this->prenom $prenom;
  49.         return $this;
  50.     }
  51.     public function getPseudo(): ?string
  52.     {
  53.         return $this->pseudo;
  54.     }
  55.     public function setPseudo(?string $pseudo): self
  56.     {
  57.         $this->pseudo $pseudo;
  58.         return $this;
  59.     }
  60.     public function getImgProfil(): ?Media
  61.     {
  62.         return $this->imgProfil;
  63.     }
  64.     public function setImgProfil(?Media $imgProfil): self
  65.     {
  66.         $this->imgProfil $imgProfil;
  67.         return $this;
  68.     }
  69.     public function getImgBanniere(): ?Media
  70.     {
  71.         return $this->imgBanniere;
  72.     }
  73.     public function setImgBanniere(?Media $imgBanniere): self
  74.     {
  75.         $this->imgBanniere $imgBanniere;
  76.         return $this;
  77.     }
  78.     public function getDescription(): ?string
  79.     {
  80.         return $this->description;
  81.     }
  82.     public function setDescription(string $description): self
  83.     {
  84.         $this->description $description;
  85.         return $this;
  86.     }
  87.     public function getUser(): ?User
  88.     {
  89.         return $this->user;
  90.     }
  91.     public function setUser(?User $user): self
  92.     {
  93.         $this->user $user;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return Collection<int, Cours>
  98.      */
  99.     public function getCours(): Collection
  100.     {
  101.         return $this->cours;
  102.     }
  103.     public function addCour(Cours $cour): self
  104.     {
  105.         if (!$this->cours->contains($cour)) {
  106.             $this->cours->add($cour);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeCour(Cours $cour): self
  111.     {
  112.         $this->cours->removeElement($cour);
  113.         return $this;
  114.     }
  115.     /**
  116.      * @return Collection<int, Skills>
  117.      */
  118.     public function getSkills(): Collection
  119.     {
  120.         return $this->skills;
  121.     }
  122.     public function addSkill(Skills $skill): self
  123.     {
  124.         if (!$this->skills->contains($skill)) {
  125.             $this->skills->add($skill);
  126.         }
  127.         return $this;
  128.     }
  129.     public function removeSkill(Skills $skill): self
  130.     {
  131.         $this->skills->removeElement($skill);
  132.         return $this;
  133.     }
  134.     public function getAnciennetee(): ?\DateTimeImmutable
  135.     {
  136.         return $this->anciennetee;
  137.     }
  138.     public function setAnciennetee(\DateTimeImmutable $anciennetee): self
  139.     {
  140.         $this->anciennetee $anciennetee;
  141.         return $this;
  142.     }
  143.     public function getAccroche(): ?string
  144.     {
  145.         return $this->accroche;
  146.     }
  147.     public function setAccroche(string $accroche): self
  148.     {
  149.         $this->accroche $accroche;
  150.         return $this;
  151.     }
  152. }