<?php

namespace AppBundle\Entity\Organization;

use AppBundle\Entity\AccessAndFunction\Access;
use AppBundle\Entity\Organization\OnlineRegistrationSettings;
use AppBundle\Entity\Organization\Organization;
use AppBundle\Entity\Traits\ActivityPeriodTrait;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;

/**
 * OnlineRegistrationOpeningPeriod.
 *
 * @see http://schema.org/OnlineRegistrationOpeningPeriod Documentation on Schema.org
 *
 * @Iri("http://schema.org/OnlineRegistrationOpeningPeriod")
 */
#[ORM\Entity]
class OnlineRegistrationOpeningPeriod
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['onlineregistrationopeningperiod', 'onlineregistrationsettings_edit_onlineregistrationsettings', 'onlineregistration_infos'])]
    private $id;
    /**
     * @var OnlineRegistrationSettings
     */
    #[ORM\ManyToOne(targetEntity: 'OnlineRegistrationSettings', inversedBy: 'openingPeriods')]
    #[ORM\JoinColumn]
    #[Groups(['onlineregistrationopeningperiod'])]
    private $onlineRegistrationSettings;
    /**
     * @var OnlineRegistrationSettings
     */
    #[ORM\ManyToOne(targetEntity: 'OnlineRegistrationSettings', inversedBy: 'openingPeriodsNewEnrolments')]
    #[ORM\JoinColumn]
    #[Groups(['onlineregistrationopeningperiod'])]
    private $onlineRegistrationSettingsNewEnrolments;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date')]
    #[Assert\Date]
    #[Assert\NotNull]
    #[Groups(['onlineregistrationopeningperiod', 'onlineregistrationsettings_edit_onlineregistrationsettings', 'onlineregistration_infos_openingperiods'])]
    private $startDate;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date')]
    #[Assert\Date]
    #[Assert\NotNull]
    #[Groups(['onlineregistrationopeningperiod', 'onlineregistrationsettings_edit_onlineregistrationsettings', 'onlineregistration_infos_openingperiods'])]
    private $endDate;
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set startDate
     *
     * @param \DateTime $startDate
     *
     * @return OnlineRegistrationOpeningPeriod
     */
    public function setStartDate($startDate)
    {
        $this->startDate = $startDate;

        return $this;
    }
    /**
     * Get startDate
     *
     * @return \DateTime
     */
    public function getStartDate()
    {
        return $this->startDate;
    }
    /**
     * Set endDate
     *
     * @param \DateTime $endDate
     *
     * @return OnlineRegistrationOpeningPeriod
     */
    public function setEndDate($endDate)
    {
        $this->endDate = $endDate;

        return $this;
    }
    /**
     * Get endDate
     *
     * @return \DateTime
     */
    public function getEndDate()
    {
        return $this->endDate;
    }
    /**
     * Set onlineRegistrationSettings
     *
     * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings
     *
     * @return OnlineRegistrationOpeningPeriod
     */
    public function setOnlineRegistrationSettings(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings)
    {
        $this->onlineRegistrationSettings = $onlineRegistrationSettings;

        return $this;
    }
    /**
     * Get onlineRegistrationSettings
     *
     * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
     */
    public function getOnlineRegistrationSettings()
    {
        return $this->onlineRegistrationSettings;
    }
    /**
     * Set onlineRegistrationSettingsNewEnrolments
     *
     * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettingsNewEnrolments
     *
     * @return OnlineRegistrationOpeningPeriod
     */
    public function setOnlineRegistrationSettingsNewEnrolments(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettingsNewEnrolments = null)
    {
        $this->onlineRegistrationSettingsNewEnrolments = $onlineRegistrationSettingsNewEnrolments;

        return $this;
    }
    /**
     * Get onlineRegistrationSettingsNewEnrolments
     *
     * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
     */
    public function getOnlineRegistrationSettingsNewEnrolments()
    {
        return $this->onlineRegistrationSettingsNewEnrolments;
    }
}
