<?php
namespace CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table("textbook_subtopic")
* @ORM\Entity(repositoryClass="TextbookSubTopicRepository")
*/
class TextbookSubTopic
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="sortorder", type="integer")
*/
private $order;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @var TextbookTopic
*
* @ORM\ManyToOne(targetEntity="TextbookTopic", inversedBy="textbookSubTopics")
* @ORM\JoinColumn(name="topic_id", referencedColumnName="id")
*/
private $textbookTopic;
/**
* @var TextbookElement[]
*
* @ORM\OneToMany(targetEntity="TextbookElement", mappedBy="textbookSubTopic", cascade={"persist"})
*/
private $textbookElements;
/**
*
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="TextbookSubTopicQuestion", mappedBy="subTopic", cascade={"persist", "remove"})
*/
private $questions;
/**
* @var ArrayCollection|textbookSession[]
* @ORM\ManyToMany(targetEntity="CoreBundle\Entity\TextbookSession", mappedBy="textbookSubtopics")
*
*/
private $textbookSessions;
/**
* @var bool
* @ORM\Column(type="boolean", name="is_enabled", options={"default": true})
*/
private $isEnabled;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return int
*/
public function getOrder()
{
return $this->order;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return TextbookTopic
*/
public function getTextbookTopic()
{
return $this->textbookTopic;
}
/**
* @return TextbookElement[]
*/
public function getTextbookElements()
{
return $this->textbookElements;
}
/**
* @return TextbookSubTopicQuestion[]
*/
public function getQuestions()
{
return $this->questions;
}
/**
* @return bool
*/
public function isEnabled(): bool
{
return $this->isEnabled;
}
}