src/Entity/Chercheur.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChercheurRepository;
  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(repositoryClassChercheurRepository::class)]
  9. class Chercheur extends User
  10. {
  11.     
  12.     #[ORM\Column(length255nullabletrue)]
  13.     private ?string $nom null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $prenom null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $grade null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $affiliation null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $photo null;
  22.     #[ORM\Column(nullabletrue)]
  23.     private ?int $telephone null;
  24.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  25.     private ?\DateTimeInterface $dateinscription null;
  26.     #[ORM\OneToMany(targetEntityPaper::class, mappedBy'chercheur')]
  27.     private Collection $papers;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $country null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $photocov null;
  32.     public function __construct()
  33.     {
  34.         $this->papers = new ArrayCollection();
  35.     }
  36.     
  37.     
  38.     
  39.     public function getNom(): ?string
  40.     {
  41.         return $this->nom;
  42.     }
  43.     public function setNom(?string $nom): static
  44.     {
  45.         $this->nom $nom;
  46.         return $this;
  47.     }
  48.     public function getPrenom(): ?string
  49.     {
  50.         return $this->prenom;
  51.     }
  52.     public function setPrenom(?string $prenom): static
  53.     {
  54.         $this->prenom $prenom;
  55.         return $this;
  56.     }
  57.     public function getGrade(): ?string
  58.     {
  59.         return $this->grade;
  60.     }
  61.     public function setGrade(?string $grade): static
  62.     {
  63.         $this->grade $grade;
  64.         return $this;
  65.     }
  66.     public function getAffiliation(): ?string
  67.     {
  68.         return $this->affiliation;
  69.     }
  70.     public function setAffiliation(?string $affiliation): static
  71.     {
  72.         $this->affiliation $affiliation;
  73.         return $this;
  74.     }
  75.     public function getPhoto(): ?string
  76.     {
  77.         return $this->photo;
  78.     }
  79.     public function setPhoto(string $photo): static
  80.     {
  81.         $this->photo $photo;
  82.         return $this;
  83.     }
  84.     public function getTelephone(): ?int
  85.     {
  86.         return $this->telephone;
  87.     }
  88.     public function setTelephone(?int $telephone): static
  89.     {
  90.         $this->telephone $telephone;
  91.         return $this;
  92.     }
  93.     public function getDateinscription(): ?\DateTimeInterface
  94.     {
  95.         return $this->dateinscription;
  96.     }
  97.     public function setDateinscription(?\DateTimeInterface $dateinscription): static
  98.     {
  99.         $this->dateinscription $dateinscription;
  100.         return $this;
  101.     }
  102.     /**
  103.      * @return Collection<int, Paper>
  104.      */
  105.     public function getPapers(): Collection
  106.     {
  107.         return $this->papers;
  108.     }
  109.     public function addPaper(Paper $paper): static
  110.     {
  111.         if (!$this->papers->contains($paper)) {
  112.             $this->papers->add($paper);
  113.             $paper->setChercheur($this);
  114.         }
  115.         return $this;
  116.     }
  117.     public function removePaper(Paper $paper): static
  118.     {
  119.         if ($this->papers->removeElement($paper)) {
  120.             // set the owning side to null (unless already changed)
  121.             if ($paper->getChercheur() === $this) {
  122.                 $paper->setChercheur(null);
  123.             }
  124.         }
  125.         return $this;
  126.     }
  127.     public function getCountry(): ?string
  128.     {
  129.         return $this->country;
  130.     }
  131.     public function setCountry(?string $country): static
  132.     {
  133.         $this->country $country;
  134.         return $this;
  135.     }
  136.     public function getPhotocov(): ?string
  137.     {
  138.         return $this->photocov;
  139.     }
  140.     public function setPhotocov(?string $photocov): static
  141.     {
  142.         $this->photocov $photocov;
  143.         return $this;
  144.     }
  145.     
  146.     
  147. }