<?php

namespace AppBundle\Entity\AccessAndFunction;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;

/**
 * Enum des fonctions que peuvent occuper un Access au sein d'une Organization
 */
#[ORM\Entity]
class FunctionType
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['functiontype'])]
    private $id;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: false)]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\TypeFunctionEnum', 'toArray'])]
    #[Groups(['functiontype', 'access_details_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction'])]
    private $functionType;
    /**
     * @var string
     *
     *
     */
    #[ORM\Column(type: 'string', nullable: false)]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\FunctionEnum', 'toArray'])]
    #[Groups(['functiontype', 'access_details_organizationfunction', 'adherent_list_organizationfunction', 'personnels_list_organizationfunction', 'othercontact_list_organizationfunction', 'ca_list_organizationfunction', 'accesses_list_organizationfunction', 'board_list_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction', 'adherent_contact_organizationfunction', 'cotisation_responsibles_accesses_organizationfunction', 'networkmanagers_list_organizationfunction', 'online_registration_access_details_organizationfunction', 'accesscmfnetwork_organizationfunction'])]
    private $mission;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: false)]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\RoleEnum', 'toArray'])]
    private $roleByDefault;
    public function __construct()
    {

    }
    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * @param int $id
     * @return FunctionType
     */
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }
    /**
     * @return string
     */
    public function getFunctionType()
    {
        return $this->functionType;
    }
    /**
     * @param string $functionType
     * @return $this
     */
    public function setFunctionType($functionType)
    {
        $this->functionType = $functionType;
        return $this;
    }
    /**
     * @return string
     */
    public function getMission()
    {
        return $this->mission;
    }
    /**
     * @param string $mission
     * @return $this
     */
    public function setMission($mission)
    {
        $this->mission = $mission;
        return $this;
    }
    /**
     * @return string
     */
    public function getRoleByDefault()
    {
        return $this->roleByDefault;
    }
    /**
     * @param string $roleByDefault
     * @return $this
     */
    public function setRoleByDefault($roleByDefault)
    {
        $this->roleByDefault = $roleByDefault;
        return $this;
    }
}
