src/Entity/ConfirmationDocteur.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use ApiPlatform\Core\Annotation\ApiResource;
  6. use App\Entity\Docteur;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. /**
  9.  * @author <erwan> <erwan@kodiom.com>
  10.  *
  11.  * @ORM\Table()
  12.  * @ORM\Entity(repositoryClass="App\Entity\ConfirmationDocteurRepository")
  13.  * @ApiResource(
  14.  *     collectionOperations={
  15.  *        "get"={"method"="GET"},
  16.  *        "inscription"={"route_name"="api_confirmation_docteurs_inscription"}
  17.  *     }
  18.  * )
  19.  */
  20. class ConfirmationDocteur
  21. {
  22.     /**
  23.      * @var integer $id
  24.      *
  25.      * @ORM\Id
  26.      * @ORM\Column(type="integer")
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @var ArrayCollection
  32.      * @ORM\ManyToOne(
  33.      *   targetEntity="App\Entity\Docteur",
  34.      *   cascade={"persist"}
  35.      * )
  36.      * @ORM\JoinColumn(name="confirmation_docteur_id", referencedColumnName="id", onDelete="CASCADE")
  37.      */
  38.     private $docteur;
  39.     /**
  40.      * @var text
  41.      *
  42.      * @ORM\Column(type="string", length=255)
  43.      * @Assert\NotBlank()
  44.      */
  45.     private $email;
  46.     /**
  47.      * @var text
  48.      *
  49.      * @ORM\Column(type="string", length=255)
  50.      * @Assert\NotBlank()
  51.      */
  52.     private $nom;
  53.     /**
  54.      * @var text
  55.      *
  56.      * @ORM\Column(type="string", length=255)
  57.      * @Assert\NotBlank()
  58.      */
  59.     private $prenom;
  60.     /**
  61.      * @var text
  62.      *
  63.      * @ORM\Column(type="text", nullable=true)
  64.      */
  65.     private $photo;
  66.     /**
  67.      * @var text
  68.      *
  69.      * @ORM\Column(type="text", nullable=true)
  70.      */
  71.     private $identite;
  72.     /**
  73.      * @var text
  74.      *
  75.      * @ORM\Column(type="text", nullable=true)
  76.      */
  77.     private $rib;
  78.     public function __toString()
  79.     {
  80.         return ($this->getEmail()) ? $this->getEmail() : 'Unknown';
  81.     }
  82.     /**
  83.      * Get id
  84.      *
  85.      * @return integer
  86.      */
  87.     public function getId()
  88.     {
  89.         return $this->id;
  90.     }
  91.     /**
  92.      * Set email
  93.      *
  94.      * @param string email
  95.      *
  96.      * @return ConfirmationDocteur
  97.      */
  98.     public function setEmail($email)
  99.     {
  100.         $this->email $email;
  101.         return $this;
  102.     }
  103.     /**
  104.      * Get email
  105.      *
  106.      * @return string
  107.      */
  108.     public function getEmail()
  109.     {
  110.         return $this->email;
  111.     }
  112.     /**
  113.      * Set nom
  114.      *
  115.      * @param string nom
  116.      *
  117.      * @return ConfirmationDocteur
  118.      */
  119.     public function setNom($nom)
  120.     {
  121.         $this->nom $nom;
  122.         return $this;
  123.     }
  124.     /**
  125.      * Get nom
  126.      *
  127.      * @return string
  128.      */
  129.     public function getNom()
  130.     {
  131.         return $this->nom;
  132.     }
  133.     /**
  134.      * Set prenom
  135.      *
  136.      * @param string prenom
  137.      *
  138.      * @return ConfirmationDocteur
  139.      */
  140.     public function setPrenom($prenom)
  141.     {
  142.         $this->prenom $prenom;
  143.         return $this;
  144.     }
  145.     /**
  146.      * Get prenom
  147.      *
  148.      * @return string
  149.      */
  150.     public function getPrenom()
  151.     {
  152.         return $this->prenom;
  153.     }
  154.     /**
  155.      * Get docteur
  156.      *
  157.      * @return ArrayCollection
  158.      */
  159.     public function getDocteur()
  160.     {
  161.         return $this->docteur;
  162.     }
  163.     /**
  164.      * Set docteur
  165.      *
  166.      * @param Docteur $docteur
  167.      *
  168.      * @return ConfirmationDocteur
  169.      */
  170.     public function setDocteur(Docteur $docteur)
  171.     {
  172.         $this->docteur $docteur;
  173.         return $this;
  174.     }
  175.     /**
  176.      * Set photo
  177.      *
  178.      * @param string photo
  179.      *
  180.      * @return ConfirmationDocteur
  181.      */
  182.     public function setPhoto($photo)
  183.     {
  184.         $this->photo $photo;
  185.         return $this;
  186.     }
  187.     /**
  188.      * Get photo
  189.      *
  190.      * @return string
  191.      */
  192.     public function getPhoto()
  193.     {
  194.         return $this->photo;
  195.     }
  196.     /**
  197.      * Set identite
  198.      *
  199.      * @param string identite
  200.      *
  201.      * @return ConfirmationDocteur
  202.      */
  203.     public function setIdentite($identite)
  204.     {
  205.         $this->identite $identite;
  206.         return $this;
  207.     }
  208.     /**
  209.      * Get identite
  210.      *
  211.      * @return string
  212.      */
  213.     public function getIdentite()
  214.     {
  215.         return $this->identite;
  216.     }
  217.     /**
  218.      * Set rib
  219.      *
  220.      * @param string rib
  221.      *
  222.      * @return ConfirmationDocteur
  223.      */
  224.     public function setRib($rib)
  225.     {
  226.         $this->rib $rib;
  227.         return $this;
  228.     }
  229.     /**
  230.      * Get rib
  231.      *
  232.      * @return string
  233.      */
  234.     public function getRib()
  235.     {
  236.         return $this->rib;
  237.     }
  238. }