|
|
|
|
<?php
|
|
|
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
|
|
|
|
|
|
namespace Chamilo\CoreBundle\Entity;
|
|
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* SessionRelCourse.
|
|
|
|
|
*
|
|
|
|
|
* @ORM\Table(name="session_rel_course", indexes={@ORM\Index(name="idx_session_rel_course_course_id", columns={"c_id"})})
|
|
|
|
|
* @ORM\Entity
|
|
|
|
|
*/
|
|
|
|
|
class SessionRelCourse
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @ORM\Column(name="id", type="integer")
|
|
|
|
|
* @ORM\Id
|
|
|
|
|
* @ORM\GeneratedValue
|
|
|
|
|
*/
|
|
|
|
|
protected $id;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @ORM\Column(name="nbr_users", type="integer")
|
|
|
|
|
*/
|
|
|
|
|
protected $nbrUsers;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @ORM\ManyToOne(targetEntity="Session", inversedBy="courses", cascade={"persist"})
|
|
|
|
|
* @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=false)
|
|
|
|
|
*/
|
|
|
|
|
protected $session;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="sessions", cascade={"persist"})
|
|
|
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
|
|
|
|
|
*/
|
|
|
|
|
protected $course;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @ORM\Column(name="position", type="integer", nullable=false)
|
|
|
|
|
*/
|
|
|
|
|
private $position;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructor.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this->nbrUsers = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get id.
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
|
|
|
|
public function getId()
|
|
|
|
|
{
|
|
|
|
|
return $this->id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param $session
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setSession($session)
|
|
|
|
|
{
|
|
|
|
|
$this->session = $session;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get course.
|
|
|
|
|
*
|
|
|
|
|
* @return Course
|
|
|
|
|
*/
|
|
|
|
|
public function getCourse()
|
|
|
|
|
{
|
|
|
|
|
return $this->course;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Course $course
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setCourse($course)
|
|
|
|
|
{
|
|
|
|
|
$this->course = $course;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Session.
|
|
|
|
|
*
|
|
|
|
|
* @return Session
|
|
|
|
|
*/
|
|
|
|
|
public function getSession()
|
|
|
|
|
{
|
|
|
|
|
return $this->session;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set nbrUsers.
|
|
|
|
|
*
|
|
|
|
|
* @param int $nbrUsers
|
|
|
|
|
*
|
|
|
|
|
* @return SessionRelCourse
|
|
|
|
|
*/
|
|
|
|
|
public function setNbrUsers($nbrUsers)
|
|
|
|
|
{
|
|
|
|
|
$this->nbrUsers = $nbrUsers;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get nbrUsers.
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
|
|
|
|
public function getNbrUsers()
|
|
|
|
|
{
|
|
|
|
|
return $this->nbrUsers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
|
|
|
|
public function getPosition()
|
|
|
|
|
{
|
|
|
|
|
return $this->position;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $position
|
|
|
|
|
*/
|
|
|
|
|
public function setPosition($position)
|
|
|
|
|
{
|
|
|
|
|
$this->position = $position;
|
|
|
|
|
}
|
|
|
|
|
}
|