From e93cd6c352a8e4fbb4e1174bdb15484adbe4c0f7 Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 26 Sep 2025 12:04:02 +0200 Subject: suppression table Presentation --- src/model/entities/Log.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/model/entities/Log.php') diff --git a/src/model/entities/Log.php b/src/model/entities/Log.php index 39b4307..eeb76e4 100644 --- a/src/model/entities/Log.php +++ b/src/model/entities/Log.php @@ -16,15 +16,14 @@ class Log #[ORM\Column(type: "integer")] private int $id_log; - #[ORM\Column(type: 'datetime', options: ['default' => 'CURRENT_TIMESTAMP'])] - //#[ORM\Column(type: 'datetime', columnDefinition: "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")] - private ?\DateTime $date_time ; // le type datetime de doctrine convertit en type \DateTime de PHP + #[ORM\Column(type: 'datetime', options: ['default' => 'CURRENT_TIMESTAMP'])] // CURRENT_TIMESTAMP "inutile", date générée par PHP + private \DateTime $date_time; // type datetime de doctrine <=> type \DateTime de PHP #[ORM\Column(type: "boolean")] private bool $success; public function __construct(bool $success){ - $this->date_time = new \DateTime(); + $this->date_time = new \DateTime; $this->success = $success; } } -- cgit v1.2.3