<?phpnamespace App\Entity;use App\Entity\Helper\Timestamps;use App\Enum\EmployeeHourLog\InOut;use App\Repository\EmployeeHourLogRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EmployeeHourLogRepository::class) */class EmployeeHourLog{ use Timestamps; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Employee::class, inversedBy="employeeHourLogs") * @ORM\JoinColumn(nullable=false) */ private $employee; /** * @ORM\Column(type="datetime") */ private $date; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $comment; /** * @ORM\Column(type="inOut") */ private ?InOut $inOut = null; public function getId(): ?int { return $this->id; } public function getEmployee(): ?Employee { return $this->employee; } public function setEmployee(?Employee $employee): self { $this->employee = $employee; return $this; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getComment(): ?string { return $this->comment; } public function setComment(?string $comment): self { $this->comment = $comment; return $this; } public function getInOut(): ?InOut { return $this->inOut; } public function setInOut(InOut $inOut): self { $this->inOut = $inOut; return $this; } public function isIn() : bool { return InOut::IN === $this->inOut; } public function isOut() : bool { return InOut::OUT === $this->inOut; }}