X-Git-Url: https://git.piment-noir.org/?p=Project_proches_de_moi-server.git;a=blobdiff_plain;f=src%2FEntity%2FPerson.php;fp=src%2FEntity%2FPerson.php;h=d06f5756f9ce2a8ce1b2e981ae1b01e0e92d397c;hp=d401cc32432f16311220f818c8a775440b4729dc;hb=84fd6c7fa765874e478ad7f92e356e88b3ff962c;hpb=1faa29dccd972e343ecbdc462238702c881493fd diff --git a/src/Entity/Person.php b/src/Entity/Person.php index d401cc3..d06f575 100644 --- a/src/Entity/Person.php +++ b/src/Entity/Person.php @@ -3,11 +3,13 @@ namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; +use JMS\Serializer\Annotation as Serializer; /** * @ORM\Entity() * @ORM\Table(name="Person", indexes={@ORM\Index(name="authentification_idx", columns={"email", "password"}), * @ORM\Index(name="search_idx", columns={"firstname", "lastname", "email"})}); + * @Serializer\ExclusionPolicy("all") */ class Person { @@ -15,21 +17,25 @@ class Person * @ORM\Id * @ORM\Column(type="bigint") * @ORM\GeneratedValue(strategy="AUTO") + * @Serializer\Expose */ protected $id; /** * @ORM\Column(type="string") + * @Serializer\Expose */ protected $firstname; /** * @ORM\Column(type="string") + * @Serializer\Expose */ protected $lastname; /** * @ORM\Column(type="string", unique=true) + * @Serializer\Expose */ protected $email; @@ -40,6 +46,7 @@ class Person /** * @ORM\Column(type="boolean", options={"default":false}) + * @Serializer\Expose */ protected $online;