<?php
declare(strict_types=1);

namespace App\Entity\Place;

//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Core\AbstractControl;

/**
 * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table RoomControl, et supprimer l'attribut discr.
 *
 * Classe ... qui ...
 */
//#[Auditable]
#[ORM\Entity]
#[ORM\Table(name: 'Control')]
class RoomControl extends AbstractControl
{
    #[ORM\Column(length: 255, nullable: false)]
    private string $discr = 'room';

    #[ORM\ManyToOne(inversedBy: 'controls')]
    private Room $room;

    public function getDiscr(): ?string
    {
        return $this->discr;
    }

    public function setDiscr(string $discr): self
    {
        $this->discr = $discr;

        return $this;
    }

    public function getRoom(): ?Room
    {
        return $this->room;
    }

    public function setRoom(?Room $room): self
    {
        $this->room = $room;

        return $this;
    }
}