<?php
namespace App\Entity;
use App\Repository\BookingRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BookingRepository::class)]
class Booking
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Course::class, inversedBy: 'bookings')]
private $course;
#[ORM\ManyToOne(targetEntity: Trainee::class, inversedBy: 'bookings')]
private $trainee;
#[ORM\Column(type: 'string', length: 255)]
private $begin;
#[ORM\Column(type: 'string', length: 255)]
private $end;
#[ORM\Column(type: 'string', length: 255)]
private $adult;
#[ORM\Column(type: 'string', length: 255)]
private $teen;
#[ORM\Column(type: 'string', length: 255)]
private $child;
#[ORM\Column(type: 'string', length: 255)]
private $total;
#[ORM\Column(type: 'datetime')]
private $askedAt;
#[ORM\Column(type: 'string', length: 255)]
private $status;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $paymentMethod;
#[ORM\Column(type: 'boolean', nullable: true)]
private $isPaid;
#[ORM\OneToOne(targetEntity: PaymentRequest::class, mappedBy: 'booking', cascade: ['persist', 'remove'])]
private $paymentRequest;
#[ORM\Column(type: 'string', length: 255)]
private $week;
#[ORM\OneToOne(targetEntity: Note::class, mappedBy: 'booking', cascade: ['persist', 'remove'])]
private $note;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $reason;
#[ORM\Column(type: 'boolean', nullable: true)]
private $isNoted;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $ref;
#[ORM\Column(type: 'string', length: 255)]
private $month;
#[ORM\Column(type: 'string', length: 255)]
private $year;
public function getId(): ?int
{
return $this->id;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
public function getTrainee(): ?Trainee
{
return $this->trainee;
}
public function setTrainee(?Trainee $trainee): self
{
$this->trainee = $trainee;
return $this;
}
public function getBegin(): ?string
{
return $this->begin;
}
public function setBegin(string $begin): self
{
$this->begin = $begin;
return $this;
}
public function getEnd(): ?string
{
return $this->end;
}
public function setEnd(string $end): self
{
$this->end = $end;
return $this;
}
public function getAdult(): ?string
{
return $this->adult;
}
public function setAdult(string $adult): self
{
$this->adult = $adult;
return $this;
}
public function getTeen(): ?string
{
return $this->teen;
}
public function setTeen(string $teen): self
{
$this->teen = $teen;
return $this;
}
public function getChild(): ?string
{
return $this->child;
}
public function setChild(string $child): self
{
$this->child = $child;
return $this;
}
public function getTotal(): ?string
{
return $this->total;
}
public function setTotal(string $total): self
{
$this->total = $total;
return $this;
}
public function getAskedAt(): ?\DateTimeInterface
{
return $this->askedAt;
}
public function setAskedAt(\DateTimeInterface $askedAt): self
{
$this->askedAt = $askedAt;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getPaymentMethod(): ?string
{
return $this->paymentMethod;
}
public function setPaymentMethod(?string $paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
public function getIsPaid(): ?bool
{
return $this->isPaid;
}
public function setIsPaid(?bool $isPaid): self
{
$this->isPaid = $isPaid;
return $this;
}
public function getPaymentRequest(): ?PaymentRequest
{
return $this->paymentRequest;
}
public function setPaymentRequest(?PaymentRequest $paymentRequest): self
{
// unset the owning side of the relation if necessary
if ($paymentRequest === null && $this->paymentRequest !== null) {
$this->paymentRequest->setBooking(null);
}
// set the owning side of the relation if necessary
if ($paymentRequest !== null && $paymentRequest->getBooking() !== $this) {
$paymentRequest->setBooking($this);
}
$this->paymentRequest = $paymentRequest;
return $this;
}
public function getWeek(): ?string
{
return $this->week;
}
public function setWeek(string $week): self
{
$this->week = $week;
return $this;
}
public function getNote(): ?Note
{
return $this->note;
}
public function setNote(?Note $note): self
{
// unset the owning side of the relation if necessary
if ($note === null && $this->note !== null) {
$this->note->setBooking(null);
}
// set the owning side of the relation if necessary
if ($note !== null && $note->getBooking() !== $this) {
$note->setBooking($this);
}
$this->note = $note;
return $this;
}
public function getReason(): ?string
{
return $this->reason;
}
public function setReason(?string $reason): self
{
$this->reason = $reason;
return $this;
}
public function getIsNoted(): ?bool
{
return $this->isNoted;
}
public function setIsNoted(?bool $isNoted): self
{
$this->isNoted = $isNoted;
return $this;
}
public function getRef(): ?string
{
return $this->ref;
}
public function setRef(?string $ref): self
{
$this->ref = $ref;
return $this;
}
public function getMonth(): ?string
{
return $this->month;
}
public function setMonth(string $month): self
{
$this->month = $month;
return $this;
}
public function getYear(): ?string
{
return $this->year;
}
public function setYear(string $year): self
{
$this->year = $year;
return $this;
}
}