<?php
declare(strict_types=1);

namespace App\Entity\Booking;

use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;

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

    #[ORM\ManyToOne(inversedBy: 'eventRecur')]
    private Course $event;

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

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

        return $this;
    }

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

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

        return $this;
    }
}