|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
|
namespace Chamilo\CourseBundle\Entity; |
|
|
|
|
|
|
|
|
|
use Chamilo\UserBundle\Entity\User; |
|
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -42,18 +43,20 @@ class CGroupRelUser |
|
|
|
|
protected $id; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var int |
|
|
|
|
* @var User |
|
|
|
|
* |
|
|
|
|
* @ORM\Column(name="user_id", type="integer", nullable=false) |
|
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courseGroupMemberships") |
|
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) |
|
|
|
|
*/ |
|
|
|
|
protected $userId; |
|
|
|
|
protected $user; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var int |
|
|
|
|
* @var CGroupInfo |
|
|
|
|
* |
|
|
|
|
* @ORM\Column(name="group_id", type="integer", nullable=false) |
|
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CGroupInfo", inversedBy="userMemberships") |
|
|
|
|
* @ORM\JoinColumn(name="group_id", referencedColumnName="iid", nullable=false) |
|
|
|
|
*/ |
|
|
|
|
protected $groupId; |
|
|
|
|
protected $group; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var int |
|
|
|
@ -72,13 +75,13 @@ class CGroupRelUser |
|
|
|
|
/** |
|
|
|
|
* Set userId. |
|
|
|
|
* |
|
|
|
|
* @param int $userId |
|
|
|
|
* @param int $user |
|
|
|
|
* |
|
|
|
|
* @return CGroupRelUser |
|
|
|
|
*/ |
|
|
|
|
public function setUserId($userId) |
|
|
|
|
public function setUser($user) |
|
|
|
|
{ |
|
|
|
|
$this->userId = $userId; |
|
|
|
|
$this->user = $user; |
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
} |
|
|
|
@ -86,35 +89,35 @@ class CGroupRelUser |
|
|
|
|
/** |
|
|
|
|
* Get userId. |
|
|
|
|
* |
|
|
|
|
* @return int |
|
|
|
|
* @return User |
|
|
|
|
*/ |
|
|
|
|
public function getUserId() |
|
|
|
|
public function getUser() |
|
|
|
|
{ |
|
|
|
|
return $this->userId; |
|
|
|
|
return $this->user; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set groupId. |
|
|
|
|
* Set group. |
|
|
|
|
* |
|
|
|
|
* @param int $groupId |
|
|
|
|
* @param CGroupInfo $group |
|
|
|
|
* |
|
|
|
|
* @return CGroupRelUser |
|
|
|
|
*/ |
|
|
|
|
public function setGroupId($groupId) |
|
|
|
|
public function setGroup(CGroupInfo $group) |
|
|
|
|
{ |
|
|
|
|
$this->groupId = $groupId; |
|
|
|
|
$this->group = $group; |
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get groupId. |
|
|
|
|
* Get group. |
|
|
|
|
* |
|
|
|
|
* @return int |
|
|
|
|
* @return CGroupInfo |
|
|
|
|
*/ |
|
|
|
|
public function getGroupId() |
|
|
|
|
public function getGroup() |
|
|
|
|
{ |
|
|
|
|
return $this->groupId; |
|
|
|
|
return $this->group; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|