forked from Somnia/SomniaRooms
106 lines
2.0 KiB
PHP
106 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\BookingCustomerRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Component\Serializer\Annotation\Ignore;
|
|
|
|
#[ORM\Entity(repositoryClass: BookingCustomerRepository::class)]
|
|
class BookingCustomer
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\OneToOne(inversedBy: 'bookingCustomer', cascade: ['persist', 'remove'])]
|
|
#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
|
|
#[Ignore]
|
|
private ?Booking $Booking = null;
|
|
|
|
#[ORM\Column(length: 64)]
|
|
private ?string $Name = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $Surname = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $Email = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $PhoneNumber = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
#[Ignore]
|
|
public function getBooking(): ?Booking
|
|
{
|
|
return $this->Booking;
|
|
}
|
|
|
|
#[Ignore]
|
|
public function setBooking(Booking $Booking): static
|
|
{
|
|
$this->Booking = $Booking;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->Name;
|
|
}
|
|
|
|
public function setName(string $Name): static
|
|
{
|
|
$this->Name = $Name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSurname(): ?string
|
|
{
|
|
return $this->Surname;
|
|
}
|
|
|
|
public function setSurname(string $Surname): static
|
|
{
|
|
$this->Surname = $Surname;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getEmail(): ?string
|
|
{
|
|
return $this->Email;
|
|
}
|
|
|
|
public function setEmail(string $Email): static
|
|
{
|
|
$this->Email = $Email;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPhoneNumber(): ?string
|
|
{
|
|
return $this->PhoneNumber;
|
|
}
|
|
|
|
public function setPhoneNumber(string $PhoneNumber): static
|
|
{
|
|
$this->PhoneNumber = $PhoneNumber;
|
|
|
|
return $this;
|
|
}
|
|
|
|
function __toString(): string
|
|
{
|
|
return $this->getName() . " " . $this->getSurname();
|
|
}
|
|
}
|