Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/src/CoreBundle/Entity/SessionRelCourse.php

153 lines
2.6 KiB

<?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;
11 years ago
/**
* @var int
11 years ago
*
* @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;
}
11 years ago
/**
* @return int
*/
public function getPosition()
{
return $this->position;
}
/**
* @param int $position
*/
public function setPosition($position)
{
$this->position = $position;
}
}