<?php

namespace AppBundle\Entity\AccessAndFunction;

use AppBundle\Entity\AccessAndFunction\Access;
use Doctrine\Common\Collections\ArrayCollection;
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;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use AppBundle\Validator\Constraints\Access as OpentalentAssert;

/**
 * Caractéristiques socio-professionnelles pour un Access
 *
 * @Iri("http://schema.org/AccessSocial")
 */
#[ORM\Entity]
class AccessSocial
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['accesssocial', 'access_mass', 'teachers_list', 'personnels_list', 'access_details', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list', 'fusion_accesses'])]
    private $id;
    /**
     * @var Access
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessSocial', cascade: ['persist'], fetch: 'EAGER')]
    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
    #[Groups(['accesssocial'])]
    private $access;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\ProfessionalStatusEnum', 'toArray'])]
    #[Groups(['accesssocial', 'access_details_accesssocial', 'access_mass_accesssocial', 'fusion_accesses_accesssocial'])]
    private $professionalStatus;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\TypeOfContractEnum', 'toArray'])]
    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'access_mass_accesssocial', 'personnels_list_accesssocial', 'access_details_accesssocial', 'personnels_list_accesssocial', 'fusion_accesses_accesssocial'])]
    private $typeOfContract;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    private $assistedContract;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\PeriodUnitEnum', 'toArray'])]
    #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'fusion_accesses_accesssocial'])]
    private $periodUnit;
    /**
     * @var string
     *
     * @OpentalentAssert\SocialSecurity
     */
    #[ORM\Column(type: 'string', length: 15, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial', 'fusion_accesses_accesssocial'])]
    private $socialSecurity;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\FamilySituationEnum', 'toArray'])]
    #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial', 'fusion_accesses_accesssocial'])]
    private $familySituation;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 15, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial'])]
    private $dependentChildren;
    /**
     * @var string
     *
     * @OpentalentAssert\RecipientNumber
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial'])]
    private $recipientNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true, length: 20)]
    #[Assert\Type(type: 'string')]
    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
    private $salaryNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true, length: 30)]
    #[Assert\Type(type: 'string')]
    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
    private $attachmentService;
    /**
     * The constructor
     */
    public function __construct() {

    }
    /**
     * 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 expertLevel.
     *
     * @param string $expertLevel
     *
     * @return $this
     */
    public function setExpertLevel($expertLevel)
    {
        $this->expertLevel = $expertLevel;

        return $this;
    }
    /**
     * Gets expertLevel.
     *
     * @return string
     */
    public function getExpertLevel()
    {
        return $this->expertLevel;
    }
    /**
     * Sets professionalStatus.
     *
     * @param string $professionalStatus
     *
     * @return $this
     */
    public function setProfessionalStatus($professionalStatus)
    {
        $this->professionalStatus = $professionalStatus;

        return $this;
    }
    /**
     * Gets professionalStatus.
     *
     * @return string
     */
    public function getProfessionalStatus()
    {
        return $this->professionalStatus;
    }
    /**
     * Sets typeOfContract.
     *
     * @param string $typeOfContract
     *
     * @return $this
     */
    public function setTypeOfContract($typeOfContract)
    {
        $this->typeOfContract = $typeOfContract;

        return $this;
    }
    /**
     * Gets typeOfContract.
     *
     * @return string
     */
    public function getTypeOfContract()
    {
        return $this->typeOfContract;
    }
    /**
     * Sets assistedContract.
     *
     * @param string $assistedContract
     *
     * @return $this
     */
    public function setAssistedContract($assistedContract)
    {
        $this->assistedContract = $assistedContract;

        return $this;
    }
    /**
     * Gets assistedContract.
     *
     * @return string
     */
    public function getAssistedContract()
    {
        return $this->assistedContract;
    }
    /**
     * Sets periodUnit.
     *
     * @param string $periodUnit
     *
     * @return $this
     */
    public function setPeriodUnit($periodUnit)
    {
        $this->periodUnit = $periodUnit;

        return $this;
    }
    /**
     * Gets periodUnit.
     *
     * @return string
     */
    public function getPeriodUnit()
    {
        return $this->periodUnit;
    }
    /**
     * Sets socialSecurity.
     *
     * @param string $socialSecurity
     *
     * @return $this
     */
    public function setSocialSecurity($socialSecurity)
    {
        $this->socialSecurity = $socialSecurity;

        return $this;
    }
    /**
     * Gets socialSecurity.
     *
     * @return string
     */
    public function getSocialSecurity()
    {
        return $this->socialSecurity;
    }
    /**
     * Sets familySituation.
     *
     * @param string $familySituation
     *
     * @return $this
     */
    public function setFamilySituation($familySituation)
    {
        $this->familySituation = $familySituation;

        return $this;
    }
    /**
     * Gets familySituation.
     *
     * @return string
     */
    public function getFamilySituation()
    {
        return $this->familySituation;
    }
    /**
     * Sets dependentChildren.
     *
     * @param string $dependentChildren
     *
     * @return $this
     */
    public function setDependentChildren($dependentChildren)
    {
        $this->dependentChildren = $dependentChildren;

        return $this;
    }
    /**
     * Gets dependentChildren.
     *
     * @return string
     */
    public function getDependentChildren()
    {
        return $this->dependentChildren;
    }
    /**
     * Set access
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $access
     *
     * @return AccessSocial
     */
    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
    {
        $this->access = $access;

        return $this;
    }
    /**
     * Get access
     *
     * @return \AppBundle\Entity\AccessAndFunction\Access
     */
    public function getAccess()
    {
        return $this->access;
    }
    /**
     * Set recipientNumber
     *
     * @param string $recipientNumber
     *
     * @return AccessSocial
     */
    public function setRecipientNumber($recipientNumber)
    {
        $this->recipientNumber = $recipientNumber;

        return $this;
    }
    /**
     * Get recipientNumber
     *
     * @return string
     */
    public function getRecipientNumber()
    {
        return $this->recipientNumber;
    }
    /**
     * @return string
     */
    public function getSalaryNumber()
    {
        return $this->salaryNumber;
    }
    /**
     * @param $salaryNumber
     */
    public function setSalaryNumber($salaryNumber)
    {
        $this->salaryNumber = $salaryNumber;
        return $this;
    }
    /**
     * @return string
     */
    public function getAttachmentService()
    {
        return $this->attachmentService;
    }
    /**
     * @param $attachmentService
     */
    public function setAttachmentService($attachmentService)
    {
        $this->attachmentService = $attachmentService;
        return $this;
    }
}
