<?php
declare(strict_types=1);

namespace App\Entity\Booking;

use App\Annotation\ActivityYearConstraintAware;
use App\Annotation\OrganizationDefaultValue;
use App\Entity\Access\Access;
use App\Entity\Core\Tagg;
use App\Entity\Organization\Organization;
use App\Entity\Place\Place;
use App\Entity\Place\Room;
use App\Entity\Traits\ActivityYearTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

/**
 * Classe ... qui ...
 */
#[ActivityYearConstraintAware(startYearFieldName: "startYear", endYearFieldName: "endYear")]
#[OrganizationDefaultValue(fieldName: "organization")]
#[ORM\MappedSuperclass]
abstract class AbstractBooking
{
    use ActivityYearTrait;

    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    protected ?int $id = null;

    #[ORM\Column(type: 'datetime', nullable: true)]
    protected ?\DateTimeInterface $datetimeStart = null;

    #[ORM\Column(type: 'datetime', nullable: true)]
    protected ?\DateTimeInterface $datetimeEnd = null;

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


    public function setDatetimeStart(\DateTimeInterface $datetimeStart = null) : self
    {
        $this->datetimeStart = $datetimeStart;

        return $this;
    }

    public function getDatetimeStart(): ?\DateTimeInterface
    {
        return $this->datetimeStart;
    }

    public function setDatetimeEnd(\DateTimeInterface $datetimeEnd = null) : self
    {
        $this->datetimeEnd = $datetimeEnd;

        return $this;
    }

    public function getDatetimeEnd(): ?\DateTimeInterface
    {
        return $this->datetimeEnd;
    }
}