src/Entity/Booking.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\BookingRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\UX\Turbo\Attribute\Broadcast;
  7. #[ORM\Entity(repositoryClassBookingRepository::class)]
  8. #[ApiResource]
  9. #[Broadcast]
  10. class Booking
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(inversedBy'bookings')]
  17.     private ?Attendee $attendee null;
  18.     #[ORM\Column]
  19.     private ?float $total null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $position null;
  22.     #[ORM\Column]
  23.     private ?\DateTimeImmutable $createdAt null;
  24.     #[ORM\Column(length255)]
  25.     private ?string $status null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getAttendee(): ?Attendee
  31.     {
  32.         return $this->attendee;
  33.     }
  34.     public function setAttendee(?Attendee $attendee): self
  35.     {
  36.         $this->attendee $attendee;
  37.         return $this;
  38.     }
  39.     public function getTotal(): ?float
  40.     {
  41.         return $this->total;
  42.     }
  43.     public function setTotal(float $total): self
  44.     {
  45.         $this->total $total;
  46.         return $this;
  47.     }
  48.     public function getPosition(): ?string
  49.     {
  50.         return $this->position;
  51.     }
  52.     public function setPosition(string $position): self
  53.     {
  54.         $this->position $position;
  55.         return $this;
  56.     }
  57.     public function getCreatedAt(): ?\DateTimeImmutable
  58.     {
  59.         return $this->createdAt;
  60.     }
  61.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  62.     {
  63.         $this->createdAt $createdAt;
  64.         return $this;
  65.     }
  66.     public function getStatus(): ?string
  67.     {
  68.         return $this->status;
  69.     }
  70.     public function setStatus(string $status): self
  71.     {
  72.         $this->status $status;
  73.         return $this;
  74.     }
  75. }