<?php

declare(strict_types=1);

namespace App\Entity\Access;

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

/**
 * Paramètres d'abonnement à la com pour un Access.
 */
#[ApiResource(operations: [])]
// #[Auditable]
#[ORM\Entity]
class AccessCommunication
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;

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

    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;
    }
}
