aboutsummaryrefslogtreecommitdiff
path: root/src/model/entities/Log.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-23 00:47:32 +0200
committerpolo <ordipolo@gmx.fr>2026-10-23 00:47:32 +0200
commitf27cca08ff786ceff1870147f6d6bad14d71117f (patch)
treed36597a72025313d6faf4ed228755fa267ebe2f6 /src/model/entities/Log.php
parentc7309f900ef05bd5cb313110ec159b761af394ec (diff)
downloadcms-f27cca08ff786ceff1870147f6d6bad14d71117f.tar.gz
cms-f27cca08ff786ceff1870147f6d6bad14d71117f.tar.bz2
cms-f27cca08ff786ceff1870147f6d6bad14d71117f.zip
dossiers avec majuscule, namespace pour toutes les classes, autoload psr-4, UserDataService::createZip déplacé dans Backup
Diffstat (limited to 'src/model/entities/Log.php')
-rw-r--r--src/model/entities/Log.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/model/entities/Log.php b/src/model/entities/Log.php
deleted file mode 100644
index 222b8db..0000000
--- a/src/model/entities/Log.php
+++ /dev/null
@@ -1,38 +0,0 @@
1<?php
2// src/model/entities/Log.php
3
4declare(strict_types=1);
5
6namespace App\Entity;
7
8use Doctrine\ORM\Mapping as ORM;
9
10#[ORM\Entity]
11#[ORM\Table(name: TABLE_PREFIX . "log")]
12class Log
13{
14 #[ORM\Id]
15 #[ORM\GeneratedValue]
16 #[ORM\Column(type: "integer")]
17 private int $id_log;
18
19 #[ORM\Column(type: 'datetime', options: ['default' => 'CURRENT_TIMESTAMP'])] // CURRENT_TIMESTAMP "inutile", date générée par PHP
20 private \DateTime $date_time; // type datetime de doctrine <=> type \DateTime de PHP
21
22 #[ORM\Column(type: "boolean")]
23 private bool $success;
24
25 public function __construct(bool $success){
26 $this->date_time = new \DateTime;
27 $this->success = $success;
28 }
29
30 public function getFormatedDate(): string
31 {
32 return $this->date_time->format('d/m/Y à H\hi');
33 }
34 public function getSuccess(): bool
35 {
36 return $this->success;
37 }
38}