<?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;

/**
 * Parcours scolaire d'une Person
 *
 * @Iri("http://schema.org/SchoolingInEstablishment")
 */
#[ORM\Entity]
class SchoolingInEstablishment
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['schoolinginestablishment', 'access_details_person'])]
    private $id;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['schoolinginestablishment', 'access_details_person'])]
    private $establishmentName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['schoolinginestablishment'])]
    private $cityName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['schoolinginestablishment'])]
    private $disponibility;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['schoolinginestablishment', 'access_details_person'])]
    private $className;
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['schoolinginestablishment'])]
    private $startYear;
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['schoolinginestablishment'])]
    private $endYear;
    /**
     * @var Person
     */
    #[ORM\ManyToOne(targetEntity: 'Person', inversedBy: 'schoolingEstablisments')]
    #[Groups(['schoolinginestablishment'])]
    private $person;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['schoolinginestablishment', 'access_details_person'])]
    private $teacher;
    /**
     * 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 establishmentName.
     * 
     * @param string $establishmentName
     * 
     * @return $this
     */
    public function setEstablishmentName($establishmentName)
    {
        $this->establishmentName = $establishmentName;

        return $this;
    }
    /**
     * Gets establishmentName.
     * 
     * @return string
     */
    public function getEstablishmentName()
    {
        return $this->establishmentName;
    }
    /**
     * Sets cityName.
     * 
     * @param string $cityName
     * 
     * @return $this
     */
    public function setCityName($cityName)
    {
        $this->cityName = $cityName;

        return $this;
    }
    /**
     * Gets cityName.
     * 
     * @return string
     */
    public function getCityName()
    {
        return $this->cityName;
    }
    /**
     * Sets disponibility.
     * 
     * @param string $disponibility
     * 
     * @return $this
     */
    public function setDisponibility($disponibility)
    {
        $this->disponibility = $disponibility;

        return $this;
    }
    /**
     * Gets disponibility.
     * 
     * @return string
     */
    public function getDisponibility()
    {
        return $this->disponibility;
    }
    /**
     * Sets className.
     * 
     * @param string $className
     * 
     * @return $this
     */
    public function setClassName($className)
    {
        $this->className = $className;

        return $this;
    }
    /**
     * Gets className.
     * 
     * @return string
     */
    public function getClassName()
    {
        return $this->className;
    }
    /**
     * Sets person.
     *
     * @param Person $person
     *
     * @return $this
     */
    public function setPerson(Person $person = null)
    {
        $this->person = $person;

        return $this;
    }
    /**
     * Gets person.
     *
     * @return Person
     */
    public function getPerson()
    {
        return $this->person;
    }
    /**
     * Set teacher
     *
     * @param string $teacher
     *
     * @return SchoolingInEstablishment
     */
    public function setTeacher($teacher)
    {
        $this->teacher = $teacher;

        return $this;
    }
    /**
     * Get teacher
     *
     * @return string
     */
    public function getTeacher()
    {
        return $this->teacher;
    }
    /**
     * Set startYear
     *
     * @param integer $startYear
     *
     * @return SchoolingInEstablishment
     */
    public function setStartYear($startYear)
    {
        $this->startYear = $startYear;

        return $this;
    }
    /**
     * Get startYear
     *
     * @return integer
     */
    public function getStartYear()
    {
        return $this->startYear;
    }
    /**
     * Set endYear
     *
     * @param integer $endYear
     *
     * @return SchoolingInEstablishment
     */
    public function setEndYear($endYear)
    {
        $this->endYear = $endYear;

        return $this;
    }
    /**
     * Get endYear
     *
     * @return integer
     */
    public function getEndYear()
    {
        return $this->endYear;
    }
}
