<?php
namespace App\Entity;
use App\Repository\BrokerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BrokerRepository::class)]
class Broker
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne]
private ?Events $event = null;
#[ORM\Column(length: 50)]
private ?string $nom = null;
#[ORM\Column(length: 50)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $identifiant = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $password = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mail = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $phone = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nomBroker = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenomBroker = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(nullable: true)]
private ?Billet $billet = null;
public function getId(): ?int
{
return $this->id;
}
public function getEvent(): ?Events
{
return $this->event;
}
public function setEvent(?Events $event): self
{
$this->event = $event;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getIdentifiant(): ?string
{
return $this->identifiant;
}
public function setIdentifiant(?string $identifiant): self
{
$this->identifiant = $identifiant;
return $this;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(?string $password): self
{
$this->password = $password;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(?string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getNomBroker(): ?string
{
return $this->nomBroker;
}
public function setNomBroker(?string $nomBroker): self
{
$this->nomBroker = $nomBroker;
return $this;
}
public function getPrenomBroker(): ?string
{
return $this->prenomBroker;
}
public function setPrenomBroker(?string $prenomBroker): self
{
$this->prenomBroker = $prenomBroker;
return $this;
}
public function getBillet(): ?Billet
{
return $this->billet;
}
public function setBillet(Billet $billet): self
{
$this->billet = $billet;
return $this;
}
public function __clone(): void
{
if ($this->id) {
$this->id = null;
$this->event = null;
$this->billet = null;
}
}
public function __toString(): string
{
// TODO: Implement __toString() method.
return $this->getNom().' '.$this->getPrenom();
}
}