ClubUser::setUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace KI\UserBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as JMS;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * @ORM\Entity(repositoryClass="KI\UserBundle\Repository\ClubUserRepository")
11
 * @JMS\ExclusionPolicy("all")
12
 */
13
class ClubUser
14
{
15
    /**
16
     * @ORM\Id
17
     * @ORM\Column(name="id", type="integer")
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    private $id;
21
22
    /**
23
     * Rôle du membre
24
     * @ORM\Column(name="role", type="string", length=255)
25
     * @JMS\Expose
26
     * @Assert\Type("string")
27
     * @Assert\NotBlank()
28
     */
29
    private $role;
30
31
    /**
32
     * @ORM\ManyToOne(targetEntity="KI\UserBundle\Entity\Club")
33
     * @ORM\JoinColumn(nullable=false)
34
     * @JMS\Expose
35
     */
36
    private $club;
37
38
    /**
39
     * @ORM\ManyToOne(targetEntity="KI\UserBundle\Entity\User", inversedBy="clubs")
40
     * @ORM\JoinColumn(nullable=false)
41
     * @JMS\Expose
42
     */
43
    private $user;
44
45
    /**
46
     * Priorité du membre pour l'affichage
47
     * @ORM\Column(name="priority", type="integer")
48
     * @JMS\Expose
49
     */
50
    private $priority;
51
52
53
54
    //===== GENERATED AUTOMATICALLY =====//
55
56
    /**
57
     * Get id
58
     *
59
     * @return integer
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * Set role
68
     *
69
     * @param string $role
70
     * @return ClubUser
71
     */
72
    public function setRole($role)
73
    {
74
        $this->role = $role;
75
76
        return $this;
77
    }
78
79
    /**
80
     * Get role
81
     *
82
     * @return string
83
     */
84
    public function getRole()
85
    {
86
        return $this->role;
87
    }
88
89
    /**
90
     * Set club
91
     *
92
     * @param \KI\UserBundle\Entity\Club $club
93
     * @return ClubUser
94
     */
95
    public function setClub(\KI\UserBundle\Entity\Club $club)
96
    {
97
        $this->club = $club;
98
99
        return $this;
100
    }
101
102
    /**
103
     * Get club
104
     *
105
     * @return \KI\UserBundle\Entity\Club
106
     */
107
    public function getClub()
108
    {
109
        return $this->club;
110
    }
111
112
    /**
113
     * Set user
114
     *
115
     * @param \KI\UserBundle\Entity\User $user
116
     * @return ClubUser
117
     */
118
    public function setUser(\KI\UserBundle\Entity\User $user)
119
    {
120
        $this->user = $user;
121
122
        return $this;
123
    }
124
125
    /**
126
     * Get user
127
     *
128
     * @return \KI\UserBundle\Entity\User
129
     */
130
    public function getUser()
131
    {
132
        return $this->user;
133
    }
134
135
    /**
136
     * Set priority
137
     *
138
     * @param integer $priority
139
     *
140
     * @return ClubUser
141
     */
142
    public function setPriority($priority)
143
    {
144
        $this->priority = $priority;
145
146
        return $this;
147
    }
148
149
    /**
150
     * Get priority
151
     *
152
     * @return integer
153
     */
154
    public function getPriority()
155
    {
156
        return $this->priority;
157
    }
158
}
159