Completed
Push — master ( c9546d...95f607 )
by Julito
09:41
created

src/CourseBundle/Entity/CGroupRelUser.php (1 issue)

1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\User;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * CGroupRelUser.
12
 *
13
 * @ORM\Table(
14
 *  name="c_group_rel_user",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"})
17
 *  }
18
 * )
19
 * @ORM\Entity
20
 */
21
class CGroupRelUser
22
{
23
    /**
24
     * @var int
25
     *
26
     * @ORM\Column(name="iid", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected $iid;
31
32
    /**
33
     * @var int
34
     *
35
     * @ORM\Column(name="c_id", type="integer")
36
     */
37
    protected $cId;
38
39
    /**
40
     * @var User
41
     *
42
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="courseGroupsAsMember")
43
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
44
     */
45
    protected $user;
46
47
    /**
48
     * @var CGroup
49
     *
50
     * @ORM\ManyToOne(targetEntity="CGroup", inversedBy="members")
51
     * @ORM\JoinColumn(name="group_id", referencedColumnName="iid", nullable=false)
52
     */
53
    protected $group;
54
55
    /**
56
     * @var int
57
     *
58
     * @ORM\Column(name="status", type="integer", nullable=false)
59
     */
60
    protected $status;
61
62
    /**
63
     * @var string
64
     *
65
     * @ORM\Column(name="role", type="string", length=50, nullable=false)
66
     */
67
    protected $role;
68
69
    /**
70
     * Set userId.
71
     *
72
     * @param int $user
73
     *
74
     * @return CGroupRelUser
75
     */
76
    public function setUser($user)
77
    {
78
        $this->user = $user;
0 ignored issues
show
Documentation Bug introduced by
It seems like $user of type integer is incompatible with the declared type Chamilo\CoreBundle\Entity\User of property $user.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
79
80
        return $this;
81
    }
82
83
    /**
84
     * Get userId.
85
     *
86
     * @return User
87
     */
88
    public function getUser()
89
    {
90
        return $this->user;
91
    }
92
93
    /**
94
     * Set group.
95
     *
96
     * @return CGroupRelUser
97
     */
98
    public function setGroup(CGroup $group)
99
    {
100
        $this->group = $group;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Get group.
107
     *
108
     * @return CGroup
109
     */
110
    public function getGroup()
111
    {
112
        return $this->group;
113
    }
114
115
    /**
116
     * Set status.
117
     *
118
     * @param int $status
119
     *
120
     * @return CGroupRelUser
121
     */
122
    public function setStatus($status)
123
    {
124
        $this->status = $status;
125
126
        return $this;
127
    }
128
129
    /**
130
     * Get status.
131
     *
132
     * @return int
133
     */
134
    public function getStatus()
135
    {
136
        return $this->status;
137
    }
138
139
    /**
140
     * Set role.
141
     *
142
     * @param string $role
143
     *
144
     * @return CGroupRelUser
145
     */
146
    public function setRole($role)
147
    {
148
        $this->role = $role;
149
150
        return $this;
151
    }
152
153
    /**
154
     * Get role.
155
     *
156
     * @return string
157
     */
158
    public function getRole()
159
    {
160
        return $this->role;
161
    }
162
163
    /**
164
     * Set cId.
165
     *
166
     * @param int $cId
167
     *
168
     * @return CGroupRelUser
169
     */
170
    public function setCId($cId)
171
    {
172
        $this->cId = $cId;
173
174
        return $this;
175
    }
176
177
    /**
178
     * Get cId.
179
     *
180
     * @return int
181
     */
182
    public function getCId()
183
    {
184
        return $this->cId;
185
    }
186
}
187