<?php

namespace App\Entity;

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

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

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

    #[ORM\Column(type: Types::DATETIME_MUTABLE)]
    private ?\DateTimeInterface $date_add = null;

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

    
    public function __construct()
    {
        $this->date_add = new \DateTime();
    }

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

    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 getDateAdd(): ?\DateTimeInterface
    {
        return $this->date_add;
    }

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

        return $this;
    }

    public function getReservationService(): ?ReservationService
    {
        return $this->reservationService;
    }

    public function setReservationService(ReservationService $reservationService): static
    {
        $this->reservationService = $reservationService;

        return $this;
    }
}
