<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Entity\Docteur;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @author <erwan> <erwan@kodiom.com>
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="App\Entity\ConfirmationDocteurRepository")
* @ApiResource(
* collectionOperations={
* "get"={"method"="GET"},
* "inscription"={"route_name"="api_confirmation_docteurs_inscription"}
* }
* )
*/
class ConfirmationDocteur
{
/**
* @var integer $id
*
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var ArrayCollection
* @ORM\ManyToOne(
* targetEntity="App\Entity\Docteur",
* cascade={"persist"}
* )
* @ORM\JoinColumn(name="confirmation_docteur_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $docteur;
/**
* @var text
*
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $email;
/**
* @var text
*
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $nom;
/**
* @var text
*
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $prenom;
/**
* @var text
*
* @ORM\Column(type="text", nullable=true)
*/
private $photo;
/**
* @var text
*
* @ORM\Column(type="text", nullable=true)
*/
private $identite;
/**
* @var text
*
* @ORM\Column(type="text", nullable=true)
*/
private $rib;
public function __toString()
{
return ($this->getEmail()) ? $this->getEmail() : 'Unknown';
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set email
*
* @param string email
*
* @return ConfirmationDocteur
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set nom
*
* @param string nom
*
* @return ConfirmationDocteur
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set prenom
*
* @param string prenom
*
* @return ConfirmationDocteur
*/
public function setPrenom($prenom)
{
$this->prenom = $prenom;
return $this;
}
/**
* Get prenom
*
* @return string
*/
public function getPrenom()
{
return $this->prenom;
}
/**
* Get docteur
*
* @return ArrayCollection
*/
public function getDocteur()
{
return $this->docteur;
}
/**
* Set docteur
*
* @param Docteur $docteur
*
* @return ConfirmationDocteur
*/
public function setDocteur(Docteur $docteur)
{
$this->docteur = $docteur;
return $this;
}
/**
* Set photo
*
* @param string photo
*
* @return ConfirmationDocteur
*/
public function setPhoto($photo)
{
$this->photo = $photo;
return $this;
}
/**
* Get photo
*
* @return string
*/
public function getPhoto()
{
return $this->photo;
}
/**
* Set identite
*
* @param string identite
*
* @return ConfirmationDocteur
*/
public function setIdentite($identite)
{
$this->identite = $identite;
return $this;
}
/**
* Get identite
*
* @return string
*/
public function getIdentite()
{
return $this->identite;
}
/**
* Set rib
*
* @param string rib
*
* @return ConfirmationDocteur
*/
public function setRib($rib)
{
$this->rib = $rib;
return $this;
}
/**
* Get rib
*
* @return string
*/
public function getRib()
{
return $this->rib;
}
}