blob: 149c1f1507013395ef6922b6d6afa86a29930b2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<?php
// model/Locations.php
class Locations extends Model
{
// lecture des données ou hydratation
protected $ID_presta;
protected $designation;
protected $modele_description;
protected $valeur;
protected $etat_des_lieux_debut;
protected $etat_des_lieux_fin;
protected $duree_location;
protected $loyer_mensuel;
protected $loyers_payes;
protected $caution;
//~ use ModelChildren;
public function __construct()
{
$this->table = strtolower(__CLASS__); // locations
}
// setters
public function setIDPresta(int $value)
{
$this->ID_presta = $value;
return($this);
}
public function setDesignation(string $value)
{
$this->designation = $value;
return($this);
}
public function setModeleDescription(string $value)
{
$this->modele_description = $value;
return($this);
}
public function setValeur($value)
{
$value = str_replace(',', '.', $value);
$this->valeur = (float) $value;
return($this);
}
public function setEtatDesLieuxDebut(string $value)
{
$this->etat_des_lieux_debut = $value;
return($this);
}
public function setEtatDesLieuxFin(string $value)
{
$this->etat_des_lieux_fin = $value;
return($this);
}
public function setDureeLocation(string $value)
{
$this->duree_location = $value;
return($this);
}
public function setLoyerMensuel($value)
{
$value = str_replace(',', '.', $value);
$this->loyer_mensuel = (float) $value;
return($this);
}
public function setLoyersPayes($value)
{
$value = str_replace(',', '.', $value);
$this->loyers_payes = (float) $value;
return($this);
}
public function setCaution($value)
{
$value = str_replace(',', '.', $value);
$this->caution = (float) $value;
return($this);
}
}
|