a069bceca52184cd28ee1a3b6418f47fe2721db9
[Project_proches_de_moi-server.git] / src / Entity / Friendship.php
1 <?php
2 namespace App\Entity;
3
4 use Doctrine\ORM\Mapping as ORM;
5
6 /**
7 * @ORM\Entity()
8 * @ORM\Table(name="Friendship");
9 */
10 class Friendship
11 {
12 /**
13 * @ORM\Id
14 * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends", cascade={"all"})
15 */
16 protected $person;
17
18 /**
19 * @ORM\Id
20 * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends_with_me", cascade={"all"})
21 */
22 protected $friend;
23
24 /**
25 * @ORM\Column(type="boolean", options={"default":false})
26 */
27 protected $is_valid;
28
29 public function getPerson() {
30 return $this->person;
31 }
32
33 public function setPerson($person) {
34 $this->person = $person;
35 return $this;
36 }
37
38 public function getFriend() {
39 return $this->friend;
40 }
41
42 public function setFriend($friend) {
43 $this->friend = $friend;
44 return $this;
45 }
46
47 public function getIsValid() {
48 return $this->is_valid;
49 }
50
51 public function setIsValid($is_valid) {
52 $this->is_valid = $is_valid;
53 return $this;
54 }
55 }