<?php

namespace AppBundle\Entity\Person;

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;

/**
 * Historique des enseignements donnés par une Person
 *
 * @Iri("http://schema.org/TeacherSchoolingHistory")
 */
#[ORM\Entity]
class TeacherSchoolingHistory
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['teacherschoolinghistory', 'access_details_person'])]
    private $id;
    /**
     * @var Person
     */
    #[ORM\ManyToOne(targetEntity: 'Person', inversedBy: 'teacherSchoolingHistories')]
    #[ORM\JoinColumn(nullable: false)]
    #[Assert\NotNull]
    #[Groups(['teacherschoolinghistory'])]
    private $person;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 50, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['teacherschoolinghistory'])]
    private $establishment;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 50, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['teacherschoolinghistory'])]
    private $city;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 30, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['teacherschoolinghistory', 'access_details_person'])]
    private $teaching;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['teacherschoolinghistory', 'access_details_person'])]
    private $beginDate;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['teacherschoolinghistory', 'access_details_person'])]
    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;
    }
    /**
     * Sets person.
     * 
     * @param Person $person
     * 
     * @return $this
     */
    public function setPerson(Person $person)
    {
        $this->person = $person;

        return $this;
    }
    /**
     * Gets person.
     * 
     * @return Person
     */
    public function getPerson()
    {
        return $this->person;
    }
    /**
     * Sets establishment.
     * 
     * @param string $establishment
     * 
     * @return $this
     */
    public function setEstablishment($establishment)
    {
        $this->establishment = $establishment;

        return $this;
    }
    /**
     * Gets establishment.
     * 
     * @return string
     */
    public function getEstablishment()
    {
        return $this->establishment;
    }
    /**
     * Sets city.
     * 
     * @param string $city
     * 
     * @return $this
     */
    public function setCity($city)
    {
        $this->city = $city;

        return $this;
    }
    /**
     * Gets city.
     * 
     * @return string
     */
    public function getCity()
    {
        return $this->city;
    }
    /**
     * Sets teaching.
     * 
     * @param string $teaching
     * 
     * @return $this
     */
    public function setTeaching($teaching)
    {
        $this->teaching = $teaching;

        return $this;
    }
    /**
     * Gets teaching.
     * 
     * @return string
     */
    public function getTeaching()
    {
        return $this->teaching;
    }
    /**
     * Sets beginDate.
     * 
     * @param \DateTime $beginDate
     * 
     * @return $this
     */
    public function setBeginDate(\DateTime $beginDate = null)
    {
        $this->beginDate = $beginDate;

        return $this;
    }
    /**
     * Gets beginDate.
     * 
     * @return \DateTime
     */
    public function getBeginDate()
    {
        return $this->beginDate;
    }
    /**
     * Sets endDate.
     * 
     * @param \DateTime $endDate
     * 
     * @return $this
     */
    public function setEndDate(\DateTime $endDate = null)
    {
        $this->endDate = $endDate;

        return $this;
    }
    /**
     * Gets endDate.
     * 
     * @return \DateTime
     */
    public function getEndDate()
    {
        return $this->endDate;
    }
}
