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.
111 lines
2.2 KiB
111 lines
2.2 KiB
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/* 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
|
|
{
|
|
/**
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
*/
|
|
protected int $id;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Session", inversedBy="courses", cascade={"persist"})
|
|
* @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=false)
|
|
*/
|
|
protected ?Session $session = null;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="sessions", cascade={"persist"})
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
|
|
*/
|
|
protected ?Course $course = null;
|
|
|
|
/**
|
|
* @ORM\Column(name="position", type="integer", nullable=false)
|
|
*/
|
|
protected int $position;
|
|
|
|
/**
|
|
* @ORM\Column(name="nbr_users", type="integer")
|
|
*/
|
|
protected int $nbrUsers;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->nbrUsers = 0;
|
|
$this->position = 0;
|
|
}
|
|
|
|
/**
|
|
* Get id.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setSession(Session $session): self
|
|
{
|
|
$this->session = $session;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCourse(): Course
|
|
{
|
|
return $this->course;
|
|
}
|
|
|
|
public function setCourse(Course $course): self
|
|
{
|
|
$this->course = $course;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSession(): Session
|
|
{
|
|
return $this->session;
|
|
}
|
|
|
|
public function setNbrUsers(int $nbrUsers): self
|
|
{
|
|
$this->nbrUsers = $nbrUsers;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getNbrUsers(): int
|
|
{
|
|
return $this->nbrUsers;
|
|
}
|
|
|
|
public function getPosition(): int
|
|
{
|
|
return $this->position;
|
|
}
|
|
|
|
public function setPosition(int $position): void
|
|
{
|
|
$this->position = $position;
|
|
}
|
|
}
|
|
|