<?phpnamespace App\Entity;use App\Repository\AbsenceRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AbsenceRepository::class)]class Absence{ const ON_HOLD = 0; const APPROVED = 1; const REJECTED = 2; const DELETED = 3; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column(nullable: true)] private ?int $slot = null; #[ORM\ManyToOne(inversedBy: 'absences')] #[ORM\JoinColumn(nullable: false)] private ?User $employee = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?AbsenceType $type = null; #[ORM\Column] private ?int $status = null; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $startDate = null; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $endDate = null; public function __construct() { $this->status = self::ON_HOLD; } 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 getSlot(): ?int { return $this->slot; } public function setSlot(?int $slot): self { $this->slot = $slot; return $this; } public function getEmployee(): ?User { return $this->employee; } public function setEmployee(?User $employee): self { $this->employee = $employee; return $this; } public function getType(): ?AbsenceType { return $this->type; } public function setType(?AbsenceType $type): self { $this->type = $type; return $this; } public function getStatus(): ?int { return $this->status; } public function setStatus(int $status): self { $this->status = $status; return $this; } public function getStartDate(): ?\DateTimeInterface { return $this->startDate; } public function setStartDate(\DateTimeInterface $startDate): self { $this->startDate = $startDate; return $this; } public function getEndDate(): ?\DateTimeInterface { return $this->endDate; } public function setEndDate(\DateTimeInterface $endDate): self { $this->endDate = $endDate; return $this; }}