<?php

namespace App\Entity;

use App\Repository\ReservationArticleValidationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: ReservationArticleValidationRepository::class)]
class ReservationArticleValidation
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\ManyToOne(inversedBy: 'reservationArticleValidations')]
    #[ORM\JoinColumn(nullable: false)]
    private ?Partenaire $partenaire = null;

    #[ORM\OneToOne(inversedBy: 'reservationArticleValidation', cascade: ['persist', 'remove'])]
    #[ORM\JoinColumn(nullable: false)]
    private ?ReservationArticle $reservationArticle = null;

    #[ORM\Column(type: Types::DATETIME_MUTABLE)]
    private ?\DateTimeInterface $date_add = null;
    
    
    public function __construct()
    {
        $this->date_add = new \DateTime();
    }

    public function getType(): string
    {
        return "ReservationArticleValidation";
    }

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

    public function getPartenaire(): ?Partenaire
    {
        return $this->partenaire;
    }

    public function setPartenaire(?Partenaire $partenaire): static
    {
        $this->partenaire = $partenaire;

        return $this;
    }

    public function getReservationArticle(): ?ReservationArticle
    {
        return $this->reservationArticle;
    }

    public function setReservationArticle(ReservationArticle $reservationArticle): static
    {
        $this->reservationArticle = $reservationArticle;

        return $this;
    }

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

    public function setDateAdd(\DateTimeInterface $date_add): static
    {
        $this->date_add = $date_add;

        return $this;
    }
}
