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

/**
 * Diplôme associé à une Person
 *
 * @Iri("http://schema.org/Qualification")
 */
#[ORM\Entity]
class Qualification
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $id;
    /**
     * @var Person
     */
    #[ORM\ManyToOne(targetEntity: 'Person', inversedBy: 'qualifications')]
    #[ORM\JoinColumn(nullable: false)]
    #[Assert\NotNull]
    #[Groups(['qualification'])]
    private $person;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 60, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $diploma;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $date;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 30, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $mention;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 30, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $establishment;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['qualification', 'access_informations_edit_person'])]
    private $city;
    /**
     * 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 date.
     * 
     * @param \DateTime $date
     * 
     * @return $this
     */
    public function setDate(\DateTime $date = null)
    {
        $this->date = $date;

        return $this;
    }
    /**
     * Gets date.
     * 
     * @return \DateTime
     */
    public function getDate()
    {
        return $this->date;
    }
    /**
     * Sets mention.
     * 
     * @param string $mention
     * 
     * @return $this
     */
    public function setMention($mention)
    {
        $this->mention = $mention;

        return $this;
    }
    /**
     * Gets mention.
     * 
     * @return string
     */
    public function getMention()
    {
        return $this->mention;
    }
    /**
     * 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;
    }
    /**
     * Set diploma
     *
     * @param string $diploma
     *
     * @return Qualification
     */
    public function setDiploma($diploma)
    {
        $this->diploma = $diploma;

        return $this;
    }
    /**
     * Get diploma
     *
     * @return string
     */
    public function getDiploma()
    {
        return $this->diploma;
    }
}
