summaryrefslogtreecommitdiff
path: root/src/model/entities/Log.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-05-29 11:21:15 +0200
committerpolo <ordipolo@gmx.fr>2025-05-29 11:21:15 +0200
commit03668b9bb9f224f6db985bc9980dc75fab2fa4d5 (patch)
tree7380b4e32a2608853982bef2a798a95a4c976ecf /src/model/entities/Log.php
parent8c663379dcb9859a060e07681cc9082c025cf203 (diff)
downloadcms-03668b9bb9f224f6db985bc9980dc75fab2fa4d5.zip
logs connexions
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}