<?phpnamespace App\Entity\Main;use App\Repository\HistoryRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=HistoryRepository::class) */class History{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @var Reservation * @ORM\ManyToOne(targetEntity="App\Entity\Main\Reservation", inversedBy="historyResa") */ private $reservation; /** * @ORM\Column(type="integer", nullable=false) */ private $customer_id; /** * @var Customer */ private $customer; /** * @ORM\Column(type="datetime") */ private $date; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $information; /** * @ORM\Column(type="float") */ private $mouvement; /** * Constructor */ public function __construct() { $dateTimeZone = new \DateTimeZone('Europe/Paris'); $this->date = new \DateTime('now', $dateTimeZone); } public function __toString() { return (string) $this->information; } public function getId(): ?int { return $this->id; } public function getReservation() { return $this->reservation; } public function setReservation(\App\Entity\Main\Reservation $reservation): self { $this->reservation = $reservation; return $this; } public function getCustomerId() { return $this->customer_id; } public function setCustomerId(?int $customer_id): self { $this->customer_id = $customer_id; return $this; } public function getCustomer(): ?int { return $this->customer; } public function setCustomer(\App\Entity\Customer\Customer $customer): self { $this->customer = $customer; return $this; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getInformation(): ?string { return $this->information; } public function setInformation(?string $information): self { $this->information = $information; return $this; } public function getMouvement(): ?float { return $this->mouvement; } public function setMouvement(float $mouvement): self { $this->mouvement = $mouvement; return $this; }}