src/Entity/Broker.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BrokerRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassBrokerRepository::class)]
  7. class Broker
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne]
  14.     private ?Events $event null;
  15.     #[ORM\Column(length50)]
  16.     private ?string $nom null;
  17.     #[ORM\Column(length50)]
  18.     private ?string $prenom null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $identifiant null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $password null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $mail null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $phone null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $nomBroker null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $prenomBroker null;
  31.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  32.     #[ORM\JoinColumn(nullabletrue)]
  33.     private ?Billet $billet null;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getEvent(): ?Events
  39.     {
  40.         return $this->event;
  41.     }
  42.     public function setEvent(?Events $event): self
  43.     {
  44.         $this->event $event;
  45.         return $this;
  46.     }
  47.     public function getNom(): ?string
  48.     {
  49.         return $this->nom;
  50.     }
  51.     public function setNom(string $nom): self
  52.     {
  53.         $this->nom $nom;
  54.         return $this;
  55.     }
  56.     public function getPrenom(): ?string
  57.     {
  58.         return $this->prenom;
  59.     }
  60.     public function setPrenom(string $prenom): self
  61.     {
  62.         $this->prenom $prenom;
  63.         return $this;
  64.     }
  65.     public function getIdentifiant(): ?string
  66.     {
  67.         return $this->identifiant;
  68.     }
  69.     public function setIdentifiant(?string $identifiant): self
  70.     {
  71.         $this->identifiant $identifiant;
  72.         return $this;
  73.     }
  74.     public function getPassword(): ?string
  75.     {
  76.         return $this->password;
  77.     }
  78.     public function setPassword(?string $password): self
  79.     {
  80.         $this->password $password;
  81.         return $this;
  82.     }
  83.     public function getMail(): ?string
  84.     {
  85.         return $this->mail;
  86.     }
  87.     public function setMail(?string $mail): self
  88.     {
  89.         $this->mail $mail;
  90.         return $this;
  91.     }
  92.     public function getPhone(): ?string
  93.     {
  94.         return $this->phone;
  95.     }
  96.     public function setPhone(?string $phone): self
  97.     {
  98.         $this->phone $phone;
  99.         return $this;
  100.     }
  101.     public function getNomBroker(): ?string
  102.     {
  103.         return $this->nomBroker;
  104.     }
  105.     public function setNomBroker(?string $nomBroker): self
  106.     {
  107.         $this->nomBroker $nomBroker;
  108.         return $this;
  109.     }
  110.     public function getPrenomBroker(): ?string
  111.     {
  112.         return $this->prenomBroker;
  113.     }
  114.     public function setPrenomBroker(?string $prenomBroker): self
  115.     {
  116.         $this->prenomBroker $prenomBroker;
  117.         return $this;
  118.     }
  119.     public function getBillet(): ?Billet
  120.     {
  121.         return $this->billet;
  122.     }
  123.     public function setBillet(Billet $billet): self
  124.     {
  125.         $this->billet $billet;
  126.         return $this;
  127.     }
  128.     public function __clone(): void
  129.     {
  130.         if ($this->id) {
  131.             $this->id null;
  132.             $this->event null;
  133.             $this->billet null;
  134.         }
  135.     }
  136.     public function __toString(): string
  137.     {
  138.         // TODO: Implement __toString() method.
  139.         return $this->getNom().' '.$this->getPrenom();
  140.     }
  141. }