src/Entity/LoggedTime.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\LoggedTimeRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassLoggedTimeRepository::class)]
  8. #[ApiResource]
  9. class LoggedTime
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  16.     private ?\DateTimeInterface $date null;
  17.     #[ORM\Column]
  18.     private ?int $time null;
  19.     #[ORM\ManyToOne(inversedBy'loggedTimes')]
  20.     private ?Attendee $attendee null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getDate(): ?\DateTimeInterface
  26.     {
  27.         return $this->date;
  28.     }
  29.     public function setDate(\DateTimeInterface $date): self
  30.     {
  31.         $this->date $date;
  32.         return $this;
  33.     }
  34.     public function getTime(): ?int
  35.     {
  36.         return $this->time;
  37.     }
  38.     public function setTime(int $time): self
  39.     {
  40.         $this->time $time;
  41.         return $this;
  42.     }
  43.     public function getAttendee(): ?Attendee
  44.     {
  45.         return $this->attendee;
  46.     }
  47.     public function setAttendee(?Attendee $attendee): self
  48.     {
  49.         $this->attendee $attendee;
  50.         return $this;
  51.     }
  52. }