diff options
Diffstat (limited to 'src/model/CESU.php')
-rw-r--r-- | src/model/CESU.php | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/model/CESU.php b/src/model/CESU.php index 2be89c0..8771607 100644 --- a/src/model/CESU.php +++ b/src/model/CESU.php | |||
@@ -6,30 +6,24 @@ class CESU extends Model | |||
6 | //~ const TABLE = 'cesu'; | 6 | //~ const TABLE = 'cesu'; |
7 | 7 | ||
8 | // lecture des données ou hydratation | 8 | // lecture des données ou hydratation |
9 | private $ID_cesu; | 9 | protected $ID_presta; |
10 | private $taches; | 10 | protected $taches; |
11 | private $duree_travail; | 11 | protected $duree_travail; |
12 | private $salaire; | 12 | protected $salaire; |
13 | 13 | ||
14 | use ModelChildren; | 14 | //~ use ModelChildren; |
15 | 15 | ||
16 | public function __construct(int $client_ID) | 16 | public function __construct() |
17 | { | 17 | { |
18 | parent::__construct($client_ID); | 18 | $this->table = strtolower(__CLASS__); // cesu |
19 | $this->type == 'cesu'; | ||
20 | } | 19 | } |
21 | 20 | ||
22 | // setters | 21 | // setters |
23 | public function setIDCesu(int $value) | 22 | public function setIDPresta(int $value) |
24 | { | 23 | { |
25 | $this->ID_cesu = $value; | 24 | $this->ID_presta = $value; |
26 | return($this); | 25 | return($this); |
27 | } | 26 | } |
28 | //~ public function setIDPresta(int $value) | ||
29 | //~ { | ||
30 | //~ $this->ID_presta = $value; | ||
31 | //~ return($this); | ||
32 | //~ } | ||
33 | public function setTaches(string $value) | 27 | public function setTaches(string $value) |
34 | { | 28 | { |
35 | $this->taches = $value; | 29 | $this->taches = $value; |
@@ -40,9 +34,10 @@ class CESU extends Model | |||
40 | $this->duree_travail = $value; | 34 | $this->duree_travail = $value; |
41 | return($this); | 35 | return($this); |
42 | } | 36 | } |
43 | public function setSalaire(float $value) | 37 | public function setSalaire($value) |
44 | { | 38 | { |
45 | $this->salaire = $value; | 39 | $value = str_replace(',', '.', $value); |
40 | $this->salaire = (float) $value; | ||
46 | return($this); | 41 | return($this); |
47 | } | 42 | } |
48 | } | 43 | } |