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/SessionRelCourseRelUser.php

217 lines
4.3 KiB

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Entity;
use Chamilo\UserBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**
* Class SessionRelCourseRelUser
*
* @ORM\Table(
* name="session_rel_course_rel_user",
* indexes={
* @ORM\Index(name="idx_session_rel_course_rel_user_id_user", columns={"user_id"}),
* @ORM\Index(name="idx_session_rel_course_rel_user_course_id", columns={"c_id"})
* }
* )
* @ORM\Entity
*/
class SessionRelCourseRelUser
{
const STATUS_STUDENT = 0;
const STATUS_COURSE_COACH = 2;
public $statusList = [
0 => 'student',
2 => 'course_coach'
];
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var integer
*
* @ORM\Column(name="visibility", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $visibility;
/**
* @var integer
*
* @ORM\Column(name="status", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $status;
/**
* @var integer
*
* @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $legalAgreement;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="sessionCourseSubscriptions", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
protected $user;
/**
* @var Session
* @ORM\ManyToOne(targetEntity="Session", inversedBy="userCourseSubscriptions", cascade={"persist"})
* @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=false)
*/
protected $session;
/**
* @var Course
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="sessionUserSubscriptions", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
*/
protected $course;
/**
* Constructor
*/
public function __construct()
{
$this->visibility = 1;
}
/**
* @return \Chamilo\UserBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
/**
* @return Session
*/
public function getSession()
{
return $this->session;
}
/**
* @param Session $session
*/
public function setSession($session)
{
$this->session = $session;
}
/**
* @return Course
*/
public function getCourse()
{
return $this->course;
}
/**
* @param Course $course
*/
public function setCourse($course)
{
$this->course = $course;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set visibility
*
* @param integer $visibility
* @return SessionRelCourseRelUser
*/
public function setVisibility($visibility)
{
$this->visibility = $visibility;
return $this;
}
/**
* Get visibility
*
* @return integer
*/
public function getVisibility()
{
return $this->visibility;
}
/**
* Set status
*
* @param integer $status
* @return SessionRelCourseRelUser
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return integer
*/
public function getStatus()
{
return $this->status;
}
/**
* Set legalAgreement
*
* @param integer $legalAgreement
* @return SessionRelCourseRelUser
*/
public function setLegalAgreement($legalAgreement)
{
$this->legalAgreement = $legalAgreement;
return $this;
}
/**
* Get legalAgreement
*
* @return integer
*/
public function getLegalAgreement()
{
return $this->legalAgreement;
}
}