summaryrefslogtreecommitdiff
path: root/src/model/Locations.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/Locations.php')
-rw-r--r--src/model/Locations.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/model/Locations.php b/src/model/Locations.php
index b669e7c..e3c9507 100644
--- a/src/model/Locations.php
+++ b/src/model/Locations.php
@@ -4,6 +4,7 @@
4class Locations extends Model 4class Locations extends Model
5{ 5{
6 // lecture des données ou hydratation 6 // lecture des données ou hydratation
7 protected $ID;
7 protected $ID_presta; 8 protected $ID_presta;
8 protected $designation; 9 protected $designation;
9 protected $modele_description; 10 protected $modele_description;
@@ -15,13 +16,26 @@ class Locations extends Model
15 protected $loyers_payes; 16 protected $loyers_payes;
16 protected $caution; 17 protected $caution;
17 18
18 //~ use ModelChildren;
19
20 public function __construct() 19 public function __construct()
21 { 20 {
22 $this->table = strtolower(__CLASS__); // locations 21 $this->table = strtolower(__CLASS__); // locations
23 } 22 }
24 23
24 public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this)
25 {
26 return [
27 "Numéro location:" => $this->ID,
28 "Désignation:" => $this->designation,
29 "Description du modèle:" => $this->modele_description,
30 "Valeur:" => $this->valeur,
31 "État des lieux de début:" => $this->etat_des_lieux_debut,
32 "État des lieux de fin:" => $this->etat_des_lieux_fin,
33 "Durée de la location:" => $this->duree_location,
34 "Loyer Mensuel" => $this->loyer_mensuel,
35 "Loyers Payés" => $this->loyers_payes,
36 "Caution" => $this->caution];
37 }
38
25 // setters 39 // setters
26 public function setIDPresta(int $value) 40 public function setIDPresta(int $value)
27 { 41 {