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

/**
 * Informations médicales associées à une Person
 *
 * @Iri("http://schema.org/Medical")
 */
#[ORM\Entity]
class Medical
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['medical', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $id;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $doctor;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 20, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $doctorePhone;
    /**
     * @var string
     */
    #[ORM\Column(type: 'text', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['medical', 'access_mass_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
    private $comments;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', nullable: true)]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $certificate;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', nullable: true)]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
    private $insuranceCertificate;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $insuranceName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
    private $insuranceNumber;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', nullable: true)]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['medical'])]
    private $healthPass;
    /**
     * @var Person
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Person\Person', mappedBy: 'medical', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
    private $person;
    /**
     * 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 doctor.
     *
     * @param string $doctor
     *
     * @return $this
     */
    public function setDoctor($doctor)
    {
        $this->doctor = $doctor;

        return $this;
    }
    /**
     * Gets doctor.
     *
     * @return string
     */
    public function getDoctor()
    {
        return $this->doctor;
    }
    /**
     * Sets doctorePhone.
     *
     * @param string $doctorePhone
     *
     * @return $this
     */
    public function setDoctorePhone($doctorePhone)
    {
        $this->doctorePhone = $doctorePhone;

        return $this;
    }
    /**
     * Gets doctorePhone.
     *
     * @return string
     */
    public function getDoctorePhone()
    {
        return $this->doctorePhone;
    }
    /**
     * Sets comments.
     *
     * @param string $comments
     *
     * @return $this
     */
    public function setComments($comments)
    {
        $this->comments = $comments;

        return $this;
    }
    /**
     * Gets comments.
     *
     * @return string
     */
    public function getComments()
    {
        return $this->comments;
    }
    /**
     * Sets certificate.
     *
     * @param bool $certificate
     *
     * @return $this
     */
    public function setCertificate($certificate)
    {
        $this->certificate = $certificate;

        return $this;
    }
    /**
     * Gets certificate.
     *
     * @return bool
     */
    public function getCertificate()
    {
        return $this->certificate;
    }
    /**
     * Sets insuranceCertificate.
     *
     * @param bool $insuranceCertificate
     *
     * @return $this
     */
    public function setInsuranceCertificate($insuranceCertificate)
    {
        $this->insuranceCertificate = $insuranceCertificate;

        return $this;
    }
    /**
     * Gets insuranceCertificate.
     *
     * @return bool
     */
    public function getInsuranceCertificate()
    {
        return $this->insuranceCertificate;
    }
    /**
     * Set insuranceName
     *
     * @param string $insuranceName
     *
     * @return Medical
     */
    public function setInsuranceName($insuranceName)
    {
        $this->insuranceName = $insuranceName;

        return $this;
    }
    /**
     * Get insuranceName
     *
     * @return string
     */
    public function getInsuranceName()
    {
        return $this->insuranceName;
    }
    /**
     * Set insuranceNumber
     *
     * @param string $insuranceNumber
     *
     * @return Medical
     */
    public function setInsuranceNumber($insuranceNumber)
    {
        $this->insuranceNumber = $insuranceNumber;

        return $this;
    }
    /**
     * Get insuranceNumber
     *
     * @return string
     */
    public function getInsuranceNumber()
    {
        return $this->insuranceNumber;
    }
    /**
     * Get person
     * @return Person
     */
    public function getPerson()
    {
        return $this->person;
    }
    /**
     * Set healthPass
     *
     * @param boolean $healthPass
     *
     * @return Medical
     */
    public function setHealthPass($healthPass)
    {
        $this->healthPass = $healthPass;

        return $this;
    }
    /**
     * Get healthPass
     *
     * @return boolean
     */
    public function getHealthPass()
    {
        return $this->healthPass;
    }
}
