diff options
| author | polo <ordipolo@gmx.fr> | 2025-07-08 16:30:10 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-07-08 16:30:10 +0200 |
| commit | 4accca2c57b5f12169afe6a75c74efadd86d835d (patch) | |
| tree | b0b7b821956144e5edc75471302b7624eabde3df /src/model/entities/Prestation.php | |
| parent | 08145a5055c3f3f1d003ece3e0515da0be9a7279 (diff) | |
| download | AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.tar.gz AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.tar.bz2 AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.zip | |
accès instances depuis Prestation
Diffstat (limited to 'src/model/entities/Prestation.php')
| -rw-r--r-- | src/model/entities/Prestation.php | 31 |
1 files changed, 31 insertions, 0 deletions
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 | |||
| 27 | private string $mode_paiement = ''; // non renseigné quand on fait un devis | 27 | private string $mode_paiement = ''; // non renseigné quand on fait un devis |
| 28 | #[ORM\Column] | 28 | #[ORM\Column] |
| 29 | private string $commentaires; | 29 | private string $commentaires; |
| 30 | |||
| 31 | #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Facture::class)] | ||
| 32 | private ?facture $facture = null; | ||
| 33 | #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Devis::class)] | ||
| 34 | private ?devis $devis; | ||
| 35 | #[ORM\OneToOne(mappedBy: 'presta', targetEntity: CESU::class)] | ||
| 36 | private ?cesu $cesu; | ||
| 37 | #[ORM\OneToOne(mappedBy: 'presta', targetEntity: Location::class)] | ||
| 38 | private ?location $location; | ||
| 30 | 39 | ||
| 31 | public static EntityManager $entityManager; | 40 | public static EntityManager $entityManager; |
| 32 | 41 | ||
| @@ -56,6 +65,10 @@ class Prestation | |||
| 56 | { | 65 | { |
| 57 | return $this->type_presta; | 66 | return $this->type_presta; |
| 58 | } | 67 | } |
| 68 | public function getModePaiement(): string | ||
| 69 | { | ||
| 70 | return $this->mode_paiement; | ||
| 71 | } | ||
| 59 | public function getClient(): Client | 72 | public function getClient(): Client |
| 60 | { | 73 | { |
| 61 | return $this->client; | 74 | return $this->client; |
| @@ -79,6 +92,24 @@ class Prestation | |||
| 79 | "Commentaires:" => $this->commentaires]; | 92 | "Commentaires:" => $this->commentaires]; |
| 80 | } | 93 | } |
| 81 | 94 | ||
| 95 | // une interface pour ça c'est bien aussi non? | ||
| 96 | public function getFacture(): ?Facture | ||
| 97 | { | ||
| 98 | return $this->facture; | ||
| 99 | } | ||
| 100 | public function getDevis(): ?Devis | ||
| 101 | { | ||
| 102 | return $this->devis; | ||
| 103 | } | ||
| 104 | public function getCesu(): ?CESU | ||
| 105 | { | ||
| 106 | return $this->cesu; | ||
| 107 | } | ||
| 108 | public function getLocation(): ?Location | ||
| 109 | { | ||
| 110 | return $this->location; | ||
| 111 | } | ||
| 112 | |||
| 82 | // setters | 113 | // setters |
| 83 | //~ public function setCodePresta(string $value) | 114 | //~ public function setCodePresta(string $value) |
| 84 | //~ { | 115 | //~ { |
