diff options
| author | polo <ordipolo@gmx.fr> | 2026-10-17 17:41:12 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-10-17 17:41:12 +0200 |
| commit | 05af2b8b663badcccaef3c4f26a13842f94750d0 (patch) | |
| tree | aac213676e981093b541de237fa5e9b57c5d9d8b | |
| parent | f9fae65994b4be2c7f30341053ffd687a0696ff6 (diff) | |
| download | AppliGestionPHP-05af2b8b663badcccaef3c4f26a13842f94750d0.tar.gz AppliGestionPHP-05af2b8b663badcccaef3c4f26a13842f94750d0.tar.bz2 AppliGestionPHP-05af2b8b663badcccaef3c4f26a13842f94750d0.zip | |
retypage date prestations en string 1
| -rw-r--r-- | src/model/entities/Prestation.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/model/entities/Prestation.php b/src/model/entities/Prestation.php index e7abd8b..9628afc 100644 --- a/src/model/entities/Prestation.php +++ b/src/model/entities/Prestation.php | |||
| @@ -19,8 +19,16 @@ class Prestation | |||
| 19 | 19 | ||
| 20 | #[ORM\Column] | 20 | #[ORM\Column] |
| 21 | private string $code_presta; | 21 | private string $code_presta; |
| 22 | |||
| 22 | #[ORM\Column] | 23 | #[ORM\Column] |
| 23 | private int $date; // timestamp unix | 24 | private int $date; // timestamp unix |
| 25 | |||
| 26 | // ajouter attrinut ", nullable: true" | ||
| 27 | // remplissage: UPDATE prestations SET date_new = strftime('%Y-%m-%d', date, 'unixepoch'); | ||
| 28 | // ensuite remettre NOT NULL | ||
| 29 | #[ORM\Column(type: 'string', length: 10)] // format 'aaaa-mm-jj' | ||
| 30 | private string $date_new; | ||
| 31 | |||
| 24 | #[ORM\Column] | 32 | #[ORM\Column] |
| 25 | private string $type_presta; | 33 | private string $type_presta; |
| 26 | #[ORM\Column] | 34 | #[ORM\Column] |
| @@ -77,7 +85,7 @@ class Prestation | |||
| 77 | 85 | ||
| 78 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) | 86 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) |
| 79 | { | 87 | { |
| 80 | $code_presta_tableau = explode('-', $this->code_presta); | 88 | //$code_presta_tableau = explode('-', $this->code_presta); |
| 81 | $Date = new Dates($this->date); | 89 | $Date = new Dates($this->date); |
| 82 | 90 | ||
| 83 | return [ | 91 | return [ |
