<?php

declare(strict_types=1);

namespace App\Entity\Booking;

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

/**
 * TODO: documenter.
 */
// #[Auditable]
#[ApiResource(operations: [])]
#[ORM\Entity]
class CalendarSynchro
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;

    #[ORM\OneToOne(targetEntity: Access::class, inversedBy: 'calendarSynchro', cascade: ['persist'])]
    protected ?Access $access;

    #[ORM\OneToOne(inversedBy: 'calendarSynchro', targetEntity: File::class, cascade: ['persist'])]
    protected ?File $file;

    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 getFile(): ?File
    {
        return $this->file;
    }

    public function setFile(?File $file): self
    {
        $this->file = $file;

        return $this;
    }
}
