<?php
namespace App\Entity;
use App\Repository\ChercheurRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ChercheurRepository::class)]
class Chercheur extends User
{
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $grade = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $affiliation = null;
#[ORM\Column(length: 255)]
private ?string $photo = null;
#[ORM\Column(nullable: true)]
private ?int $telephone = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateinscription = null;
#[ORM\OneToMany(targetEntity: Paper::class, mappedBy: 'chercheur', cascade: ['persist', 'remove'])]
private Collection $papers;
#[ORM\Column(length: 255, nullable: true)]
private ?string $country = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $photocov = null;
#[ORM\Column(nullable: true)]
private ?bool $iscertificate = false;
public function __construct()
{
$this->papers = new ArrayCollection();
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): static
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): static
{
$this->prenom = $prenom;
return $this;
}
public function getGrade(): ?string
{
return $this->grade;
}
public function setGrade(?string $grade): static
{
$this->grade = $grade;
return $this;
}
public function getAffiliation(): ?string
{
return $this->affiliation;
}
public function setAffiliation(?string $affiliation): static
{
$this->affiliation = $affiliation;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(string $photo): static
{
$this->photo = $photo;
return $this;
}
public function getTelephone(): ?int
{
return $this->telephone;
}
public function setTelephone(?int $telephone): static
{
$this->telephone = $telephone;
return $this;
}
public function getDateinscription(): ?\DateTimeInterface
{
return $this->dateinscription;
}
public function setDateinscription(?\DateTimeInterface $dateinscription): static
{
$this->dateinscription = $dateinscription;
return $this;
}
/**
* @return Collection<int, Paper>
*/
public function getPapers(): Collection
{
return $this->papers;
}
public function addPaper(Paper $paper): static
{
if (!$this->papers->contains($paper)) {
$this->papers->add($paper);
$paper->setChercheur($this);
}
return $this;
}
public function removePaper(Paper $paper): static
{
if ($this->papers->removeElement($paper)) {
// set the owning side to null (unless already changed)
if ($paper->getChercheur() === $this) {
$paper->setChercheur(null);
}
}
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): static
{
$this->country = $country;
return $this;
}
public function getPhotocov(): ?string
{
return $this->photocov;
}
public function setPhotocov(?string $photocov): static
{
$this->photocov = $photocov;
return $this;
}
public function isIscertificate(): ?bool
{
return $this->iscertificate;
}
public function setIscertificate(?bool $iscertificate): static
{
$this->iscertificate = $iscertificate;
return $this;
}
}