src/Flexy/Apps/BookingBundle/Entity/Reservation.php line 12
<?php
namespace App\Flexy\Apps\BookingBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Flexy\ShopBundle\Entity\Customer\Customer;
use App\Repository\Flexy\BookingBundle\Entity\ReservationRepository;
use Doctrine\ORM\Mapping as ORM;
#[ApiResource]
#[ORM\Entity(repositoryClass: ReservationRepository::class)]
class Reservation
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $startAt = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $endAt = null;
#[ORM\ManyToOne(targetEntity: Offer::class, inversedBy: 'reservations')]
private ?\App\Flexy\Apps\BookingBundle\Entity\Offer $offer = null;
#[ORM\ManyToOne(targetEntity: Customer::class)]
private ?\App\Flexy\ShopBundle\Entity\Customer\Customer $customer = null;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getStartAt(): ?\DateTimeImmutable
{
return $this->startAt;
}
public function setStartAt(?\DateTimeImmutable $startAt): self
{
$this->startAt = $startAt;
return $this;
}
public function getEndAt(): ?\DateTimeImmutable
{
return $this->endAt;
}
public function setEndAt(?\DateTimeImmutable $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function getOffer(): ?Offer
{
return $this->offer;
}
public function setOffer(?Offer $offer): self
{
$this->offer = $offer;
return $this;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
}