repositories
/
Project_proches_de_moi-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update symfony dependencies.
[Project_proches_de_moi-server.git]
/
src
/
Entity
/
Person.php
diff --git
a/src/Entity/Person.php
b/src/Entity/Person.php
index d1c7886bf2dfab2cda322d0a2d35322077b85465..62cb46b3a446ccb2cf0648191b7107faeada4fa7 100644
(file)
--- 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 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\Entity()
* @ORM\Table(name="Person", indexes={@ORM\Index(name="authentification_idx", columns={"email", "password"}),
- * @ORM\Index(name="search_idx", columns={"firstname", "lastname"})});
+ * @ORM\Index(name="search_idx", columns={"firstname", "lastname", "email"})});
+ * @Serializer\ExclusionPolicy("all")
*/
class Person
{
*/
class Person
{
@@
-15,21
+17,25
@@
class Person
* @ORM\Id
* @ORM\Column(type="bigint")
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Id
* @ORM\Column(type="bigint")
* @ORM\GeneratedValue(strategy="AUTO")
+ * @Serializer\Expose
*/
protected $id;
/**
* @ORM\Column(type="string")
*/
protected $id;
/**
* @ORM\Column(type="string")
+ * @Serializer\Expose
*/
protected $firstname;
/**
* @ORM\Column(type="string")
*/
protected $firstname;
/**
* @ORM\Column(type="string")
+ * @Serializer\Expose
*/
protected $lastname;
/**
* @ORM\Column(type="string", unique=true)
*/
protected $lastname;
/**
* @ORM\Column(type="string", unique=true)
+ * @Serializer\Expose
*/
protected $email;
*/
protected $email;
@@
-40,18
+46,19
@@
class Person
/**
* @ORM\Column(type="boolean", options={"default":false})
/**
* @ORM\Column(type="boolean", options={"default":false})
+ * @Serializer\Expose
*/
protected $online;
/**
* One person have many friends
*/
protected $online;
/**
* One person have many friends
- * @ORM\OneToMany(targetEntity="App\Entity\Friendship", mappedBy="person"
, cascade={"all"}
)
+ * @ORM\OneToMany(targetEntity="App\Entity\Friendship", mappedBy="person")
*/
protected $friends;
/**
* One person have many friends
*/
protected $friends;
/**
* One person have many friends
- * @ORM\OneToMany(targetEntity="App\Entity\Friendship", mappedBy="friend"
, cascade={"all"}
)
+ * @ORM\OneToMany(targetEntity="App\Entity\Friendship", mappedBy="friend")
*/
protected $friends_with_me;
*/
protected $friends_with_me;