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

/**
 * Antécédents pédagogique d'une Person (en dehors de l'Organization)
 *
 * @Iri("http://schema.org/DisciplineOtherEstablishment")
 */
#[ORM\Entity]
class DisciplineOtherEstablishment
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['disciplineotherestablishment', 'access_details_person'])]
    private $id;
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['disciplineotherestablishment', 'access_details_person'])]
    private $year;
    /**
     * @var Person
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'disciplineotherestablishments')]
    #[Groups(['disciplineotherestablishment'])]
    private $person;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['disciplineotherestablishment', 'access_details_person'])]
    private $establishmentName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['disciplineotherestablishment'])]
    private $cityName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['disciplineotherestablishment', 'access_details_person'])]
    private $educationName;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['disciplineotherestablishment'])]
    private $acquired = false;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['disciplineotherestablishment', 'access_details_person'])]
    private $level;
    /**
     * 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 year.
     * 
     * @param number $year
     * 
     * @return $this
     */
    public function setYear($year = null)
    {
        $this->year = $year;

        return $this;
    }
    /**
     * Gets year.
     * 
     * @return number
     */
    public function getYear()
    {
        return $this->year;
    }
    /**
     * 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;
    }
    /**
     * 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 educationName.
     * 
     * @param string $educationName
     * 
     * @return $this
     */
    public function setEducationName($educationName)
    {
        $this->educationName = $educationName;

        return $this;
    }
    /**
     * Gets educationName.
     * 
     * @return string
     */
    public function getEducationName()
    {
        return $this->educationName;
    }
    /**
     * Sets acquired.
     * 
     * @param bool $acquired
     * 
     * @return $this
     */
    public function setAcquired($acquired)
    {
        $this->acquired = $acquired;

        return $this;
    }
    /**
     * Gets acquired.
     * 
     * @return bool
     */
    public function getAcquired()
    {
        return $this->acquired;
    }
    /**
     * Sets level.
     * 
     * @param string $level
     * 
     * @return $this
     */
    public function setLevel($level)
    {
        $this->level = $level;

        return $this;
    }
    /**
     * Gets level.
     * 
     * @return string
     */
    public function getLevel()
    {
        return $this->level;
    }
}
