<?php

declare(strict_types=1);

namespace App\Entity\Access;

use ApiPlatform\Metadata\ApiResource;
use App\Enum\Access\FunctionEnum;
use App\Enum\Access\RoleEnum;
use App\Enum\Access\TypeFunctionEnum;
use App\Repository\Access\FunctionTypeRepository;
// use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;

/**
 * Enum des fonctions que peuvent occuper un Access au sein d'une Organization.
 */
// #[Auditable]
#[ApiResource(operations: [])]
#[ORM\Entity(repositoryClass: FunctionTypeRepository::class)]
class FunctionType
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\Column(length: 50, enumType: TypeFunctionEnum::class)]
    private TypeFunctionEnum $functionType;

    #[ORM\Column(length: 50, enumType: FunctionEnum::class)]
    private FunctionEnum $mission;

    #[ORM\Column(length: 50, enumType: RoleEnum::class)]
    private RoleEnum $roleByDefault;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getFunctionType(): TypeFunctionEnum
    {
        return $this->functionType;
    }

    public function setFunctionType(TypeFunctionEnum $functionType): self
    {
        $this->functionType = $functionType;

        return $this;
    }

    public function getMission(): FunctionEnum
    {
        return $this->mission;
    }

    public function setMission(FunctionEnum $mission): self
    {
        $this->mission = $mission;

        return $this;
    }

    public function getRoleByDefault(): RoleEnum
    {
        return $this->roleByDefault;
    }

    public function setRoleByDefault(RoleEnum $roleByDefault): self
    {
        $this->roleByDefault = $roleByDefault;

        return $this;
    }
}
