<?php
declare (strict_types=1);

namespace App\Entity\Booking;

use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\ApiResource;
use App\Entity\Access\Access;
//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;

/**
 * Classe ... qui ...
 */
#[ApiResource(
    operations: [
        new Get(
            security: 'is_granted(\'ROLE_ADMIN\')'
        )
    ]
)]
//#[Auditable]
#[ORM\Entity]
class AttendanceBooking
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;

    #[ORM\ManyToOne(inversedBy: 'attendanceBookings')]
    private Access $access;

    #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
    private Attendance $attendance;

    #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
    private Course $course;

    #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
    private EducationalProject $educationalProject;

    #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
    private Event $event;

    #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
    private Examen $examen;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getAccess(): ?Access
    {
        return $this->access;
    }

    public function setAccess(?Access $access): self
    {
        $this->access = $access;
        return $this;
    }

    public function getAttendance(): ?Attendance
    {
        return $this->attendance;
    }

    public function setAttendance(?Attendance $attendance): self
    {
        $this->attendance = $attendance;
        return $this;
    }

    public function getCourse(): ?Course
    {
        return $this->course;
    }

    public function setCourse(?Course $course): self
    {
        $this->course = $course;
        return $this;
    }

    public function getEducationalProject(): ?EducationalProject
    {
        return $this->educationalProject;
    }

    public function setEducationalProject(?EducationalProject $educationalProject): self
    {
        $this->educationalProject = $educationalProject;
        return $this;
    }

    public function getEvent(): ?Event
    {
        return $this->event;
    }

    public function setEvent(?Event $event): self
    {
        $this->event = $event;
        return $this;
    }

    public function getExamen(): ?Examen
    {
        return $this->examen;
    }

    public function setExamen(?Examen $examen): self
    {
        $this->examen = $examen;
        return $this;
    }
}
