X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=src%2FEntity%2FLocalisation.php;h=6e86eba4caddb67373b45083e4ab3a5408240e62;hb=HEAD;hp=69431b97640b426183700232cd9f7bbc4a5f677d;hpb=dec6d0310680edbf06e4564590d6e4a3ffde8a6e;p=Project_proches_de_moi-server.git diff --git a/src/Entity/Localisation.php b/src/Entity/Localisation.php index 69431b9..6e86eba 100644 --- a/src/Entity/Localisation.php +++ b/src/Entity/Localisation.php @@ -2,37 +2,42 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; +use JMS\Serializer\Annotation as Serializer; /** * @ORM\Entity() * @ORM\Table(name="Localisation") + * @Serializer\ExclusionPolicy("all") */ class Localisation { /** * @ORM\Id * @ORM\Column(type="bigint") - * @ORM\GeneratedValue + * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** - * @ORM\ManyToOne(targetEntity="App\Entity\Person", cascade={"all"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Person") */ protected $person; /** * @ORM\Column(type="datetime") + * @Serializer\Expose */ protected $timestamp; /** * @ORM\Column(type="float") + * @Serializer\Expose */ protected $latitude; /** * @ORM\Column(type="float") + * @Serializer\Expose */ protected $longitude; @@ -67,6 +72,12 @@ class Localisation return $this; } + public function setPerson($person) + { + $this->person = $person; + return $this; + } + public function setTimestamp($timestamp) { $this->timestamp = $timestamp;