<?php

namespace App\Entity;

use App\Repository\AgentRestrictionRepository;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=AgentRestrictionRepository::class)
 * @ORM\Table(schema="sav")
 */
class AgentRestriction
{

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="agentRestrictions")
     * @ORM\JoinColumn(nullable=false, name="idutilisateur_agent")
     */
    private $utilisateur_agent;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=TypePlanification::class, inversedBy="agentRestrictions")
     * @ORM\JoinColumn(nullable=false, name="idtype_planification")
     */
    private $type_planification;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $date_debut;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $date_fin;

    /**
     * @ORM\Column(type="text")
     */
    private $motif;

    public function getUtilisateurAgent(): ?Utilisateur
    {
        return $this->utilisateur_agent;
    }

    public function setUtilisateurAgent(?Utilisateur $utilisateur_agent): self
    {
        $this->utilisateur_agent = $utilisateur_agent;

        return $this;
    }

    public function getTypePlanification(): ?TypePlanification
    {
        return $this->type_planification;
    }

    public function setTypePlanification(?TypePlanification $type_planification): self
    {
        $this->type_planification = $type_planification;

        return $this;
    }

    public function getDateDebut(): ?\DateTimeInterface
    {
        return $this->date_debut;
    }

    public function setDateDebut(?\DateTimeInterface $date_debut): self
    {
        $this->date_debut = $date_debut;

        return $this;
    }

    public function getDateFin(): ?\DateTimeInterface
    {
        return $this->date_fin;
    }

    public function setDateFin(?\DateTimeInterface $date_fin): self
    {
        $this->date_fin = $date_fin;

        return $this;
    }

    public function getMotif(): ?string
    {
        return $this->motif;
    }

    public function setMotif(string $motif): self
    {
        $this->motif = $motif;

        return $this;
    }
}
