summaryrefslogtreecommitdiff
path: root/src/model/entities/Log.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/entities/Log.php')
-rw-r--r--src/model/entities/Log.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/model/entities/Log.php b/src/model/entities/Log.php
new file mode 100644
index 0000000..7c2caa9
--- /dev/null
+++ b/src/model/entities/Log.php
@@ -0,0 +1,28 @@
1<?php
2// src/model/entities/Log.php
3
4declare(strict_types=1);
5
6namespace App\Entity;
7
8use Doctrine\ORM\Mapping as ORM;
9use Doctrine\Common\Collections\ArrayCollection;
10use Doctrine\Common\Collections\Collection;
11
12#[ORM\Entity]
13#[ORM\Table(name: TABLE_PREFIX . "log")]
14class Log
15{
16 #[ORM\Id]
17 #[ORM\GeneratedValue]
18 #[ORM\Column(type: "integer")]
19 private int $id_log;
20
21 #[ORM\Column(type: 'datetime', options: ['default' => 'CURRENT_TIMESTAMP'])]
22 //#[ORM\Column(type: 'datetime', columnDefinition: "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")]
23 private ?\DateTime $date_time ; // le type datetime de doctrine convertit en type \DateTime de PHP
24
25 public function __construct(){
26 $this->date_time = new \DateTime();
27 }
28}