src/Entity/Schedule.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\ScheduleRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassScheduleRepository::class)]
  8. #[ApiResource]
  9. class Schedule
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column]
  16.     private ?string $day null;
  17.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  18.     private ?\DateTimeInterface $opened_at null;
  19.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  20.     private ?\DateTimeInterface $closed_at null;
  21.     #[ORM\ManyToOne(inversedBy'schedules')]
  22.     private ?User $user null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getDay(): ?string
  28.     {
  29.         return $this->day;
  30.     }
  31.     public function setDay(string $day): static
  32.     {
  33.         $this->day $day;
  34.         return $this;
  35.     }
  36.     public function getOpenedAt(): ?\DateTimeInterface
  37.     {
  38.         return $this->opened_at;
  39.     }
  40.     public function setOpenedAt(\DateTimeInterface $opened_at): static
  41.     {
  42.         $this->opened_at $opened_at;
  43.         return $this;
  44.     }
  45.     public function getClosedAt(): ?\DateTimeInterface
  46.     {
  47.         return $this->closed_at;
  48.     }
  49.     public function setClosedAt(\DateTimeInterface $closed_at): static
  50.     {
  51.         $this->closed_at $closed_at;
  52.         return $this;
  53.     }
  54.     public function getUser(): ?User
  55.     {
  56.         return $this->user;
  57.     }
  58.     public function setUser(?User $user): static
  59.     {
  60.         $this->user $user;
  61.         return $this;
  62.     }
  63. }