From 4accca2c57b5f12169afe6a75c74efadd86d835d Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 8 Jul 2025 16:30:10 +0200 Subject: =?UTF-8?q?acc=C3=A8s=20instances=20depuis=20Prestation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Prestation.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/model/entities/Prestation.php') diff --git a/src/model/entities/Prestation.php b/src/model/entities/Prestation.php index 6d014d8..ce98911 100644 --- a/src/model/entities/Prestation.php +++ b/src/model/entities/Prestation.php @@ -27,6 +27,15 @@ class Prestation private string $mode_paiement = ''; // non renseigné quand on fait un devis #[ORM\Column] private string $commentaires; + + #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Facture::class)] + private ?facture $facture = null; + #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Devis::class)] + private ?devis $devis; + #[ORM\OneToOne(mappedBy: 'presta', targetEntity: CESU::class)] + private ?cesu $cesu; + #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Location::class)] + private ?location $location; public static EntityManager $entityManager; @@ -56,6 +65,10 @@ class Prestation { return $this->type_presta; } + public function getModePaiement(): string + { + return $this->mode_paiement; + } public function getClient(): Client { return $this->client; @@ -79,6 +92,24 @@ class Prestation "Commentaires:" => $this->commentaires]; } + // une interface pour ça c'est bien aussi non? + public function getFacture(): ?Facture + { + return $this->facture; + } + public function getDevis(): ?Devis + { + return $this->devis; + } + public function getCesu(): ?CESU + { + return $this->cesu; + } + public function getLocation(): ?Location + { + return $this->location; + } + // setters //~ public function setCodePresta(string $value) //~ { -- cgit v1.2.3