From de105843e355e7c3775597d81508b91f5783ffec Mon Sep 17 00:00:00 2001 From: clement <cmercier@etu.utc.fr> Date: Thu, 12 Jun 2014 12:05:24 +0200 Subject: [PATCH] corrections class --- class/animal.php | 2 +- class/employe.php | 21 +++++++--- class/espece.php | 2 +- class/facture.php | 2 +- class/ligneFacture.php | 57 +++++++++++++++++++++++--- class/ligneOrdonnance.php | 48 ++++++++++++++++++++++ class/ordonnance.php | 26 +++++++++++- class/prestation.php | 2 +- class/{consommable.php => produit.php} | 22 +++++----- class/race.php | 13 +++++- class/rdv.php | 20 ++++++++- class/veterinaire.php | 16 -------- 12 files changed, 185 insertions(+), 46 deletions(-) create mode 100644 class/ligneOrdonnance.php rename class/{consommable.php => produit.php} (53%) delete mode 100644 class/veterinaire.php diff --git a/class/animal.php b/class/animal.php index 72c20b1..532e31f 100644 --- a/class/animal.php +++ b/class/animal.php @@ -1,6 +1,6 @@ <?php -class Animal +class Animal extends Objet { private $nom; private $proprio; diff --git a/class/employe.php b/class/employe.php index c53f727..73c4837 100644 --- a/class/employe.php +++ b/class/employe.php @@ -2,15 +2,26 @@ class Employe extends Personne { - private $id; + private $idNational; + private $isVeterinaire; - public function id() + public function idNational() { - return $this->id; + return $this->idNational; } - public function setId($id) + public function setIdNational($idNational) { - $this->id = $id; + $this->idNational = $idNational; + } + + public function isVeterinaire() + { + return $this->isVeterinaire; + } + + public function setIsVeterinaire($isVeterinaire) + { + $this->isVeterinaire = $isVeterinaire; } } \ No newline at end of file diff --git a/class/espece.php b/class/espece.php index 9a02c89..af9a008 100644 --- a/class/espece.php +++ b/class/espece.php @@ -1,6 +1,6 @@ <?php -class Espece +class Espece extends Objet { private $nom; private $prix_consult; diff --git a/class/facture.php b/class/facture.php index 0ee0939..73fb316 100644 --- a/class/facture.php +++ b/class/facture.php @@ -1,6 +1,6 @@ <?php -class Facture +class Facture extends Objet { private $id; private $employe; diff --git a/class/ligneFacture.php b/class/ligneFacture.php index 9f2bc36..c2568dc 100644 --- a/class/ligneFacture.php +++ b/class/ligneFacture.php @@ -1,21 +1,66 @@ <?php -class LigneFacture +class LigneFacture extends Objet { - private $num; + private $id; + private $facture; + private $prestation; + private $ordonnance; + private $produit; private $quantite; private $remise; - public function num() + public function id() { - return $this->num; + return $this->id; } - public function setNum($num) + public function setId($id) { - $this->num = $num; + $this->id = $id; } + public function facture() + { + return $this->facture; + } + + public function setFacture($facture) + { + $this->facture = $facture; + } + + public function prestation() + { + return $this->prestation; + } + + public function setPrestation($prestation) + { + $this->prestation = $prestation; + } + + public function ordonnance() + { + return $this->ordonnance; + } + + public function setOrdonnance($ordonnance) + { + $this->ordonnance = $ordonnance; + } + + public function produit() + { + return $this->produit; + } + + public function setProduit($produit) + { + $this->produit = $produit; + } + + public function quantite() { return $this->quantite; diff --git a/class/ligneOrdonnance.php b/class/ligneOrdonnance.php new file mode 100644 index 0000000..3a0c3c8 --- /dev/null +++ b/class/ligneOrdonnance.php @@ -0,0 +1,48 @@ +<?php + +class LigneOrdonnance extends Objet +{ + private $ordonnance; + private $medicament; + private $quantite; + private $instruction; + + public function ordonnance() + { + return $this->ordonnance; + } + + public function setOrdonnance($ordonnance) + { + $this->ordonnance = $ordonnance; + } + + public function medicament() + { + return $this->medicament; + } + + public function setMedicament($medicament) + { + $this->medicament = $medicament; + } + + public function quantite() + { + return $this->quantite; + } + + public function setQuantite($quantite) + { + $this->quantite = $quantite; + } + + public function instruction() + { + return $this->instruction; + } + + public function setInstruction($instruction) + { + $this->instruction = $instruction; + } \ No newline at end of file diff --git a/class/ordonnance.php b/class/ordonnance.php index c624ba0..7c84e0c 100644 --- a/class/ordonnance.php +++ b/class/ordonnance.php @@ -1,9 +1,11 @@ <?php -class Ordonnance +class Ordonnance extends Objet { private $id; - private $date_edition; + private $veterinaire; + private $animal; + private $date; private $prix; public function id() @@ -26,6 +28,26 @@ class Ordonnance $this->date = $date; } + public function veterinaire() + { + return $this->veterinaire; + } + + public function setVeterinaire($veterinaire) + { + $this->veterinaire = $veterinaire; + } + + public function animal() + { + return $this->animal; + } + + public function setAnimal($animal) + { + $this->animal = $animal; + } + public function prix() { return $this->prix; diff --git a/class/prestation.php b/class/prestation.php index f0cc246..57f2672 100644 --- a/class/prestation.php +++ b/class/prestation.php @@ -1,6 +1,6 @@ <?php -class Prestation +class Prestation extends Objet { private $id; private $description; diff --git a/class/consommable.php b/class/produit.php similarity index 53% rename from class/consommable.php rename to class/produit.php index e4b7b59..b08ff42 100644 --- a/class/consommable.php +++ b/class/produit.php @@ -1,20 +1,20 @@ <?php -class Consommable +class Produit extends Objet { - private $ref; + private $id; private $nom; private $prix; - private $type; + private $isMedicament; - public function ref() + public function id() { - return $this->ref; + return $this->id; } - public function setRef($ref) + public function setId($id) { - $this->ref = $ref; + $this->id = $id; } public function nom() @@ -37,13 +37,13 @@ class Consommable $this->prix = $prix; } - public function type() + public function isMedicament() { - return $this->type; + return $this->isMedicament; } - public function setType($type) + public function setIsMedicament($isMedicament) { - $this->type = $type; + $this->isMedicament = $isMedicament; } } diff --git a/class/race.php b/class/race.php index 15e64c2..0718fcc 100644 --- a/class/race.php +++ b/class/race.php @@ -1,8 +1,9 @@ <?php -class Race +class Race extends Objet { private $nom; + private $espece; private $prix_intervention; public function nom() @@ -15,6 +16,16 @@ class Race $this->nom = $nom; } + public function espece() + { + return $this->espece; + } + + public function setEspece($espece) + { + $this->espece = $espece; + } + public function prix_consult() { return $this->prix_intervention; diff --git a/class/rdv.php b/class/rdv.php index 8fc6b44..1032ee8 100644 --- a/class/rdv.php +++ b/class/rdv.php @@ -1,8 +1,10 @@ <?php -class Rdv +class Rdv extends Objet { private $id; + private $veterinaire; + private $animal; private $date; private $duree; @@ -17,6 +19,22 @@ class Rdv $this->id = $id; } + + public function veterinaire() + { + return $this->veterinaire; + } + + public function setVeterinaire($veterinaire) + { + $this->veterinaire = $veterinaire; + } + + public function animal() + { + return $this->animal; + } + public function date() { return $this->date; diff --git a/class/veterinaire.php b/class/veterinaire.php deleted file mode 100644 index a59c817..0000000 --- a/class/veterinaire.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -class Veterinaire extends Employe -{ - private $idNational; - - public function idNational() - { - return $this->idNational; - } - - public function setIdNational($idNational) - { - $this->idNational = $idNational; - } -} \ No newline at end of file -- GitLab