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/CourseBundle/Entity/CNotebook.php

337 lines
5.5 KiB

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CNotebook.
*
* @ORM\Entity
* @ORM\Table(
* name="c_notebook"
* )
*/
class CNotebook extends AbstractResource implements ResourceInterface
{
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $iid;
/**
* @var int
*
* @ORM\Column(name="c_id", type="integer")
*/
protected $cId;
/**
* @var int
*
* @ORM\Column(name="user_id", type="integer", nullable=false)
*/
protected $userId;
/**
* @var string
*
* @ORM\Column(name="course", type="string", length=40, nullable=false)
*/
protected $course;
/**
* @var int
*
* @ORM\Column(name="session_id", type="integer", nullable=false)
*/
protected $sessionId;
/**
* @Assert\NotBlank()
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
protected string $title;
/**
* @Assert\NotBlank()
* @ORM\Column(name="description", type="text", nullable=false)
*/
protected string $description;
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(name="creation_date", type="datetime", nullable=false)
*/
protected $creationDate;
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(name="update_date", type="datetime", nullable=false)
*/
protected $updateDate;
/**
* @var int
*
* @ORM\Column(name="status", type="integer", nullable=true)
*/
protected $status;
public function __construct()
{
$this->status = 0;
}
public function __toString(): string
{
return $this->getTitle();
}
/**
* Set userId.
*
* @param int $userId
*
* @return CNotebook
*/
public function setUserId($userId)
{
$this->userId = $userId;
return $this;
}
/**
* Get userId.
*
* @return int
*/
public function getUserId()
{
return $this->userId;
}
/**
* Set course.
*
* @param string $course
*
* @return CNotebook
*/
public function setCourse($course)
{
$this->course = $course;
return $this;
}
/**
* Get course.
*
* @return string
*/
public function getCourse()
{
return $this->course;
}
/**
* Set sessionId.
*
* @param int $sessionId
*
* @return CNotebook
*/
public function setSessionId($sessionId)
{
$this->sessionId = $sessionId;
return $this;
}
/**
* Get sessionId.
*
* @return int
*/
public function getSessionId()
{
return $this->sessionId;
}
/**
* Set title.
*/
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
/**
* Get title.
*/
public function getTitle()
{
return $this->title;
}
/**
* Set description.
*/
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set creationDate.
*
* @param \DateTime $creationDate
*
* @return CNotebook
*/
public function setCreationDate($creationDate)
{
$this->creationDate = $creationDate;
return $this;
}
/**
* Get creationDate.
*
* @return \DateTime
*/
public function getCreationDate()
{
return $this->creationDate;
}
/**
* Set updateDate.
*
* @param \DateTime $updateDate
*
* @return CNotebook
*/
public function setUpdateDate($updateDate)
{
$this->updateDate = $updateDate;
return $this;
}
/**
* Get updateDate.
*
* @return \DateTime
*/
public function getUpdateDate()
{
return $this->updateDate;
}
/**
* Set status.
*
* @param int $status
*
* @return CNotebook
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status.
*
* @return int
*/
public function getStatus()
{
return $this->status;
}
/**
* Set cId.
*
* @param int $cId
*
* @return CNotebook
*/
public function setCId($cId)
{
$this->cId = $cId;
return $this;
}
/**
* Get cId.
*
* @return int
*/
public function getCId()
{
return $this->cId;
}
/**
* Get iid.
*
* @return int
*/
public function getIid()
{
return $this->iid;
}
public function getResourceIdentifier(): int
{
return $this->getIid();
}
public function getResourceName(): string
{
return $this->getTitle();
}
public function setResourceName(string $name): self
{
return $this->setTitle($name);
}
}