<?php
namespace App\Entity\Core\SelfStudy;
use App\Entity\Core\Quiz\Quiz;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table('self_study_typical_exam_problem')]
#[ORM\Entity(repositoryClass: SelfStudyTypicalExamProblemRepository::class)]
class SelfStudyTypicalExamProblem
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var string
*/
#[ORM\Column(name: 'name', type: 'string')]
private $name;
/**
* @var ArrayCollection|SelfStudy[]
*/
#[ORM\JoinTable(name: 'relation_self_study_typical_exam_problem')]
#[ORM\JoinColumn(name: 'typical_exam_problem_id', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn(name: 'self_study_id', referencedColumnName: 'id')]
#[ORM\ManyToMany(targetEntity: SelfStudy::class, inversedBy: 'typicalExamProblems')]
private $selfStudyList;
/**
* @var SelfStudyTypicalExamProblemElement[]
*/
#[ORM\OneToMany(targetEntity: SelfStudyTypicalExamProblemElement::class, mappedBy: 'problem', cascade: ['persist'])]
private $elements;
/**
* @var Quiz
*/
#[ORM\JoinColumn(name: 'quiz', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: Quiz::class)]
private $quiz;
/**
* @var bool
*/
#[ORM\Column(name: 'has_color', type: 'boolean', options: ['default' => false])]
private $hasColor;
public function __construct()
{
$this->selfStudyList = new ArrayCollection();
$this->elements = new ArrayCollection();
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return SelfStudyTypicalExamProblemElement[]
*/
public function getElements(): Collection
{
return $this->elements;
}
public function getSelfStudyList(): Collection
{
return $this->selfStudyList;
}
public function getName(): string
{
return $this->name;
}
public function getQuiz(): Quiz
{
return $this->quiz;
}
public function hasColor(): bool
{
return $this->hasColor;
}
}