<?php
declare(strict_types=1);
namespace App\Entity;
// CORRECCIÓN: Importar la clase correcta para que el constructor y getters la reconozcan
use App\MDS\VenuesBundle\Entity\Reservation;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="cotizacion_web_observations")
*/
class CotizacionWebObservations
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity="App\MDS\VenuesBundle\Entity\Reservation")
* @ORM\JoinColumn(name="reservation_id", referencedColumnName="id", onDelete="CASCADE")
*/
private Reservation $reservation; // Añadido tipado de propiedad nativo de PHP 7.4+
/**
* @ORM\Column(type="text")
*/
private string $observation;
/**
* @ORM\Column(type="datetime")
*/
private \DateTimeInterface $createdAt;
public function __construct(Reservation $reservation, string $observation)
{
$this->reservation = $reservation;
$this->observation = $observation;
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getReservation(): Reservation
{
return $this->reservation;
}
public function getObservation(): string
{
return $this->observation;
}
public function getCreatedAt(): \DateTimeInterface
{
return $this->createdAt;
}
}