<?php
namespace App\Entity\Core\SelfStudy;
use App\Entity\Core\Classroom\ClassroomType;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table('self_study')]
#[ORM\Entity]
class SelfStudy
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var string
*/
#[ORM\Column(name: 'display_name', type: 'string', length: 255)]
private $displayName;
/**
* @var ClassroomType
*/
#[ORM\JoinColumn(name: 'classroom_type', referencedColumnName: 'id')]
#[ORM\OneToOne(targetEntity: ClassroomType::class)]
private $classroomType;
/**
* @var ArrayCollection|SelfStudyCategory[]
*/
#[ORM\OneToMany(targetEntity: SelfStudyCategory::class, mappedBy: 'selfStudy')]
private $selfStudyCategories;
/**
* @var ArrayCollection|SelfStudyTypicalExamProblem[]
*/
#[ORM\ManyToMany(targetEntity: SelfStudyTypicalExamProblem::class, mappedBy: 'selfStudyList')]
private $typicalExamProblems;
/**
* @var ArrayCollection|SelfStudyExamQuiz[]
*/
#[ORM\OneToMany(targetEntity: SelfStudyExamQuiz::class, mappedBy: 'selfStudy')]
private $selfStudyExamQuizzes;
/**
* @var bool
*/
#[ORM\Column(name: 'has_exam_card', type: 'boolean', options: ['default' => true])]
private bool $hasExamCard = true;
/**
* @var string
*/
#[ORM\Column(name: 'typical_exam_problem_teaser', type: 'string', length: 1000, nullable: true, options: ['default' => ''])]
private $typicalExamProblemTeaser;
public function __construct()
{
$this->selfStudyCategories = new ArrayCollection();
$this->typicalExamProblems = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function getDisplayName(): string
{
return $this->displayName;
}
public function getClassroomType(): ClassroomType
{
return $this->classroomType;
}
public function getTypicalExamProblems(): Collection
{
return $this->typicalExamProblems;
}
public function getSelfStudyCategories(): Collection
{
return $this->selfStudyCategories;
}
public function getTypicalExamProblemTeaser(): ?string
{
return $this->typicalExamProblemTeaser;
}
public function hasExamCard(): bool
{
return $this->hasExamCard;
}
public function __toString()
{
return $this->displayName;
}
}