From 4f14ddabc5402491d3e28af2eb2b858cf1ce6dc9 Mon Sep 17 00:00:00 2001
From: Tom Rouillon <tom.rouillon3@etu.univ-lorraine.fr>
Date: Wed, 17 Jan 2024 13:50:50 +0100
Subject: [PATCH] Update API

---
 Back_end/src/Entity/OrdreTournee.php | 18 +++++++++++++++++-
 Back_end/src/Entity/Tournee.php      | 15 ---------------
 README.md                            |  2 +-
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/Back_end/src/Entity/OrdreTournee.php b/Back_end/src/Entity/OrdreTournee.php
index 3e17af5..1e55894 100644
--- a/Back_end/src/Entity/OrdreTournee.php
+++ b/Back_end/src/Entity/OrdreTournee.php
@@ -16,10 +16,14 @@ class OrdreTournee
     #[ORM\Column]
     private ?int $numOrdre = null;
 
-    #[ORM\ManyToOne(inversedBy: 'test')]
+    #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: false)]
     private ?Tournee $tournee_id = null;
 
+    #[ORM\ManyToOne]
+    #[ORM\JoinColumn(nullable: false)]
+    private ?PointDeDepot $point_depot_id = null;
+
     public function getId(): ?int
     {
         return $this->id;
@@ -48,4 +52,16 @@ class OrdreTournee
 
         return $this;
     }
+
+    public function getPointDepotId(): ?PointDeDepot
+    {
+        return $this->point_depot_id;
+    }
+
+    public function setPointDepotId(?PointDeDepot $point_depot_id): static
+    {
+        $this->point_depot_id = $point_depot_id;
+
+        return $this;
+    }
 }
diff --git a/Back_end/src/Entity/Tournee.php b/Back_end/src/Entity/Tournee.php
index 3d1648c..506dc11 100644
--- a/Back_end/src/Entity/Tournee.php
+++ b/Back_end/src/Entity/Tournee.php
@@ -14,23 +14,8 @@ class Tournee
     #[ORM\Column]
     private ?int $id = null;
 
-    #[ORM\Column(type: Types::DATE_MUTABLE)]
-    private ?\DateTimeInterface $jourPreparation = null;
-
     public function getId(): ?int
     {
         return $this->id;
     }
-
-    public function getJourPreparation(): ?\DateTimeInterface
-    {
-        return $this->jourPreparation;
-    }
-
-    public function setJourPreparation(\DateTimeInterface $jourPreparation): static
-    {
-        $this->jourPreparation = $jourPreparation;
-
-        return $this;
-    }
 }
diff --git a/README.md b/README.md
index dfb4859..d9e3cac 100644
--- a/README.md
+++ b/README.md
@@ -13,4 +13,4 @@ Dans notre cas, nous avons choisi Symfony. Donc, nous avons besoin de 3 containe
 
 Un container adminer a été ajouté pour pouvoir gérer la base de données.
 
-Lien vers la documentation swagger de l'api : http://localhost:8080/api
\ No newline at end of file
+Lien vers la documentation swagger de l'api : http://localhost:8080/api, après avoir lancé le projet avec `docker-compose up -d`.
\ No newline at end of file
-- 
GitLab